summaryrefslogtreecommitdiff
path: root/.rubocop.yml
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
commit6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch)
tree78be5963ec075d80116a932011d695dd33910b4e /.rubocop.yml
parent1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff)
downloadgitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to '.rubocop.yml')
-rw-r--r--.rubocop.yml30
1 files changed, 29 insertions, 1 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index bff2b7a32b1..f3a264d1f2f 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -9,6 +9,7 @@ require:
inherit_from:
- .rubocop_todo.yml
- ./rubocop/rubocop-migrations.yml
+ - ./rubocop/rubocop-usage-data.yml
inherit_mode:
merge:
@@ -335,6 +336,15 @@ Graphql/AuthorizeTypes:
- 'spec/**/*.rb'
- 'ee/spec/**/*.rb'
+Graphql/JSONType:
+ Enabled: true
+ Include:
+ - 'app/graphql/**/*'
+ - 'ee/app/graphql/**/*'
+ Exclude:
+ - 'spec/**/*.rb'
+ - 'ee/spec/**/*.rb'
+
RSpec/EnvAssignment:
Enable: true
Include:
@@ -433,6 +443,11 @@ RSpec/HaveGitlabHttpStatus:
Style/MultilineWhenThen:
Enabled: false
+# We use EnforcedStyle of comparison here due to it being better
+# performing code as seen in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36221#note_375659681
+Style/NumericPredicate:
+ EnforcedStyle: comparison
+
Style/FloatDivision:
Enabled: false
@@ -455,8 +470,10 @@ Rails/TimeZone:
Include:
- 'app/controllers/**/*'
- 'app/services/**/*'
+ - 'lib/**/*'
- 'spec/controllers/**/*'
- 'spec/services/**/*'
+ - 'spec/lib/**/*'
- 'ee/app/controllers/**/*'
- 'ee/app/services/**/*'
- 'ee/spec/controllers/**/*'
@@ -469,7 +486,8 @@ Rails/TimeZone:
- 'spec/workers/**/*'
- 'ee/app/workers/**/*'
- 'ee/spec/workers/**/*'
-
+ - 'ee/lib/**/*'
+ - 'ee/spec/lib/**/*'
# WIP: See https://gitlab.com/gitlab-org/gitlab/-/issues/220040
Rails/SaveBang:
@@ -481,3 +499,13 @@ Rails/SaveBang:
- 'ee/spec/**/*.rb'
- 'qa/spec/**/*.rb'
- 'qa/qa/specs/**/*.rb'
+
+Cop/PutProjectRoutesUnderScope:
+ Include:
+ - 'config/routes/project.rb'
+ - 'ee/config/routes/project.rb'
+
+Cop/PutGroupRoutesUnderScope:
+ Include:
+ - 'config/routes/group.rb'
+ - 'ee/config/routes/group.rb'