Skip to content

Commit fddea73

Browse files
committed
ci(gitlab-ci): add rubocop linter (with allow_failure) [skip ci]
* Automated using myii/ssf-formula#277
1 parent f58d76f commit fddea73

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.gitlab-ci.yml

+14
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
image_precommit: &image_precommit
1919
name: 'myii/ssf-pre-commit:2.9.2'
2020
entrypoint: ['/bin/bash', '-c']
21+
image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest'
2122
image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14'
2223
# `services`
2324
services_docker_dind: &services_docker_dind
@@ -84,6 +85,19 @@ pre-commit:
8485
script:
8586
- 'pre-commit run --all-files --color always --verbose'
8687

88+
# Use a separate job for `rubocop` other than the one potentially run by `pre-commit`
89+
# - The `pre-commit` check will only be available for formulas that pass the default
90+
# `rubocop` check -- and must continue to do so
91+
# - This job is allowed to fail, so can be used for all formulas
92+
# - Furthermore, this job uses all of the latest `rubocop` features & cops,
93+
# which will help when upgrading the `rubocop` linter used in `pre-commit`
94+
rubocop:
95+
allow_failure: true
96+
stage: *stage_lint
97+
image: *image_rubocop
98+
script:
99+
- 'rubocop -d -P -S --enable-pending-cops'
100+
87101
###############################################################################
88102
# Define `test` template
89103
###############################################################################

0 commit comments

Comments
 (0)