-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
98 lines (89 loc) · 2.74 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
---
##### CI for use by github no need for action to be added
##### https://pre-commit.com/hooks.html
##### Inherited
ci:
autofix_prs: false
skip:
# This steps run in the ci workflow. Keep in sync
- ansible-lint
repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args:
- --ignore-words-list=ihs,ro,fo,iif
- --skip="./.*,*.csv,*.json"
- --quiet-level=2
exclude_types:
- csv
- json
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
# Safety
- id: detect-private-key
# git checks
- id: check-merge-conflict
- id: check-added-large-files
- id: check-case-conflict
# - id: no-commit-to-branch
# args: [--branch, main]
# General checks
- id: check-executables-have-shebangs
- id: trailing-whitespace
name: Trim Trailing Whitespace
description: This hook trims trailing whitespace.
entry: trailing-whitespace-fixer
language: python
types: [text]
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: check-toml
- id: check-json
- id: check-yaml
- id: mixed-line-ending
# - id: name-tests-test
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
additional_dependencies:
- prettier@3.0.3
- prettier-plugin-sort-json@3.0.1
exclude_types:
- python
# Scan for passwords
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.0
hooks:
- id: gitleaks
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0 # or higher tag
hooks:
- id: yamllint
# ANSIBLE --------------------------------------------------------------------
- repo: https://github.com/ansible-community/ansible-lint
rev: v6.21.1
hooks:
- id: ansible-lint
name: Ansible-lint
description: This hook runs ansible-lint.
entry: python3 -m ansiblelint -v --force-color -c .ansible-lint
language: python
# do not pass files to ansible-lint, see:
# https://github.com/ansible/ansible-lint/issues/611
pass_filenames: false
always_run: true
additional_dependencies:
# https://github.com/pre-commit/pre-commit/issues/1526
# If you want to use specific version of ansible-core or ansible, feel
# free to override `additional_dependencies` in your own hook config
# file.
- ansible-core>=2.13.3