-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
27 lines (27 loc) · 1.24 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
repos:
- repo: local
hooks:
- id: alejandra
name: Alejandra (Nix formatter)
description: This hook checks Nix files with Alejandra.
entry: bash -c 'for arg in "$@"; do nix shell nixpkgs#alejandra --command alejandra -q $arg; done;' --
language: system
files: \.nix$
- id: shfmt
name: Sh (shell formatter)
description: This hook checks shell files with shfmt.
entry: bash -c 'for arg in "$@"; do nix shell nixpkgs#shfmt --command shfmt -w $arg; done;' --
language: system
types: [shell]
- id: stylua
name: Stylua (Lua formatter)
description: This hook checks Lua files with Stylua.
entry: bash -c 'for arg in "$@"; do nix shell nixpkgs#stylua --command stylua $arg; done;' --
language: system
files: \.lua$
- id: gitleaks
name: Gitleaks (secret scanner)
description: This hook checks the existence of secrets.
entry: bash -c 'nix shell nixpkgs#gitleaks --command gitleaks git --pre-commit --redact --staged --no-banner --verbose 2> /dev/null; nix shell nixpkgs#gitleaks --command gitleaks dir --redact --no-banner --verbose 2> /dev/null'
language: system
pass_filenames: false