forked from pycontribs/mk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
103 lines (103 loc) · 3.06 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
---
ci:
skip: [markdownlint_docker]
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
# keep it before yamllint
rev: v3.0.0-alpha.4
hooks:
- id: prettier
# Temporary excludes so we can gradually normalize the formatting
exclude: >
(?x)^(
.*\.md$|
examples/other/some.j2.yaml|
examples/playbooks/example.yml|
examples/playbooks/multiline-brackets.*|
examples/playbooks/templates/not-valid.yaml|
examples/playbooks/with-umlaut-.*|
examples/playbooks/with-skip-tag-id.yml|
examples/yamllint/.*|
examples/playbooks/collections/.*|
test/fixtures/formatting-before/.*|
test/schemas/data/.*|
test/schemas/(negative_test|test)/.*\.md|
src/ansiblelint/schemas/(molecule|tasks|playbook|rulebook).json|
src/ansiblelint/schemas/ansible-navigator-config.json
)$
always_run: true
additional_dependencies:
- prettier
- prettier-plugin-toml
- prettier-plugin-sort-json
- repo: https://github.com/markdownlint/markdownlint.git
rev: v0.12.0
hooks:
- id: markdownlint_docker
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args:
# https://github.com/pre-commit/mirrors-isort/issues/9#issuecomment-624404082
- --filter-files
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
args: [--safe]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
language_version: python3
- repo: https://github.com/pycqa/flake8.git
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-absolute-import
- flake8-black>=0.1.1
- flake8-docstrings>=1.5.0
language_version: python3
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.29.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.1
hooks:
- id: mypy
# mypy args needed in order to match mypy cli behavior
args: ["--python-version", "3.8"]
entry: mypy src/
pass_filenames: false
additional_dependencies:
- diskcache
- importlib-metadata
- packaging
- rich
- subprocess-tee
- typer>=0.7.0
- repo: https://github.com/pycqa/pylint
rev: v2.16.3
hooks:
- id: pylint
additional_dependencies:
- GitPython
- click-help-colors
- diskcache
- importlib-metadata
- pytest
- rich
- subprocess-tee
- typer>=0.7.0