adds comments for pre-commit checks

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2024-05-20 01:06:40 -04:00 committed by Alice Huston
parent 93ebc1ed0c
commit 97eb8e2767

View File

@ -9,7 +9,7 @@ forEachSystem (system: {
src = ./.; src = ./.;
hooks = { hooks = {
# nix checks # nix checks
# Example custom hook for nix formatting: # Example custom hook for nix formatting
fmt-check = { fmt-check = {
enable = true; enable = true;
@ -20,6 +20,7 @@ forEachSystem (system: {
# see also https://pre-commit.com/#hooks-files # see also https://pre-commit.com/#hooks-files
files = "\\.nix$"; files = "\\.nix$";
}; };
## static analysis checks for nix
nil.enable = true; nil.enable = true;
statix.enable = false; statix.enable = false;
@ -32,10 +33,12 @@ forEachSystem (system: {
# git hooks # git hooks
check-merge-conflicts.enable = true; check-merge-conflicts.enable = true;
## prevents committing to main
no-commit-to-branch.enable = true; no-commit-to-branch.enable = true;
# misc hooks # misc hooks
check-added-large-files.enable = true; check-added-large-files.enable = true;
## prevents two similarly named files for case sensitive systems
check-case-conflicts.enable = true; check-case-conflicts.enable = true;
detect-private-keys.enable = true; detect-private-keys.enable = true;
}; };