mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-20 23:44:08 +00:00
Add hook for non-breaking space in 0 A.D.
This replaces the existing arclint linter to ensure the project name does only include a non-breaking space with a pre-commit hook. The regex to check is slightly different to account for escaped non-breaking spaces in JavaScript files and to avoid some false-positives.
This commit is contained in:
@@ -13,3 +13,14 @@ repos:
|
||||
- --target-version
|
||||
- py311
|
||||
exclude: ^source/tools/webservices/
|
||||
- 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$)
|
||||
|
||||
Reference in New Issue
Block a user