|
| 1 | +--- |
| 2 | +##### CI for use by github no need for action to be added |
| 3 | +##### Inherited |
| 4 | +ci: |
| 5 | + autofix_prs: false |
| 6 | + skip: [detect-aws-credentials, ansible-lint ] |
| 7 | + |
| 8 | +repos: |
| 9 | +- repo: https://github.com/pre-commit/pre-commit-hooks |
| 10 | + rev: v3.2.0 |
| 11 | + hooks: |
| 12 | + # Safety |
| 13 | + - id: detect-aws-credentials |
| 14 | + - id: detect-private-key |
| 15 | + |
| 16 | + # git checks |
| 17 | + - id: check-merge-conflict |
| 18 | + - id: check-added-large-files |
| 19 | + - id: check-case-conflict |
| 20 | + |
| 21 | + # General checks |
| 22 | + - id: trailing-whitespace |
| 23 | + name: Trim Trailing Whitespace |
| 24 | + description: This hook trims trailing whitespace. |
| 25 | + entry: trailing-whitespace-fixer |
| 26 | + language: python |
| 27 | + types: [text] |
| 28 | + args: [--markdown-linebreak-ext=md] |
| 29 | + - id: end-of-file-fixer |
| 30 | + |
| 31 | +# Scan for passwords |
| 32 | +- repo: https://github.com/Yelp/detect-secrets |
| 33 | + rev: v1.4.0 |
| 34 | + hooks: |
| 35 | + - id: detect-secrets |
| 36 | + args: [ '--baseline', '.config/.secrets.baseline' ] |
| 37 | + exclude: .config/.gitleaks-report.json |
| 38 | + |
| 39 | +- repo: https://github.com/gitleaks/gitleaks |
| 40 | + rev: v8.17.0 |
| 41 | + hooks: |
| 42 | + - id: gitleaks |
| 43 | + args: ['--baseline-path', '.config/.gitleaks-report.json'] |
| 44 | + |
| 45 | +- repo: https://github.com/ansible-community/ansible-lint |
| 46 | + rev: v6.17.2 |
| 47 | + hooks: |
| 48 | + - id: ansible-lint |
| 49 | + name: Ansible-lint |
| 50 | + description: This hook runs ansible-lint. |
| 51 | + entry: python3 -m ansiblelint --force-color site.yml -c .ansible-lint |
| 52 | + language: python |
| 53 | + # do not pass files to ansible-lint, see: |
| 54 | + # https://github.com/ansible/ansible-lint/issues/611 |
| 55 | + pass_filenames: false |
| 56 | + always_run: true |
| 57 | + additional_dependencies: |
| 58 | + # https://github.com/pre-commit/pre-commit/issues/1526 |
| 59 | + # If you want to use specific version of ansible-core or ansible, feel |
| 60 | + # free to override `additional_dependencies` in your own hook config |
| 61 | + # file. |
| 62 | + - ansible-core>=2.10.1 |
| 63 | + |
| 64 | +- repo: https://github.com/adrienverge/yamllint.git |
| 65 | + rev: v1.32.0 # or higher tag |
| 66 | + hooks: |
| 67 | + - id: yamllint |
0 commit comments