-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
134 lines (134 loc) · 4.12 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-xml
- id: check-yaml
- id: check-toml
- id: check-json
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-case-conflict
- id: detect-private-key
- id: check-docstring-first
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-vcs-permalinks
- id: check-symlinks
- id: mixed-line-ending
# - id: pretty-format-json
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
# TODO: Migrate some checks to python to make them "universal"
# - id: bundler-audit
# - id: check-mailmap # Depends on sh, does not work in Powershell/Windows
- id: forbid-binary
# - id: forbid-space-in-indent
# - id: git-check # Configure in .gitattributes, Depends on sh, does not work in Powershell/Windows
# - id: git-dirty # Configure in .gitignore
# - id: markdownlint # Configure in .mdlrc, depends on Ruby
# - id: protect-first-parent # TODO: This fails in GH CI since Ubuntu 20.04 has an old Git version
# - id: require-ascii
# - id: script-must-have-extension
# - id: script-must-not-have-extension
# - id: shellcheck
# - id: shfmt
# TODO: Migrate this to local scripts
# - repo: https://github.com/Lucas-C/pre-commit-hooks
# rev: v1.2.0
# hooks:
# - id: remove-crlf
# - id: remove-tabs
# exclude: |
# (?x)^(
# UltiSnips/.*|
# Makefile.*|
# \.git.*|
# .*\.make|
# .*\.go$
# )$
# # args: [ '--whitespaces-count', '2' ] # defaults to: 4
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.28.6
hooks:
- id: check-github-workflows
- id: check-github-actions
# - id: check-jsonschema
# - id: check-azure-pipelines
# - id: check-travis
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
hooks:
- id: mypy
- repo: https://github.com/Vimjas/vint
rev: v0.4a3
hooks:
- id: vint
args: ['--enable-neovim', '-t', '-w']
exclude: |
(?x)^(
plug/.*|
ftdetect/.*
)$
- repo: local
hooks:
- id: shellcheck
name: shellcheck
description: Shell correctness
entry: shellcheck
args: ['-f', 'gcc', '-x', '-e', '1117']
exclude: |
(?x)^(
shell/zfunctions/.*|
shell/scripts/.*|
.*\.(t)?csh|
.*zsh.*|
.*\.zsh
)$
language: system
types: [shell]
- id: shfmt
name: shfmt
description: Format shell scripts
entry: shfmt
args: ['-i', '4', '-s', '-ci', '-kp', '-d']
exclude: |
(?x)^(
shell/zfunctions/.*|
shell/scripts/.*|
.*\.(t)?csh|
.*zsh.*|
.*\.zsh
)$
types: [shell]
language: system
# language: golang
# minimum_pre_commit_version: 2.4.0
# additional_dependencies: [mvdan.cc/sh/v3/cmd/[email protected]]
- id: luacheck
name: luacheck
description: Lua check
entry: luacheck
# TODO: Fix completxity before adding this back '--max-cyclomatic-complexity', '20',
args: ['--std', 'luajit', '--formatter', 'plain', '--codes']
language: system
types: [lua]
- id: stylua
name: stylua
description: Format Lua files
entry: stylua
args: [--check, --verify]
language: system
types: [lua]
# language: system
# types: [python]
# require_serial: true