Add 'clang-format' pre-commit hook

This commit is contained in:
Bruno BELANYI 2022-06-02 16:59:21 +02:00
parent 5be01b43fb
commit 8f752e0f94

View file

@ -47,6 +47,16 @@
src = ./.;
hooks = {
clang-format = {
enable = true;
name = "clang-format";
entry = "${pkgs.clang-tools}/bin/clang-format -style=file -i";
types = [ "text" "c" ];
# I don't care for generated files' formatting
excludes = [ "src/parser.c" "src/tree_sitter/parser.h" ];
language = "system";
};
nixpkgs-fmt = {
enable = true;
};