-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
75 lines (70 loc) · 3.28 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
default_language_version: {python: python3}
minimum_pre_commit_version: "1.15"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
name: Check for valid YAML syntax in repo
description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_yaml.py
- id: detect-private-key
name: Check for existence of private key in repo
description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/detect_private_key.py
- id: trailing-whitespace
name: Remove trailing whitespace in YAML,Bash files
description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/trailing_whitespace_fixer.py
files: \.(sh|yaml|yml)$
- id: end-of-file-fixer
name: Ensure EOF is consistently only a newline
description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/end_of_file_fixer.py
files: \.(sh|yaml|yml)$
- id: mixed-line-ending
name: Ensure line-ending is consistent
description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/mixed_line_ending.py
files: \.(sh|yaml|yml)$
#- id: check-executables-have-shebangs
# name: Checks that non-binary executables have a proper shebang
# description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_executables_have_shebangs.py
# files: \.(sh)$
#- id: check-shebang-scripts-are-executable
# name: Checks that scripts with shebangs are executable.
# description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_shebang_scripts_are_executable.py
# files: \.(sh)$
#- id: check-json
# name: Attempts to load all json files to verify syntax.
# description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_json.py
# files: \.(json)$
- id: check-toml
name: Attempts to load all toml files to verify syntax.
description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_toml.py
files: \.(toml)$
- id: check-yaml
name: Attempts to load all yaml files to verify syntax.
description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_yaml.py
files: \.(yaml)$
# format yaml
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
args: [--mapping, "2", --sequence, "4", --offset, "2", --width, "88", --preserve-quotes]
exclude: themes/
# lint Makefile
- repo: https://github.com/mrtazz/checkmake/
rev: 0.2.2
hooks:
- id: checkmake
files: Makefile
# run semgrep on all known filetypes
- repo: https://github.com/returntocorp/semgrep
rev: 'v1.89.0'
hooks:
- id: semgrep
# See https://semgrep.dev/explore to select a ruleset and copy its URL
args: ['--config', 'auto', '--error', '--skip-unknown-extensions', '--quiet']
exclude: themes/
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes