diff options
Diffstat (limited to 'gems/config/rubocop.yml')
-rw-r--r-- | gems/config/rubocop.yml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gems/config/rubocop.yml b/gems/config/rubocop.yml index a97d759b471..58746de53b0 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 @@ -57,6 +65,10 @@ Graphql/AuthorizeTypes: Graphql/Descriptions: Enabled: false +# This cop doesn't make sense in the context of gems +RSpec/BeforeAll: + Enabled: false + Naming/FileName: Exclude: - spec/**/*.rb |