From 6484302013c951a2d34579e17c8eca3c8c16cfd8 Mon Sep 17 00:00:00 2001 From: Mark Bolwell Date: Fri, 6 Dec 2024 14:16:05 +0000 Subject: [PATCH] updated lint files Signed-off-by: Mark Bolwell --- .ansible-lint | 18 ++---------------- .pre-commit-config.yaml | 12 ++++++------ .yamllint | 21 ++++++++++++++------- 3 files changed, 22 insertions(+), 29 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index c7095e2..3b7c373 100755 --- a/.ansible-lint +++ b/.ansible-lint @@ -3,21 +3,7 @@ parseable: true quiet: true skip_list: - - 'schema' - - 'no-changed-when' - - 'var-spacing' - - 'experimental' - - 'name[play]' - - 'name[casing]' - - 'name[template]' - - 'key-order[task]' - - 'yaml[line-length]' - - '204' - - '305' - - '303' - - '403' - - '306' - - '602' - - '208' + - 'package-latest' + - 'risky-shell-pipe' use_default_rules: true verbosity: 0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9e462a3..d346307 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,12 +2,12 @@ ##### CI for use by github no need for action to be added ##### Inherited ci: - autofix_prs: false - skip: [detect-aws-credentials, ansible-lint ] + autofix_prs: false + skip: [detect-aws-credentials, ansible-lint ] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: # Safety - id: detect-aws-credentials @@ -35,12 +35,12 @@ repos: - id: detect-secrets - 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.6.1 + rev: v24.10.0 hooks: - id: ansible-lint name: Ansible-lint @@ -56,7 +56,7 @@ repos: # 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 diff --git a/.yamllint b/.yamllint index dff2457..78eb3e2 100755 --- a/.yamllint +++ b/.yamllint @@ -1,31 +1,38 @@ --- - extends: default - +locale: en_US.UTF-8 ignore: | tests/ molecule/ .github/ .gitlab-ci.yml *molecule.yml - rules: - indentation: - # 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: false 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']