-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
34 lines (31 loc) · 928 Bytes
/
.pre-commit-config.yaml
File metadata and controls
34 lines (31 loc) · 928 Bytes
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
---
repos:
# Shell script checks and formatting
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: ["--severity=warning"]
exclude: '\.zsh$'
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.10.0-2
hooks:
- id: shfmt
args: ["-i", "2", "-ci", "-bn", "-s"]
exclude: '\.zsh$'
# -i 2: indent with 2 spaces
# -ci: indent case statements
# -bn: binary operators like && and | may start a line
# -s: simplify the code
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: ["--allow-multiple-documents"]
- id: check-added-large-files
args: ["--maxkb=500"]
- id: mixed-line-ending
args: ["--fix=lf"]