-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
111 lines (98 loc) · 2.73 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
# -*- mode: yaml -*-
# vim:ts=2:sw=2:ai:si:syntax=yaml
#
# pre-commit hook configuration
# https://pre-commit.com/
---
minimum_pre_commit_version: "2.7.0"
default_language_version:
python: python3
node: "12.14.1"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v3.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
- id: check-ast
- id: requirements-txt-fixer
# Format JSON, Markdown and YAML files with Prettier.
- repo: https://github.com/prettier/prettier
rev: "2.1.1"
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]
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
# Do not run on Git push
stages: [commit]
exclude: ^playbooks/library/luarocks\.py$
- repo: https://gitlab.com/pycqa/flake8
rev: "3.8.3"
hooks:
- id: flake8
exclude: ^playbooks/library/luarocks\.py$
# 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: python -m pylint
types: [python]
language: system
require_serial: false
exclude: ^playbooks/library/luarocks\.py$
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.24.2
hooks:
- id: yamllint
- repo: https://github.com/ansible/ansible-lint.git
rev: v4.3.3
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
- repo: https://github.com/syntaqx/git-hooks
rev: v0.0.16
hooks:
- id: shellcheck
- id: shfmt
args: ["-l", "-i", "4", "-ci", "-w"]
- repo: https://github.com/openstack-dev/bashate.git
rev: "2.0.0"
hooks:
- id: bashate
args: ["-i", "E006"]
verbose: false
- repo: https://github.com/igorshubovych/markdownlint-cli.git
rev: v0.23.2
hooks:
- id: markdownlint
- repo: https://github.com/markosamuli/pre-commit-travis-lint
rev: v1.8.8
hooks:
- id: travis-lint
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook.git
rev: v3.0.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
verbose: false