2024-08-23 05:32:22 -07:00
|
|
|
---
|
|
|
|
|
repos:
|
2024-08-24 04:20:23 -07:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2025-01-09 07:35:31 -08:00
|
|
|
rev: v5.0.0
|
2024-08-24 04:20:23 -07:00
|
|
|
hooks:
|
2025-05-22 11:43:52 -07:00
|
|
|
- id: check-added-large-files
|
|
|
|
|
args:
|
|
|
|
|
- --maxkb=1024
|
|
|
|
|
- --enforce-all
|
2025-05-30 02:13:23 -07:00
|
|
|
exclude: (^binaries/data/mods/public/maps/.*\.xml$)
|
2024-08-24 04:20:23 -07:00
|
|
|
- id: check-case-conflict
|
|
|
|
|
- id: check-executables-have-shebangs
|
|
|
|
|
- id: check-json
|
|
|
|
|
- id: check-merge-conflict
|
|
|
|
|
- id: check-shebang-scripts-are-executable
|
|
|
|
|
- id: check-symlinks
|
|
|
|
|
- id: check-toml
|
|
|
|
|
- id: check-xml
|
|
|
|
|
exclude: |
|
|
|
|
|
(?x)(
|
|
|
|
|
^binaries/data/mods/_test.xero/a/b/test1.xml|
|
|
|
|
|
^binaries/data/mods/_test.xero/test1.xml|
|
|
|
|
|
^binaries/data/mods/_test.sim/simulation/templates.illformed.xml|
|
|
|
|
|
^binaries/data/mods/public/maps/.*\.xml
|
|
|
|
|
)
|
2024-08-23 05:32:22 -07:00
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
2025-05-26 08:19:03 -07:00
|
|
|
rev: v0.11.11
|
2024-08-23 05:32:22 -07:00
|
|
|
hooks:
|
2025-05-26 08:19:03 -07:00
|
|
|
- id: ruff-check
|
2024-08-23 05:32:22 -07:00
|
|
|
args:
|
|
|
|
|
- --output-format=full
|
|
|
|
|
exclude: ^source/tools/webservices/
|
|
|
|
|
- id: ruff-format
|
|
|
|
|
args:
|
2024-12-29 10:56:02 -08:00
|
|
|
- --diff
|
2024-08-23 05:32:22 -07:00
|
|
|
exclude: ^source/tools/webservices/
|
2024-08-24 04:08:42 -07:00
|
|
|
- repo: local
|
|
|
|
|
hooks:
|
|
|
|
|
- id: non-breaking-space-in-0ad
|
|
|
|
|
name: check for non-breaking space in "0 A.D."
|
|
|
|
|
description: |
|
|
|
|
|
Verify a non-breaking spaces is used in the project name ("0 A.D").
|
|
|
|
|
entry: '0(?!(\xc2\xa0|\\xa0)A\.D\.)\s?(?<!\\xa0)(A|a)\.(D|d)\.?'
|
|
|
|
|
language: pygrep
|
|
|
|
|
types: [text]
|
|
|
|
|
files: ^binaries/
|
|
|
|
|
exclude: (^binaries/data/mods/(mod|public)/art/.*\.xml|\.dae$)
|
2024-08-25 03:04:24 -07:00
|
|
|
- repo: https://github.com/scop/pre-commit-shfmt
|
2025-05-26 08:19:03 -07:00
|
|
|
rev: v3.11.0-1
|
2024-08-25 03:04:24 -07:00
|
|
|
hooks:
|
|
|
|
|
- id: shfmt
|
|
|
|
|
args:
|
|
|
|
|
- --diff
|
|
|
|
|
- --simplify
|
|
|
|
|
stages: [pre-commit]
|
2024-08-27 07:16:10 -07:00
|
|
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
|
|
|
|
rev: v0.10.0.1
|
|
|
|
|
hooks:
|
2024-09-05 00:42:42 -07:00
|
|
|
- id: shellcheck
|
2024-08-27 01:06:31 -07:00
|
|
|
- repo: https://github.com/igorshubovych/markdownlint-cli
|
2025-05-26 08:19:03 -07:00
|
|
|
rev: v0.45.0
|
2024-08-27 01:06:31 -07:00
|
|
|
hooks:
|
|
|
|
|
- id: markdownlint
|
2025-05-26 08:18:58 -07:00
|
|
|
language_version: 22.14.0
|
2024-08-27 01:06:31 -07:00
|
|
|
exclude: |
|
|
|
|
|
(?x)(
|
|
|
|
|
^.gitea/ISSUE_TEMPLATE/|
|
|
|
|
|
^source/third_party/
|
|
|
|
|
)
|
2024-09-05 00:46:13 -07:00
|
|
|
- repo: https://github.com/adrienverge/yamllint
|
2025-05-26 08:19:03 -07:00
|
|
|
rev: v1.37.1
|
2024-09-05 00:46:13 -07:00
|
|
|
hooks:
|
|
|
|
|
- id: yamllint
|
|
|
|
|
args:
|
|
|
|
|
- --strict
|
2024-09-04 08:34:54 -07:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-eslint
|
|
|
|
|
rev: v9.27.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: eslint
|
2025-05-30 12:33:49 -07:00
|
|
|
language_version: 22.14.0
|
2024-09-04 08:34:54 -07:00
|
|
|
additional_dependencies:
|
|
|
|
|
- eslint@9.27.0
|
|
|
|
|
- eslint-plugin-brace-rules@0.1.6
|
2025-05-30 12:33:49 -07:00
|
|
|
- "@stylistic/eslint-plugin@4.4.0"
|
2024-09-04 08:34:54 -07:00
|
|
|
args:
|
|
|
|
|
- --max-warnings=0
|
|
|
|
|
- --no-warn-ignored
|