forked from ocf/puppet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
72 lines (72 loc) · 2.35 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
repos:
- repo: https://github.com/chriskuehl/puppet-pre-commit-hooks.git
rev: v2.1.0
hooks:
- id: puppet-validate
additional_dependencies: ['puppet:<7']
- id: erb-validate
additional_dependencies: ['puppet:<7']
- id: puppet-lint
args:
- --fail-on-warnings
- --fix
- --no-140chars-check
- --no-documentation-check
- --no-puppet_url_without_modules-check
- --no-arrow_on_right_operand_line-check
- --no-variable_is_lowercase-check
additional_dependencies: ['puppet:<7', 'puppet-lint']
- id: epp-validate
additional_dependencies: ['puppet:<7']
- id: r10k-validate
additional_dependencies: ['puppet:<7', 'r10k']
- id: ruby-validate
additional_dependencies: ['puppet:<7']
- repo: https://github.com/pre-commit/pre-commit-hooks.git
# We need to be using python3.6 by default before this can be upgraded to 3.x+
rev: v2.5.0
hooks:
- id: check-added-large-files
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-xml
exclude: ^modules/ocf_desktop/files/pam/.*\.xml$
- id: check-yaml
args:
- --allow-multiple-documents
- id: debug-statements
- id: double-quote-string-fixer
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
exclude: \.preseed$
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.5.4
hooks:
- id: autopep8
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
language_version: python3.5
- repo: https://github.com/asottile/reorder_python_imports.git
# We need to be using python3.6 by default before this can be upgraded to 2.x+
rev: v1.9.0
hooks:
- id: reorder-python-imports
- repo: local
hooks:
- id: no-resource-defaults
language: pygrep
name: No resource defaults are used (see https://github.com/ocf/puppet/pull/58)
entry: ^\s*[A-Z][A-Za-z0-9:]+\s*{
types: [puppet]
exclude: ^manifests/
- repo: https://github.com/detailyang/pre-commit-shell.git
rev: v1.0.6
hooks:
- id: shell-lint
exclude: ^(.deactivate.sh)$