diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 18:09:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 18:09:55 +0300 |
commit | 25ed642226db28550270b850280462dad124fd61 (patch) | |
tree | e2f64fb49d0a56cf4f10fad32b806a981ee55700 /gems | |
parent | 3ca9a972f6bc4060a58703398df74d87703916cf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'gems')
-rw-r--r-- | gems/config/rubocop.yml | 8 | ||||
-rw-r--r-- | gems/gem.gitlab-ci.yml | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gems/config/rubocop.yml b/gems/config/rubocop.yml index a97d759b471..32fd3cd8987 100644 --- a/gems/config/rubocop.yml +++ b/gems/config/rubocop.yml @@ -1,3 +1,11 @@ +# We need to ignore exclusions defined in parent RuboCop configuration +# (AllCops/Exclude: 'gems/**/*') if RuboCop cop is run within `gems/...`. +# See https://gitlab.com/gitlab-org/gitlab/-/issues/417281 +<% + relative_path = ENV['PWD'].delete_prefix(File.expand_path('../..')) + RuboCop::ConfigLoader.ignore_parent_exclusion = relative_path.start_with?('/gems/') +%> +--- inherit_gem: gitlab-styles: - rubocop-default.yml diff --git a/gems/gem.gitlab-ci.yml b/gems/gem.gitlab-ci.yml index 10905d8c243..5f7a6ba280a 100644 --- a/gems/gem.gitlab-ci.yml +++ b/gems/gem.gitlab-ci.yml @@ -52,7 +52,7 @@ rubocop: rules: - exists: ["$[[inputs.gem_path_prefix]]$[[inputs.gem_name]]/.rubocop.yml"] script: - - bundle exec rubocop --config .rubocop.yml + - bundle exec rubocop rspec: extends: .ruby_matrix |