ak9im/.pre-commit-config.yaml

74 lines
2.1 KiB
YAML
Raw Normal View History

2023-01-28 19:24:26 +01:00
---
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
2023-01-28 19:24:26 +01:00
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
2023-01-28 19:24:26 +01:00
- 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
2023-03-04 14:51:37 +01:00
- id: nix-build-go-2
name: nix build go p2
2023-01-28 19:24:26 +01:00
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
2023-03-04 14:51:37 +01:00
# 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)$'
2023-01-28 19:24:26 +01:00
language: system