Commit 07a41b53 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'pl-rubocop-inherit-mode-exclude' into 'master'

Use "merge" `inherit_mode` for `Exclude` in RuboCop configuration

See merge request gitlab-org/gitlab!54556
parents 07a79959 709f28d1
...@@ -18,6 +18,7 @@ inherit_from: ...@@ -18,6 +18,7 @@ inherit_from:
inherit_mode: inherit_mode:
merge: merge:
- Include - Include
- Exclude
AllCops: AllCops:
TargetRubyVersion: 2.7 TargetRubyVersion: 2.7
...@@ -597,3 +598,14 @@ FactoryBot/InlineAssociation: ...@@ -597,3 +598,14 @@ FactoryBot/InlineAssociation:
Include: Include:
- 'spec/factories/**/*.rb' - 'spec/factories/**/*.rb'
- 'ee/spec/factories/**/*.rb' - 'ee/spec/factories/**/*.rb'
# WIP: https://gitlab.com/gitlab-org/gitlab/-/issues/321982
Gitlab/NamespacedClass:
Exclude:
- 'config/**/*.rb'
- 'db/**/*.rb'
- 'ee/bin/**/*'
- 'ee/db/**/*.rb'
- 'ee/elastic/**/*.rb'
- 'scripts/**/*'
- 'spec/migrations/**/*.rb'
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
# - guidelines for use found in # - guidelines for use found in
# https://docs.gitlab.com/ee/development/contributing/style_guides.html#resolving-rubocop-exceptions. # https://docs.gitlab.com/ee/development/contributing/style_guides.html#resolving-rubocop-exceptions.
# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/267606
FactoryBot/InlineAssociation: FactoryBot/InlineAssociation:
Exclude: Exclude:
- 'ee/spec/factories/analytics/cycle_analytics/group_stages.rb' - 'ee/spec/factories/analytics/cycle_analytics/group_stages.rb'
...@@ -28,6 +29,7 @@ FactoryBot/InlineAssociation: ...@@ -28,6 +29,7 @@ FactoryBot/InlineAssociation:
- 'spec/factories/uploads.rb' - 'spec/factories/uploads.rb'
- 'spec/factories/wiki_pages.rb' - 'spec/factories/wiki_pages.rb'
# WIP: See https://gitlab.com/gitlab-org/gitlab/-/issues/220040
Rails/SaveBang: Rails/SaveBang:
Exclude: Exclude:
- 'ee/spec/controllers/projects/merge_requests_controller_spec.rb' - 'ee/spec/controllers/projects/merge_requests_controller_spec.rb'
...@@ -1174,22 +1176,9 @@ RSpec/AnyInstanceOf: ...@@ -1174,22 +1176,9 @@ RSpec/AnyInstanceOf:
- 'spec/workers/wait_for_cluster_creation_worker_spec.rb' - 'spec/workers/wait_for_cluster_creation_worker_spec.rb'
- 'ee/spec/workers/security/auto_fix_worker_spec.rb' - 'ee/spec/workers/security/auto_fix_worker_spec.rb'
# WIP: https://gitlab.com/gitlab-org/gitlab/-/issues/321982
Gitlab/NamespacedClass: Gitlab/NamespacedClass:
Exclude: Exclude:
- 'config/**/*.rb'
- 'db/**/*.rb'
- 'ee/bin/**/*'
- 'ee/db/**/*.rb'
- 'ee/elastic/**/*.rb'
- 'scripts/**/*'
- 'spec/migrations/**/*.rb'
# The list above represents the permanent exclusions for this rule
# due to the fact these files are related to infrastructure code.
# This list should eventually be moved to .rubocop.yml after all TODOs
# are addressed.
#
# The list below represents the classes that require
# a namespace as they make the domain related code.
- 'app/channels/issues_channel.rb' - 'app/channels/issues_channel.rb'
- 'app/controllers/abuse_reports_controller.rb' - 'app/controllers/abuse_reports_controller.rb'
- 'app/controllers/acme_challenges_controller.rb' - 'app/controllers/acme_challenges_controller.rb'
......
...@@ -161,6 +161,9 @@ To reveal existing RuboCop exceptions in the code that have been excluded via `. ...@@ -161,6 +161,9 @@ To reveal existing RuboCop exceptions in the code that have been excluded via `.
This allows you to reveal existing RuboCop exceptions during your daily work cycle and fix them along the way. This allows you to reveal existing RuboCop exceptions during your daily work cycle and fix them along the way.
NOTE:
Permanent `Exclude`s should be defined in `.rubocop.yml` instead of `.rubocop_manual_todo.yml`.
## Database migrations ## Database migrations
See the dedicated [Database Migrations Style Guide](../migration_style_guide.md). See the dedicated [Database Migrations Style Guide](../migration_style_guide.md).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment