Skip to content

Commit

Permalink
feat(formulas): update linters to latest versions
Browse files Browse the repository at this point in the history
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
  • Loading branch information
myii committed Feb 12, 2022
1 parent a7e65cc commit 01868c7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@ 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
args: [--debug]
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
files: ^.*\.(sh|bash|ksh)$
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
args: [--strict, '.']
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
Expand Down
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Security/YAMLLoad:

# General settings across all cops in this formula
AllCops:
NewCops: enable
# Files to ignore completely
Exclude:
- ssf/files/**/*
Expand Down
4 changes: 2 additions & 2 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 4 additions & 4 deletions ssf/files/default/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -38,15 +38,15 @@ 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
args: [--strict, '.']
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
Expand Down
4 changes: 1 addition & 3 deletions ssf/files/default/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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', []) %}
Expand All @@ -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] %}
Expand Down

0 comments on commit 01868c7

Please sign in to comment.