Skip to content

Commit 71dbf34

Browse files
committed
ci(pre-commit): enable rubocop linter after fix
`rubocop` violations fixed in 1a4d208. * Automated using myii/ssf-formula#284
1 parent f1f94d4 commit 71dbf34

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ repos:
1717
stages: [manual]
1818
additional_dependencies: ['@commitlint/[email protected]']
1919
always_run: true
20+
- repo: https://github.com/adithyabsk/mirrors-rubocop
21+
rev: v0.91.0
22+
hooks:
23+
- id: rubocop
24+
name: Check Ruby files with rubocop
25+
args: [--debug]
26+
always_run: true
27+
pass_filenames: false
2028
- repo: https://github.com/jumanjihouse/pre-commit-hooks
2129
rev: 2.1.3
2230
hooks:

.travis.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,14 @@ stages:
3636
# - name: 'release'
3737
# if: 'branch = master AND type != pull_request'
3838
jobs:
39-
allow_failures:
40-
- env: Lint_rubocop
41-
fast_finish: true
4239
include:
4340
## Define the test stage that runs the linters (and testing matrix, if applicable)
4441

45-
# Run all of the linters in a single job (except `rubocop`)
42+
# Run all of the linters in a single job
4643
- language: 'node_js'
4744
node_js: 'lts/*'
4845
env: 'Lint'
49-
name: 'Lint: salt-lint, yamllint, shellcheck & commitlint'
46+
name: 'Lint: salt-lint, yamllint, rubocop, shellcheck & commitlint'
5047
before_install: 'skip'
5148
script:
5249
# Install and run `salt-lint`
@@ -57,6 +54,9 @@ jobs:
5754
# Need at least `v1.17.0` for the `yaml-files` setting
5855
- pip install --user yamllint>=1.17.0
5956
- yamllint -s .
57+
# Install and run `rubocop`
58+
- gem install rubocop
59+
- rubocop -d
6060
# Run `shellcheck` (already pre-installed in Travis)
6161
- shellcheck --version
6262
- git ls-files -- '*.sh' '*.bash' '*.ksh'
@@ -65,17 +65,6 @@ jobs:
6565
- npm i -D @commitlint/config-conventional
6666
@commitlint/travis-cli
6767
- commitlint-travis
68-
# Run the `rubocop` linter in a separate job that is allowed to fail
69-
# Once these lint errors are fixed, this can be merged into a single job
70-
- language: node_js
71-
node_js: lts/*
72-
env: Lint_rubocop
73-
name: 'Lint: rubocop'
74-
before_install: skip
75-
script:
76-
# Install and run `rubocop`
77-
- gem install rubocop
78-
- rubocop -d
7968

8069
# Run `pre-commit` linters in a single job
8170
- language: 'python'

0 commit comments

Comments
 (0)