-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
60 lines (60 loc) · 2.05 KB
/
.pre-commit-config.yaml
File metadata and controls
60 lines (60 loc) · 2.05 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
50
51
52
53
54
55
56
57
58
59
60
exclude: \.patch$
repos:
- repo: local
hooks:
- id: copyright_checker
name: copyright_checker
entry: python3 ./.github/codestyle/copyright.hook
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|py|sh)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
args:
- --maxkb=30720
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
files: (?!.*third_party)^.*$ | (?!.*book)^.*$
- id: end-of-file-fixer
- id: trailing-whitespace
- id: requirements-txt-fixer
- id: sort-simple-yaml
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
rev: v1.5.1
hooks:
- id: remove-crlf
files: (?!.*third_party)^.*$ | (?!.*book)^.*$
- id: remove-tabs
name: Tabs remover (C++)
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps)$
args: [--whitespaces-count, '2']
- id: remove-tabs
name: Tabs remover (Python)
files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
args: [--whitespaces-count, '4']
- repo: https://github.com/psf/black.git
rev: 23.3.0
hooks:
- id: black
args: [--line-length=127, --skip-string-normalization, --skip-magic-trailing-comma]
files: (.*\.(py|pyi|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
args: [--profile=black, --line-length=127, --multi-line=3, --force-grid-wrap=0]
files: \.py$
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
args: [--remove-all-unused-imports, --remove-unused-variables, --in-place, --ignore-init-module-imports, --ignore-pass-after-docstring]
files: \.py$
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks.git
rev: v2.9.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '4']
additional_dependencies: [setuptools<81]