Open konstruktoid opened 8 months ago
Thanks @konstruktoid for creating the issue!
I tried to validate the YAML online and it shows it as valid YAML.
I believe this is failing yamllint checks for indentation and I am wondering if different repos/ users might have different config for yamllint or is this a standard check which is failing?
Yeah, as all linters it's a bit opinionated and this issue should probably be low priority.
But using eg https://www.yamllint.com, will turn the file from
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.3
hooks:
- id: gitleaks
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shellcheck
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
and into
---
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.3
hooks:
- id: gitleaks
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shellcheck
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
yamllint
indentation rules: https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.indentation
The ---
isn't required.
https://github.com/konstruktoid/ansible-role-hardening/pull/456/files#diff-63a9c44a44acf85fea213a857769990937107cf072831e1a26808cfde9d096b9