-
Notifications
You must be signed in to change notification settings - Fork 5
/
.pre-commit-config.yaml
137 lines (126 loc) · 3.8 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
135
136
137
# To use:
#
# pre-commit run -a
#
# Or:
#
# pre-commit install # (runs every time you commit in git)
#
# To update this file:
#
# pre-commit autoupdate
#
# See https://github.com/pre-commit/pre-commit
default_stages: [commit]
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-case-conflict
#- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
args: ["--unsafe"]
- id: check-json
- id: debug-statements
- id: end-of-file-fixer
exclude: &excludes |
(?x)^(
.*\.blend|
.*\.dae|
.*\.mtl|
.*\.obj|
.*\.pgm|
.*\.step|
.*\.stl|
.*\.md
)$
- id: fix-byte-order-marker
- id: mixed-line-ending
exclude: *excludes
- id: trailing-whitespace
exclude: *excludes
- id: detect-private-key
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/detailyang/pre-commit-shell
rev: 1.0.5
hooks:
- id: shell-lint
args: [--external-sources]
- repo: https://github.com/markdownlint/markdownlint
rev: v0.11.0
hooks:
- id: markdownlint
- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
rev: v0.1.0
hooks:
- id: dockerfilelint
- repo: local
hooks:
- id: clang-format
name: clang-format
description: Format files with ClangFormat.
entry: clang-format-11
language: system
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
args: ["-fallback-style=none", "-i"]
# - id: catkin_lint
# name: catkin_lint
# description: Check package.xml and cmake files
# entry: catkin_lint .
# language: system
# always_run: true
# pass_filenames: false
# args: [ "--strict" ]
- repo: https://github.com/mklpiening/pre-commit-hooks-django
rev: v0.4.1 # Use the ref you want to point at
hooks:
- id: check-untracked-migrations
# Optional, if specified, hook will work only on these branches
# otherwise it will work on all branches
# args: ["--branches", "main"]
# - id: check-unapplied-migrations
# - id: check-absent-migrations
- id: po-location-format
# Mandatory, select one of the following options:
# file: show only the file path as location
# never: remove all locations
args: ["--add-location", "file"]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.6.2" # Use the sha / tag you want to point at
hooks:
- id: prettier
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: "v8.0.0"
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: "v8.16.0" # Use the sha / tag you want to point at
hooks:
- id: eslint
files: \.([jt]sx?|vue)$ # *.js, *.jsx, *.ts, *.tsx and *.vue
types: [file]
additional_dependencies:
- "@typescript-eslint/[email protected]"
- "@typescript-eslint/[email protected]"