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: 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" : [],
"hooks" : [],
"queries" : [],
"callbacks" : [],
"hooks" : [],
"queries" : [],
"version": 1
}

View File

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

View File

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