summaryrefslogtreecommitdiff
path: root/.rubocop.yml
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /.rubocop.yml
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
downloadgitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to '.rubocop.yml')
-rw-r--r--.rubocop.yml64
1 files changed, 35 insertions, 29 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 3d013a650e7..ed17799478a 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -2,18 +2,21 @@ inherit_gem:
gitlab-styles:
- rubocop-default.yml
-inherit_from: .rubocop_todo.yml
require:
- ./rubocop/rubocop
- rubocop-rspec
+inherit_from:
+ - .rubocop_todo.yml
+ - ./rubocop/rubocop-migrations.yml
+
inherit_mode:
merge:
- Include
AllCops:
TargetRubyVersion: 2.6
- TargetRailsVersion: 5.0
+ TargetRailsVersion: 6.0
Exclude:
- 'vendor/**/*'
- 'node_modules/**/*'
@@ -27,6 +30,7 @@ AllCops:
- 'plugins/**/*'
- 'file_hooks/**/*'
CacheRootDirectory: tmp
+ MaxFilesInCache: 18000
Cop/AvoidKeywordArgumentsInSidekiqWorkers:
Enabled: true
@@ -178,6 +182,9 @@ Rails/ApplicationRecord:
- ee/db/**/*.rb
- ee/spec/**/*.rb
+Cop/DefaultScope:
+ Enabled: true
+
Rails/FindBy:
Enabled: true
Include:
@@ -186,6 +193,14 @@ Rails/FindBy:
- 'spec/**/*.rb'
- 'ee/spec/**/*.rb'
+# This is currently exiting with a rubocop exception error and should be
+# resolved hopefully a future update
+# An error occurred while Rails/UniqueValidationWithoutIndex cop was inspecting
+# app/models/abuse_report.rb:15:2.
+# To see the complete backtrace run rubocop -d.
+Rails/UniqueValidationWithoutIndex:
+ Enabled: false
+
# GitLab ###################################################################
Gitlab/ModuleWithInstanceVariables:
@@ -225,6 +240,7 @@ Gitlab/Json:
- 'scripts/**/*'
- 'lib/rspec_flaky/**/*'
- 'lib/quality/**/*'
+ - 'lib/gitlab/danger/**/*'
GitlabSecurity/PublicSend:
Enabled: true
@@ -240,10 +256,7 @@ GitlabSecurity/PublicSend:
- 'ee/spec/**/*'
Gitlab/DuplicateSpecLocation:
- Exclude:
- - ee/spec/lib/gitlab/gl_repository_spec.rb
- - ee/spec/services/merge_requests/refresh_service_spec.rb
- - ee/spec/services/ee/merge_requests/refresh_service_spec.rb
+ Enabled: true
Cop/InjectEnterpriseEditionModule:
Enabled: true
@@ -259,12 +272,15 @@ Style/ReturnNil:
Performance/RegexpMatch:
Enabled: false
-ActiveRecordAssociationReload:
+Cop/ActiveRecordAssociationReload:
Enabled: true
Exclude:
- 'spec/**/*'
- 'ee/spec/**/*'
+Gitlab/AvoidFeatureGet:
+ Enabled: true
+
Naming/PredicateName:
Enabled: true
Exclude:
@@ -349,39 +365,17 @@ RSpec/LeakyConstantDeclaration:
Exclude:
- 'spec/db/schema_spec.rb'
- 'spec/lib/feature_spec.rb'
- - 'spec/lib/gitlab/ci/build/credentials/factory_spec.rb'
- - 'spec/lib/gitlab/ci/config/entry/retry_spec.rb'
- - 'spec/lib/gitlab/cluster/mixins/puma_cluster_spec.rb'
- - 'spec/lib/gitlab/cluster/mixins/unicorn_http_server_spec.rb'
- - 'spec/lib/gitlab/config/entry/factory_spec.rb'
- 'spec/lib/gitlab/config/entry/simplifiable_spec.rb'
- - 'spec/lib/gitlab/database/migration_helpers_spec.rb'
- - 'spec/lib/gitlab/database/obsolete_ignored_columns_spec.rb'
- - 'spec/lib/gitlab/database/with_lock_retries_spec.rb'
- - 'spec/lib/gitlab/git/diff_collection_spec.rb'
- - 'spec/lib/gitlab/import_export/import_test_coverage_spec.rb'
- - 'spec/lib/gitlab/import_export/project/relation_factory_spec.rb'
- - 'spec/lib/gitlab/jira_import/issues_importer_spec.rb'
- - 'spec/lib/gitlab/no_cache_headers_spec.rb'
- - 'spec/lib/gitlab/path_regex_spec.rb'
- 'spec/lib/gitlab/quick_actions/dsl_spec.rb'
- - 'spec/lib/gitlab/sidekiq_middleware/client_metrics_spec.rb'
- - 'spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb'
- 'spec/lib/marginalia_spec.rb'
- 'spec/mailers/notify_spec.rb'
- - 'spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb'
- 'spec/models/concerns/batch_destroy_dependent_associations_spec.rb'
- 'spec/models/concerns/bulk_insert_safe_spec.rb'
- 'spec/models/concerns/bulk_insertable_associations_spec.rb'
- 'spec/models/concerns/triggerable_hooks_spec.rb'
- 'spec/models/repository_spec.rb'
- - 'spec/requests/api/graphql/tasks/task_completion_status_spec.rb'
- - 'spec/serializers/commit_entity_spec.rb'
- 'spec/services/clusters/applications/check_installation_progress_service_spec.rb'
- - 'spec/services/clusters/applications/check_uninstall_progress_service_spec.rb'
- - 'spec/support/shared_contexts/spam_constants.rb'
- 'spec/support/shared_examples/quick_actions/issuable/issuable_quick_actions_shared_examples.rb'
- - 'spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb'
RSpec/EmptyLineAfterHook:
Enabled: false
@@ -452,4 +446,16 @@ Rails/TimeZone:
- 'ee/app/services/**/*'
- 'ee/spec/controllers/**/*'
- 'ee/spec/services/**/*'
+ - 'app/models/**/*'
+ - 'spec/models/**/*'
+ - 'ee/app/models/**/*'
+ - 'ee/spec/models/**/*'
+# WIP: See https://gitlab.com/gitlab-org/gitlab/-/issues/220040
+Rails/SaveBang:
+ Enabled: true
+ Include:
+ - 'spec/**/*.rb'
+ - 'ee/spec/**/*.rb'
+ - 'qa/spec/**/*.rb'
+ - 'qa/qa/specs/**/*.rb'