Skip to content

Reduce amount of CI jobs on "static analysis config"-only changes

Peter Leitzen requested to merge pl-ci-rubocop-patterns into master

What does this MR do and why?

Previously, the following patterns have been considered code changes:

  • .rubocop.yml
  • .rubocop_todo.yml
  • .rubocop_todo/**/*.yml
  • .codeclimate.yml
  • .eslintrc.yml
  • .haml-lint.yml
  • .haml-lint_todo.yml

A sole change in one of these files triggered a full fledge test suite run.

For example, MRs with .rubocop_todo/**/*.yml-only changes now only run 11 jobs as opposed to 98 jobs.

Note that changes to nested RuboCop YAML configuration (like lib/gitlab/background_migration/.rubocop.yml) is still treated as code changes because rules:changes only support file paths with globs but not negative lookaheads.

Refs !76067 (merged).

Validation

regenerate RuboCop todos .rubocop.yml changes .haml-lint.yml code
rubocop rubocop haml specs including rubocop
https://gitlab.com/gitlab-org/gitlab/-/pipelines/573398711 Screenshot_from_2022-06-27_00-35-36 https://gitlab.com/gitlab-org/gitlab/-/pipelines/573401057 Screenshot_from_2022-06-27_00-50-54 https://gitlab.com/gitlab-org/gitlab/-/pipelines/573756692 Screenshot_from_2022-06-27_00-53-12 https://gitlab.com/gitlab-org/gitlab/-/pipelines/573401298 Screenshot_from_2022-06-27_00-53-12

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports