mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
updated lint files
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
0a8d8abf1e
commit
f3ef69d54c
3 changed files with 27 additions and 29 deletions
|
|
@ -3,20 +3,7 @@
|
|||
parseable: true
|
||||
quiet: true
|
||||
skip_list:
|
||||
- 'schema'
|
||||
- 'no-changed-when'
|
||||
- 'var-spacing'
|
||||
- 'experimental'
|
||||
- 'name[play]'
|
||||
- 'name[casing]'
|
||||
- 'name[template]'
|
||||
- 'key-order[task]'
|
||||
- '204'
|
||||
- '305'
|
||||
- '303'
|
||||
- '403'
|
||||
- '306'
|
||||
- '602'
|
||||
- '208'
|
||||
- 'package-latest'
|
||||
- 'risky-shell-pipe'
|
||||
use_default_rules: true
|
||||
verbosity: 0
|
||||
|
|
|
|||
|
|
@ -7,16 +7,21 @@ ci:
|
|||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.6.0
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
# Safety
|
||||
- id: detect-aws-credentials
|
||||
name: Detect AWS Credentials
|
||||
- id: detect-private-key
|
||||
name: Detect Private Keys
|
||||
|
||||
# git checks
|
||||
- id: check-merge-conflict
|
||||
name: Check for merge conflicts
|
||||
- id: check-added-large-files
|
||||
name: Check for Large files
|
||||
- id: check-case-conflict
|
||||
name: Check case conflict
|
||||
|
||||
# General checks
|
||||
- id: trailing-whitespace
|
||||
|
|
@ -27,21 +32,21 @@ repos:
|
|||
types: [text]
|
||||
args: [--markdown-linebreak-ext=md]
|
||||
- id: end-of-file-fixer
|
||||
name: Ensure line at end of file
|
||||
|
||||
# Scan for passwords
|
||||
- repo: https://github.com/Yelp/detect-secrets
|
||||
rev: v1.5.0
|
||||
hooks:
|
||||
- id: detect-secrets
|
||||
exclude: templates/etc/security/pwquality.conf.d/50-pwcomplexity.conf.j2
|
||||
|
||||
- repo: https://github.com/gitleaks/gitleaks
|
||||
rev: v8.18.4
|
||||
rev: v8.21.2
|
||||
hooks:
|
||||
- id: gitleaks
|
||||
|
||||
- repo: https://github.com/ansible-community/ansible-lint
|
||||
rev: v24.7.0
|
||||
rev: v24.10.0
|
||||
hooks:
|
||||
- id: ansible-lint
|
||||
name: Ansible-lint
|
||||
|
|
@ -52,14 +57,15 @@ repos:
|
|||
# https://github.com/ansible/ansible-lint/issues/611
|
||||
pass_filenames: false
|
||||
always_run: true
|
||||
additional_dependencies:
|
||||
# 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.10.1
|
||||
# - ansible-core>=2.10.1
|
||||
|
||||
- repo: https://github.com/adrienverge/yamllint.git
|
||||
rev: v1.35.1 # or higher tag
|
||||
hooks:
|
||||
- id: yamllint
|
||||
name: Check YAML Lint
|
||||
|
|
|
|||
21
.yamllint
21
.yamllint
|
|
@ -1,32 +1,37 @@
|
|||
---
|
||||
extends: default
|
||||
|
||||
ignore: |
|
||||
tests/
|
||||
molecule/
|
||||
.github/
|
||||
.gitlab-ci.yml
|
||||
*molecule.yml
|
||||
|
||||
rules:
|
||||
indentation:
|
||||
# Requiring 4 space indentation
|
||||
spaces: 2
|
||||
# Requiring consistent indentation within a file, either indented or not
|
||||
indent-sequences: consistent
|
||||
braces:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
brackets:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
comments:
|
||||
ignore-shebangs: true
|
||||
min-spaces-from-content: 1 # prettier compatibility
|
||||
comments-indentation: enable
|
||||
empty-lines:
|
||||
max: 1
|
||||
line-length: disable
|
||||
indentation:
|
||||
# Requiring 2 space indentation
|
||||
spaces: 2
|
||||
# Requiring consistent indentation within a file, either indented or not
|
||||
indent-sequences: consistent
|
||||
key-duplicates: enable
|
||||
line-length: disable
|
||||
new-line-at-end-of-file: enable
|
||||
new-lines:
|
||||
type: unix
|
||||
octal-values:
|
||||
forbid-implicit-octal: true # yamllint defaults to false
|
||||
forbid-explicit-octal: true
|
||||
trailing-spaces: enable
|
||||
truthy:
|
||||
allowed-values: ['true', 'false']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue