--- fail_fast: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: - id: check-merge-conflict - repo: meta hooks: - id: check-hooks-apply - repo: local hooks: - id: pre-commit-validate-config name: pre-commit validate config entry: pre-commit validate-config pass_filenames: false files: '^.pre-commit-config.yaml$' language: system - repo: https://github.com/TekWizely/pre-commit-golang rev: v1.0.0-rc.1 hooks: - id: go-mod-tidy - id: go-test-mod - id: golangci-lint-mod - id: go-build-mod - repo: local hooks: - id: statix name: statix entry: statix check . always_run: false pass_filenames: false files: '\.*.nix$' language: system - id: nix-fmt name: nix fmt entry: nix fmt -- --check . always_run: false pass_filenames: false files: '\.*.nix$' language: system - id: flake-check name: nix flake check entry: nix flake check --keep-going always_run: false pass_filenames: false files: "flake.(nix|lock)$" language: system - id: nix-build-py name: nix build py entry: nix build .#p1 pass_filenames: false # trigger this hook on changes to any of nix (also flake.lock) or # python files. files: '\.*.(nix|lock|py)$' language: system - id: nix-build-go-2 name: nix build go p2 entry: nix build .#p2 pass_filenames: false # trigger this hook on changes to any of nix (also flake.lock) files # and go's mod or sum files # files: '\.*.(nix|lock|mod|sum)$' files: '\.*.(nix|lock|)|./p2/*.(mod|sum)$' language: system - id: nix-build-go-p3 name: nix build go p3 entry: nix build .#p3 pass_filenames: false # trigger this hook on changes to any of nix (also flake.lock) files # and go's mod or sum files files: '\.*.(nix|lock|)|./p3/*.(mod|sum)$' language: system