-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
102 lines (92 loc) · 2.45 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
# 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.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-added-large-files
- repo: https://github.com/adrienverge/yamllint
rev: v1.27.1
hooks:
- id: yamllint
name: Lint GitHub Action workflow files
files: ^\.github/workflows/
args:
- -d
- >
{
extends: default,
rules: {
document-start:{
present: true,
level: warning
},
line-length: {
max: 88,
level: warning
},
indentation: {
spaces: 2,
indent-sequences: false,
level: warning
}
}
}
- repo: https://github.com/zricethezav/gitleaks
rev: v8.8.12
hooks:
- id: gitleaks
name: 🔍 Check git leaks
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.6
hooks:
- id: shellcheck
- id: shfmt
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
name: 🐍 Format Python code PEP8
args:
- --line-length=88
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
name: 🐍 Check Python code
args:
- --max-line-length=88
- --ignore=F841,W503
- --exclude=attention_utils/**
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: 🐍 Sort Python imports
# - repo: https://github.com/asottile/pyupgrade
# rev: v2.29.1
# hooks:
# - id: pyupgrade
# name: 🐍 Upgrade Python code
# args: [--py36-plus]
# Black and flake8 for notebook
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.3.1
hooks:
- id: nbqa-black
- id: nbqa-flake8
- id: nbqa-isort
# Lint Dockerfile
- repo: https://github.com/hadolint/hadolint
rev: v2.10.0
hooks:
- id: hadolint
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.28.0
hooks:
- id: commitizen
stages: [commit-msg]