-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
49 lines (46 loc) · 1.75 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
49 lines (46 loc) · 1.75 KB
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
47
48
49
# Pre-commit hooks for basic hygiene + shell scripts.
exclude: (^|/)(common/zsh/\.p10k\.zsh|common/zsh/\.local/bin/my-fzf-preview\.sh|sherlock/terminfo/\.terminfo/.*)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
# Windows Terminal rewrites its settings.json on every UI save, with
# its own trailing spaces and no final newline. Reformatting it here
# only starts a fight the app always wins, so leave its bytes alone;
# check-json below still validates it.
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
exclude: (^|/)(\.p10k\.zsh|win/terminal/.*/settings\.json)$
- id: end-of-file-fixer
exclude: (^|/)win/terminal/.*/settings\.json$
- id: check-merge-conflict
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-added-large-files
args: [--maxkb=40000, --enforce-all]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
args: [--severity=warning]
files: (\.sh$|(^|/)\.bash(rc|_profile|_aliases)$|(^|/)\.(profile|alias|aliases)$)
types: [file]
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.12.0-2
hooks:
- id: shfmt
args: [-w, -i, "4", -ci, -ln, bash]
files: (\.sh$|(^|/)\.bash(rc|_profile|_aliases)$)
- id: shfmt
args: [-w, -i, "4", -ci, -ln, posix]
files: ((^|/)\.(profile|alias|aliases)$)
types: [file]
- id: shfmt
args: [-w, -i, "4", -ci, -ln, zsh]
files: ((^|/)\.(zshrc|zshenv|zprofile|zsh_aliases)$|\.zsh$)
- repo: https://github.com/JohnnyMorganz/StyLua
rev: v2.0.2
hooks:
- id: stylua
files: \.(lua|luau)$