-
Notifications
You must be signed in to change notification settings - Fork 19
/
.pre-commit-config.yaml
106 lines (93 loc) · 2.6 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
# -*- mode: yaml -*-
# vim:ts=2:sw=2:ai:si:syntax=yaml
---
minimum_pre_commit_version: 2.0.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.2.0
hooks:
- id: check-executables-have-shebangs
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-merge-conflict
- id: trailing-whitespace
args: ["--markdown-linebreak-ext=md"]
- id: end-of-file-fixer
- id: mixed-line-ending
args: ["--fix=lf"]
- id: check-yaml
# Format JSON, Markdown and YAML files with Prettier.
- repo: https://github.com/pre-commit/mirrors-prettier.git
rev: "v2.6.2"
hooks:
- id: prettier
name: Format JSON, Markdown and YAML files
files: "\\.(\
json\
|md|markdown|mdown|mkdn\
|yaml|yml\
)$"
# Do not run on Git push
stages: [commit]
verbose: false
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.3
hooks:
- id: yamllint
- repo: https://github.com/ansible/ansible-lint.git
rev: v6.0.2
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
- repo: https://github.com/syntaqx/git-hooks
rev: v0.0.17
hooks:
- id: shellcheck
- id: shfmt
args: ["-l", "-i", "4", "-ci", "-w"]
- repo: https://github.com/openstack-dev/bashate.git
rev: "2.1.0"
hooks:
- id: bashate
verbose: false
- repo: https://github.com/igorshubovych/markdownlint-cli.git
rev: v0.31.1
hooks:
- id: markdownlint
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
# Do not run on Git push
stages: [commit]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
- repo: https://github.com/jazzband/pip-tools
rev: 6.6.0
hooks:
- id: pip-compile
files: ^requirements\.dev\.(in|txt)$
args: [requirements.dev.in, --output-file, requirements.dev.txt]
# Validate Python code with pylint using local environment
# to avoid 'import-error' issues.
- repo: local
hooks:
- id: pylint
name: Lint Python files with pylint
entry: ./scripts/pylint.sh
types: [python]
language: system
require_serial: false
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook.git
rev: "v8.0.0"
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
verbose: false