forked from ocf/puppet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
66 lines (66 loc) · 2.2 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
repos:
- repo: https://github.com/chriskuehl/puppet-pre-commit-hooks.git
rev: v2.1.0
hooks:
- id: puppet-validate
# TODO: Remove this version pinning. The problem here seems to be that
# the Debian-packaged versions of the semantic_puppet gem
# (ruby-semantic-puppet package) cause some kind of error with locale
# loading for puppet validation. A bug probably needs to be opened with
# the Debian package maintainers or with semantic_puppet depending on
# who is actually causing the error.
additional_dependencies: ['puppet:<5']
- id: erb-validate
- 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
- id: epp-validate
- id: r10k-validate
- id: ruby-validate
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v2.2.1
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.4.4
hooks:
- id: autopep8
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.7
hooks:
- id: flake8
language_version: python3.5
- repo: https://github.com/asottile/reorder_python_imports.git
rev: v1.4.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/