-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
170 lines (168 loc) · 5.68 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
exclude: 'docs|.serverless|.serveless_nextjs|node_modules|migrations|.git|.tox|.gen'
default_language_version:
# force all unspecified python hooks to run python3
python: python3.8.0
repos:
- repo: https://github.com/pre-commit/pre-commit
rev: v2.10.1
hooks:
- id: validate_manifest
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.2.1
hooks:
- id: python-safety-dependencies-check
- repo: https://github.com/Lucas-C/pre-commit-hooks-bandit
rev: v1.0.4
hooks:
- id: python-bandit-vulnerability-check
args: []
files: .py$
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.6.0
hooks:
- id: pylint
exclude: __pycache__|migrations|conf.py|_build|.tox|pootle/static|pootle/translations|pootle/locale|pootle/assets|templates
args:
- --rcfile=.github/linters/.pylintrc
- --disable=no-name-in-module,import-error,ungrouped-imports
- --ignore=settings_test, migrations
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
hooks:
- id: mypy
args:
- --ignore-missing-imports
exclude: migrations|conf.py|_build|.tox|pootle/static|pootle/translations|pootle/locale|pootle/assets|templates
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: detect-private-key
files: ^(?!\.?git-crypt)
- id: check-merge-conflict
- id: trailing-whitespace
files: ^tf|-|\.(py|tfvars|tf|tfenv|env|yml|yaml|pem|key|mock)$
- id: end-of-file-fixer
files: ^tf|-|\.(py|env|yml|yaml|pem|key|mock)$
- id: check-added-large-files
files: ^tf|-|\.(py|env|yml|yaml)$
- id: check-case-conflict
- id: check-json
- id: check-xml
- id: check-yaml
- id: check-byte-order-marker
- id: check-ast
- id: debug-statements
- id: check-docstring-first
- id: requirements-txt-fixer
- id: check-symlinks
- id: name-tests-test
args:
- --django
- id: file-contents-sorter
- id: fix-encoding-pragma
- id: sort-simple-yaml
- id: mixed-line-ending
fix: lr
- id: check-executables-have-shebangs
- repo: https://github.com/tcassou/python-pre-commit-hooks
rev: 3383e2f83463370cf4651040fb697a636bb0374e
hooks:
- id: do_not_commit
- repo: https://github.com/asottile/blacken-docs
rev: v1.9.2
hooks:
- id: blacken-docs
additional_dependencies:
- black
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.47.0
hooks:
- id: terraform_fmt
- id: terraform_docs
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.7.1.1
hooks:
- id: shellcheck
exclude: (^provision/script/wait-for-it.sh$|^provision/git/hooks/prepare-commit-msg$)
args:
- --exclude=SC1072,SC1073,SC2068
- repo: https://github.com/IamTheFij/docker-pre-commit
rev: v2.0.0
hooks:
- id: docker-compose-check
- repo: local
hooks:
- id: prettier
name: prettier
language: system
entry: ./node_modules/prettier/bin-prettier.js
args:
- '--write=true'
- '--list-different'
- '--config=.github/linters/prettier.config.js'
- '--ignore-path=.github/linters/.prettierignore'
exclude: node_modules
- id: eslint
name: eslint
language: system
pass_filenames: true
entry: node_modules/eslint/bin/eslint.js --config=.github/linters/.eslintrc.js --ignore-path=.github/linters/.eslintignore --color
args:
- '--fix'
files: \.(js|jsx|ts|tsx|mjs|d.ts)$
- id: stylint
name: stylint
language: system
pass_filenames: true
entry: node_modules/stylelint/bin/stylelint.js --config=.github/linters/.stylintrc --syntax less **/*.less
args: [--fix]
files: \.(css|scss|sass)$
- id: dockerfile-provides-entrypoint
name: hadolint
description: Lint Dockerfiles with hadolint
language: docker_image
entry: --entrypoint /bin/hadolint hadolint/hadolint:latest --ignore DL3008 --ignore DL3013 --ignore DL3018 --ignore DL3008 --ignore DL4006 --ignore SC2001 --ignore SC2086 --ignore SC2102 -
types: [file]
files: Dockerfile(.*)
- id: ansible-lint
files: \.(yml|yaml)$
name: ansible-lint
description: This hook runs ansible-lint.
language: python
entry: ansible-lint --force-color
additional_dependencies:
# https://github.com/pre-commit/pre-commit/issues/1526
# if you want to use only the base ansible version for linting,
# replace 'community' extra with 'core' or just mention the exact
# version of Ansible you want to install as a dependency.
- .[community,yamllint]
exclude: >
(?x)^(
\.travis\.yml|
molecule/.*/\.molecule/.*|
\.pre-commit-config.yaml|
docker-compose.yml|
mkdocs.yml|
provision/*|
molecule/.*/create\.yml
)$
- id: ansible-lint-travis
name: ansible-lint-travis
language: python
entry: ansible-lint --force-color
files: \.travis\.yml
args: [-x, ANSIBLE0008]
- id: ansible-lint
name: ansible-lint-molecule
language: python
entry: ansible-lint --force-color
files: molecule/.*/create\.yml
args: [-x, ANSIBLE0016]