-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
49 lines (43 loc) · 1.42 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
49 lines (43 loc) · 1.42 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
# Serves as the .pre-commit-config.yaml of the repo, as well as a baseline template for reuse
repos:
### Secrets protection
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1
hooks:
- id: gitleaks
### General
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
# File formatting
- id: end-of-file-fixer
- id: trailing-whitespace
# Large files (set file size)
- id: check-added-large-files
args: ["--maxkb=1000"]
# Executables:
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
# JSON files:
- id: check-json
# - id: pretty-format-json
# args: ["--autofix", "--indent=4", "--top-keys='key,command'"]
### Shell scripting
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.11.0
hooks:
- id: shellcheck
# Matches options in .shellcheckrc
args: ["--shell=bash", "-x", "--exclude=SC1090,SC1091,SC2164"]
### C++
# - repo: https://github.com/pre-commit/mirrors-clang-format
# rev: v22.1.5
# hooks:
# - id: clang-format
### LaTeX Formatting
# - repo: https://github.com/cmhughes/latexindent.pl.git
# rev: V4.0.2
# hooks:
# - id: latexindent
# # Matches args for latexindent in VS Code settings
# args: ["-wd", "-s", "-m", "-y=defaultIndent:' ',modifyLineBreaks:textWrapOptions:columns:100"]