summaryrefslogtreecommitdiff
path: root/.rubocop.yml
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 11:33:21 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 11:33:21 +0000
commit7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch)
tree5bdc2229f5198d516781f8d24eace62fc7e589e9 /.rubocop.yml
parent185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff)
downloadgitlab-ce-7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0.tar.gz
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to '.rubocop.yml')
-rw-r--r--.rubocop.yml69
1 files changed, 62 insertions, 7 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index b84effd5b16..d0cf328e719 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -289,11 +289,6 @@ Rails/InverseOf:
Rails/UniqueValidationWithoutIndex:
Enabled: false
-Rails/HasManyOrHasOneDependent:
- Include:
- - app/models/**/*.rb
- - ee/app/models/**/*.rb
-
Rails/HelperInstanceVariable:
Include:
- app/helpers/**/*.rb
@@ -308,6 +303,26 @@ Rails/RakeEnvironment:
# Context on why it's disabled: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/93419#note_1048223982
Enabled: false
+# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/94064#note_1157289970
+Rails/SquishedSQLHeredocs:
+ Enabled: false
+
+# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/96675#note_1094403693
+Rails/WhereExists:
+ Enabled: false
+
+# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/94061#note_1160343775
+Rails/SkipsModelValidations:
+ Enabled: false
+
+# See https://gitlab.com/gitlab-org/gitlab/-/issues/378105#note_1138487716
+Rails/HasManyOrHasOneDependent:
+ Enabled: false
+
+# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/94019#note_1139714728
+Rails/CreateTableWithTimestamps:
+ Enabled: false
+
# GitLab ###################################################################
Gitlab/ModuleWithInstanceVariables:
@@ -384,7 +399,13 @@ Database/MultipleDatabases:
- 'spec/lib/gitlab/background_migration/**/*.rb'
- 'spec/lib/gitlab/database/**/*.rb'
-Gitlab/DuplicateSpecLocation:
+# See https://gitlab.com/gitlab-org/gitlab/-/issues/373194
+Gitlab/RSpec/AvoidSetup:
+ Enabled: true
+ Include:
+ - 'ee/spec/features/registrations/saas/**/*'
+
+RSpec/DuplicateSpecLocation:
Enabled: true
Gitlab/PolicyRuleBoolean:
@@ -465,9 +486,17 @@ RSpec/FactoriesInMigrationSpecs:
RSpec/FactoryBot/AvoidCreate:
Enabled: true
Include:
+ - 'spec/presenters/**/*.rb'
- 'spec/serializers/**/*.rb'
+ - 'ee/spec/presenters/**/*.rb'
- 'ee/spec/serializers/**/*.rb'
+RSpec/FactoryBot/StrategyInCallback:
+ Enabled: true
+ Include:
+ - 'spec/factories/**/*.rb'
+ - 'ee/spec/factories/**/*.rb'
+
Cop/IncludeSidekiqWorker:
Enabled: true
Exclude:
@@ -582,6 +611,18 @@ Graphql/Descriptions:
- 'app/graphql/**/*'
- 'ee/app/graphql/**/*'
+Graphql/EnumNames:
+ Enabled: true
+ Include:
+ - 'app/graphql/**/*'
+ - 'ee/app/graphql/**/*'
+
+Graphql/EnumValues:
+ Enabled: true
+ Include:
+ - 'app/graphql/**/*'
+ - 'ee/app/graphql/**/*'
+
# Cops for upgrade to gitlab-styles 3.1.0
RSpec/ImplicitSubject:
Enabled: false
@@ -704,12 +745,17 @@ Migration/PreventIndexCreation:
- !ruby/regexp /\Adb\/(post_)?migrate\/2020.*\.rb\z/
- !ruby/regexp /\Adb\/(post_)?migrate\/20210[1-6].*\.rb\z/
+Migration/SchemaAdditionMethodsNoPost:
+ Enabled: true
+ Include:
+ - db/post_migrate/*.rb
+ EnforcedSince: 20221024034228
+
Gitlab/RailsLogger:
Exclude:
- 'spec/**/*.rb'
- 'ee/spec/**/*.rb'
-# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/267606
RSpec/FactoryBot/InlineAssociation:
Include:
- 'spec/factories/**/*.rb'
@@ -761,6 +807,10 @@ Style/RegexpLiteralMixedPreserve:
- mixed_preserve
EnforcedStyle: mixed_preserve
+# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/94317#note_1139610896
+Style/Lambda:
+ EnforcedStyle: literal
+
RSpec/TopLevelDescribePath:
Exclude:
- 'spec/fixtures/**/*.rb'
@@ -831,3 +881,8 @@ Cop/SidekiqApiUsage:
- 'lib/gitlab/sidekiq_queue.rb'
- 'config/initializers/sidekiq.rb'
- 'config/initializers/forbid_sidekiq_in_transactions.rb'
+
+Rake/Require:
+ Include:
+ - '{,ee/,jh/}lib/**/*.rake'
+ - 'qa/tasks/**/*.rake'