chore: enable pre-commit

main
mandlm 2024-03-14 09:38:53 +01:00
parent 2cd107225b
commit 8e7f3d1bb0
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
2 changed files with 37 additions and 0 deletions

View File

@ -17,7 +17,15 @@
cmake
ninja
sccache
# pre-commit
pre-commit
commitizen
];
shellHook = ''
pre-commit install --allow-missing-config --hook-type pre-commit --hook-type commit-msg
'';
};
}
);

29
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,29 @@
repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.15.0
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
name: check markdown/yaml formatting
types_or:
- markdown
- yaml
args: [--no-config]
exclude: CHANGELOG.md
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
hooks:
- id: clang-format
- id: clang-tidy
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
- id: cmake-lint