pre-commit: Add a hook to check whitespaces and conflict markers

The hook uses settings from `.gitattributes`.
This commit is contained in:
Alex Turbov 2025-01-04 21:38:04 +04:00
parent 2c06b9f429
commit efa7c6aedf
No known key found for this signature in database
GPG Key ID: 8BEDB7D11F95D5E3
4 changed files with 31 additions and 25 deletions

View File

@ -72,3 +72,9 @@ repos:
) )
- id: mixed-line-ending - id: mixed-line-ending
- id: trailing-whitespace - id: trailing-whitespace
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: git-check
pass_filenames: false

View File

@ -1,6 +1,6 @@
{ {
"callbacks" : [], "callbacks" : [],
"hooks" : [], "hooks" : [],
"queries" : [], "queries" : [],
"version": 1 "version": 1
} }

View File

@ -1,12 +1,12 @@
{ {
"callbacks" : "callbacks" :
[ [
"\"@CMAKE_COMMAND@\" -E echo callback1" "\"@CMAKE_COMMAND@\" -E echo callback1"
], ],
"hooks" : "hooks" :
[ [
"postGenerate" "postGenerate"
], ],
"queries" : [], "queries" : [],
"version" : 1 "version" : 1
} }

View File

@ -1,16 +1,16 @@
{ {
"callbacks" : "callbacks" :
[ [
"\"@CMAKE_COMMAND@\" -E echo callback2" "\"@CMAKE_COMMAND@\" -E echo callback2"
], ],
"hooks" : "hooks" :
[ [
"postCMakeBuild" "postCMakeBuild"
], ],
"queries" : "queries" :
[ [
"staticSystemInformation", "staticSystemInformation",
"dynamicSystemInformation" "dynamicSystemInformation"
], ],
"version": 1 "version": 1
} }