diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eadcf2d..bc32f49 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,23 +16,25 @@ repos: - id: statix name: statix entry: statix check . + always_run: false pass_filenames: false + files: '\.*.nix$' language: system - id: nixpkgs-fmt - require_serial: false name: nixpkgs-fmt entry: ./check-fmt + always_run: false pass_filenames: false + files: '\.*.nix$' language: system - id: flake-check - require_serial: false name: nix flake check entry: nix flake check --impure + always_run: false pass_filenames: false - files: "flake.nix" + files: "flake.(nix|lock)$" language: system - id: addlicense - require_serial: false name: addlicence -check entry: > go run github.com/google/addlicense@v1.0.0 -check -v @@ -63,4 +65,7 @@ repos: name: nix build entry: nix build .#go-xkcdreader pass_filenames: false + # trigger this hook on changes to any of nix (also flake.lock) files + # and go's src, mod or sum files + files: '\.*.(nix|lock|go|mod|sum)$' language: system