From 01868c7724657729ba333521f982826d40b927d7 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Sat, 12 Feb 2022 23:08:27 +0000 Subject: [PATCH] feat(formulas): update linters to latest versions Tested across formulas and already prepared all necessary fixes (to be pushed out once this update has been): * https://saltstack-formulas.zulipchat.com/#narrow/stream/239693-CI/topic/myii-ci.2F2022-W06c --- .pre-commit-config.yaml | 8 ++++---- .rubocop.yml | 1 + ssf/defaults.yaml | 4 ++-- ssf/files/default/.pre-commit-config.yaml | 8 ++++---- ssf/files/default/.rubocop.yml | 4 +--- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c1a98ae..9a955989 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: additional_dependencies: ['@commitlint/config-conventional@8.3.4'] always_run: true - repo: https://github.com/rubocop-hq/rubocop - rev: v1.9.1 + rev: v1.25.1 hooks: - id: rubocop name: Check Ruby files with rubocop @@ -26,7 +26,7 @@ repos: always_run: true pass_filenames: false - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.7.1.1 + rev: v0.8.0.4 hooks: - id: shellcheck name: Check shell scripts with shellcheck @@ -34,7 +34,7 @@ repos: exclude: 'ssf/files/default/pre-commit_semantic-release.sh' types: [] - repo: https://github.com/adrienverge/yamllint - rev: v1.23.0 + rev: v1.26.3 hooks: - id: yamllint name: Check YAML syntax with yamllint @@ -42,7 +42,7 @@ repos: always_run: true pass_filenames: false - repo: https://github.com/warpnet/salt-lint - rev: v0.3.0 + rev: v0.8.0 hooks: - id: salt-lint name: Check Salt files using salt-lint diff --git a/.rubocop.yml b/.rubocop.yml index 640e95fd..be4e77e1 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -18,6 +18,7 @@ Security/YAMLLoad: # General settings across all cops in this formula AllCops: + NewCops: enable # Files to ignore completely Exclude: - ssf/files/**/* diff --git a/ssf/defaults.yaml b/ssf/defaults.yaml index 96a498a5..01d685c8 100644 --- a/ssf/defaults.yaml +++ b/ssf/defaults.yaml @@ -64,8 +64,8 @@ ssf_node_anchors: upstream: 'upstream' commit: # yamllint disable rule:line-length rule:quoted-strings - title: "chore: standardise structure [skip ci]" - body: '* Automated using https://github.com/myii/ssf-formula/pull/413' + title: "ci: update linters to latest versions [skip ci]" + body: '* Automated using https://github.com/myii/ssf-formula/pull/414' # yamllint enable rule:line-length rule:quoted-strings github: owner: 'saltstack-formulas' diff --git a/ssf/files/default/.pre-commit-config.yaml b/ssf/files/default/.pre-commit-config.yaml index 2d740a92..b70c9c7a 100644 --- a/ssf/files/default/.pre-commit-config.yaml +++ b/ssf/files/default/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: always_run: true {%- if travis.use_single_job_for_linters %} - repo: https://github.com/rubocop-hq/rubocop - rev: v1.9.1 + rev: v1.25.1 hooks: - id: rubocop name: Check Ruby files with rubocop @@ -28,7 +28,7 @@ repos: pass_filenames: false {%- endif %} - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.7.1.1 + rev: v0.8.0.4 hooks: - id: shellcheck name: Check shell scripts with shellcheck @@ -38,7 +38,7 @@ repos: {%- endif %} types: [] - repo: https://github.com/adrienverge/yamllint - rev: v1.23.0 + rev: v1.26.3 hooks: - id: yamllint name: Check YAML syntax with yamllint @@ -46,7 +46,7 @@ repos: always_run: true pass_filenames: false - repo: https://github.com/warpnet/salt-lint - rev: v0.3.0 + rev: v0.8.0 hooks: - id: salt-lint name: Check Salt files using salt-lint diff --git a/ssf/files/default/.rubocop.yml b/ssf/files/default/.rubocop.yml index 45ca7702..51171e70 100644 --- a/ssf/files/default/.rubocop.yml +++ b/ssf/files/default/.rubocop.yml @@ -27,10 +27,9 @@ - {{ path }} {%- endfor %} -{%- if rubocop.AllCops %} - # General settings across all cops in this formula AllCops: + NewCops: enable {#- This is purposefully simplistic for the time being, until (if ever) more advanced configuration is necessary #} {%- if rubocop.AllCops.get('Exclude', []) %} @@ -40,7 +39,6 @@ AllCops: - {{ path }} {%- endfor %} {%- endif %} -{%- endif %} # Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config` {%- for cop, config in rubocop.Cops.items() if cop not in [LLL, MBL, SYL] %}