-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy path.pre-commit-config.yaml
47 lines (46 loc) · 1.58 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
repos:
- repo: https://github.com/nix-community/nixpkgs-fmt
rev: v1.2.0
hooks:
- id: nixpkgs-fmt
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
exclude: openapi/
- repo: local
hooks:
- id: rust-lint
name: Rust lint
description: Run cargo clippy on files included in the commit.
entry: nix-shell --pure --run './scripts/rust/linter.sh clippy'
pass_filenames: false
types: [file, rust]
language: system
- id: rust-style
name: Rust style
description: Run cargo fmt on files included in the commit.
entry: nix-shell --pure --run './scripts/rust/linter.sh fmt'
pass_filenames: false
types: [file, rust]
language: system
- id: python-fmt
name: Python fmt
description: Run python fmt on files included in the commit.
entry: nix-shell --pure --run './scripts/python/fmt.sh'
pass_filenames: false
types: [file, python]
language: system
- id: commit-lint
name: Commit Lint
description: Runs commitlint against the commit message.
language: system
entry: bash -c 'nix-shell --pure --run "cat $1 | grep -v '^#' | commitlint"'
args: [$1]
stages: [commit-msg]
- id: helm-docs
name: Helm Docs
description: Auto generate the helm docs README.
language: system
entry: bash -c 'nix-shell --pure --run "./scripts/helm/generate-readme.sh" ./scripts/helm/shell.nix'
types: [file]