Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7d903519
Commit
7d903519
authored
Jan 20, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rc/enable_rails_cops' into 'master'
Enable Rails rubocops See merge request gitlab-org/gitlab!23101
parents
9d154542
c9a865ac
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
145 deletions
+110
-145
.rubocop.yml
.rubocop.yml
+1
-18
.rubocop_todo.yml
.rubocop_todo.yml
+104
-122
app/models/user.rb
app/models/user.rb
+4
-4
ee/app/services/ee/groups/update_service.rb
ee/app/services/ee/groups/update_service.rb
+1
-1
No files found.
.rubocop.yml
View file @
7d903519
...
...
@@ -301,24 +301,6 @@ RSpec/AnyInstanceOf:
Enabled
:
false
# Cops for upgrade to gitlab-styles 3.1.0
Rails/SafeNavigationWithBlank
:
Enabled
:
false
Rails/ApplicationController
:
Enabled
:
false
Rails/ApplicationMailer
:
Enabled
:
false
Rails/RakeEnvironment
:
Enabled
:
false
Rails/HelperInstanceVariable
:
Enabled
:
false
Rails/EnumHash
:
Enabled
:
false
RSpec/ReceiveCounts
:
Enabled
:
false
...
...
@@ -369,3 +351,4 @@ Style/MultilineWhenThen:
Style/FloatDivision
:
Enabled
:
false
\ No newline at end of file
.rubocop_todo.yml
View file @
7d903519
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 20
19-05-04 16:01:00 +0000 using RuboCop version 0.68.1
.
# on 20
20-01-16 11:53:06 -0800 using RuboCop version 0.74.0
.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 264
# Offense count: 299
# Cop supports --auto-correct.
Capybara/CurrentPathExpectation
:
Enabled
:
false
# Offense count: 1
097
# Offense count: 1
432
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_argument, with_fixed_indentation
Layout/AlignArguments
:
Enabled
:
false
# Offense count:
824
# Offense count:
1630
# Cop supports --auto-correct.
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# Configuration parameters:
AllowMultipleStyles,
EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# SupportedHashRocketStyles: key, separator, table
# SupportedColonStyles: key, separator, table
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
...
...
@@ -32,39 +33,32 @@ Layout/ClosingHeredocIndentation:
Exclude
:
-
'
app/graphql/mutations/merge_requests/set_wip.rb'
-
'
ee/db/geo/migrate/20180322062741_migrate_ci_job_artifacts_to_separate_registry.rb'
-
'
ee/db/migrate/20160204190809_update_jenkins_service_category.rb'
-
'
ee/lib/gitlab/background_migration/prune_orphaned_geo_events.rb'
-
'
ee/lib/gitlab/geo/health_check.rb'
-
'
lib/gitlab/background_migration/populate_untracked_uploads.rb'
-
'
qa/qa/service/kubernetes_cluster.rb'
-
'
spec/features/merge_request/user_sees_diff_spec.rb'
-
'
spec/lib/gitlab/asciidoc_spec.rb'
-
'
spec/lib/gitlab/checks/project_moved_spec.rb'
-
'
spec/rubocop/cop/active_record_association_reload_spec.rb'
-
'
spec/services/task_list_toggle_service_spec.rb'
# Offense count:
14
# Offense count:
9
# Cop supports --auto-correct.
Layout/ClosingParenthesisIndentation
:
Exclude
:
-
'
db/post_migrate/20180704145007_update_project_indexes.rb'
-
'
ee/db/geo/migrate/20180405074130_add_partial_index_project_repository_verification.rb'
-
'
ee/db/migrate/20180308234102_add_partial_index_to_project_repository_states_checksum_columns.rb'
-
'
ee/db/post_migrate/20180605213516_fix_partial_index_to_project_repository_states_checksum_columns.rb'
-
'
ee/lib/ee/gitlab/usage_data.rb'
-
'
spec/services/issues/resolve_discussions_spec.rb'
-
'
spec/services/projects/update_service_spec.rb'
-
'
spec/support/helpers/stub_object_storage.rb'
-
'
spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb'
# Offense count:
2
# Offense count:
1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: leading, trailing
Layout/DotPosition
:
Exclude
:
-
'
app/models/concerns/relative_positioning.rb'
-
'
app/models/group.rb'
# Offense count: 69
# Cop supports --auto-correct.
...
...
@@ -81,74 +75,67 @@ Layout/EmptyLinesAroundArguments:
-
'
lib/banzai/pipeline/single_line_pipeline.rb'
-
'
spec/features/markdown/copy_as_gfm_spec.rb'
# Offense count:
160
# Offense count:
305
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
Layout/IndentFirstArrayElement
:
Enabled
:
false
# Offense count:
631
# Offense count:
1005
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_braces
Layout/IndentFirstHashElement
:
Enabled
:
false
# Offense count:
5
# Offense count:
4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: consistent, align_parentheses
Layout/IndentFirstParameter
:
Exclude
:
-
'
app/models/ci/pipeline_schedule.rb'
-
'
lib/gitlab/cross_project_access.rb'
-
'
lib/gitlab/data_builder/push.rb'
-
'
spec/support/helpers/repo_helpers.rb'
-
'
spec/support/helpers/stub_object_storage.rb'
# Offense count:
5
# Offense count:
1
# Cop supports --auto-correct.
Layout/LeadingBlankLines
:
Exclude
:
-
'
app/workers/update_project_statistics_worker.rb'
-
'
db/migrate/20161007073613_create_user_activities.rb'
-
'
ee/spec/helpers/boards_helper_spec.rb'
-
'
lib/tasks/yarn.rake'
-
'
spec/javascripts/fixtures/merge_requests_diffs.rb'
# Offense count:
30
# Offense count:
54
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: aligned, indented
Layout/MultilineOperationIndentation
:
Enabled
:
false
# Offense count: 1
3
# Offense count: 1
0
# Cop supports --auto-correct.
Layout/RescueEnsureAlignment
:
Exclude
:
-
'
app/models/blob_viewer/dependency_manager.rb'
-
'
app/models/ci/pipeline.rb'
-
'
app/models/project.rb'
-
'
app/services/prometheus/proxy_service.rb'
-
'
app/workers/delete_stored_files_worker.rb'
-
'
app/workers/reactive_caching_worker.rb'
-
'
config/initializers/1_settings.rb'
-
'
config/initializers/trusted_proxies.rb'
-
'
ee/db/migrate/20151113115819_canonicalize_kerberos_identities.rb'
-
'
lib/gitlab/background_migration/archive_legacy_traces.rb'
-
'
lib/gitlab/highlight.rb'
-
'
lib/tasks/gitlab/lfs/migrate.rake'
# Offense count:
344
# Offense count:
522
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: require_no_space, require_space
Layout/SpaceInLambdaLiteral
:
Enabled
:
false
# Offense count:
583
# Offense count:
796
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
# SupportedStyles: space, no_space
...
...
@@ -156,7 +143,7 @@ Layout/SpaceInLambdaLiteral:
Layout/SpaceInsideBlockBraces
:
Enabled
:
false
# Offense count:
25
5
# Offense count:
31
5
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: space, no_space
...
...
@@ -185,13 +172,13 @@ Lint/DuplicateMethods:
-
'
lib/gitlab/git/tree.rb'
-
'
lib/gitlab/git/wiki_page.rb'
# Offense count:
2
# Offense count:
3
Lint/InterpolationCheck
:
Exclude
:
-
'
spec/features/issues/filtered_search/filter_issues_spec.rb'
-
'
spec/services/quick_actions/interpret_service_spec.rb'
# Offense count:
326
# Offense count:
122
# Configuration parameters: MaximumRangeSize.
Lint/MissingCopEnableDirective
:
Enabled
:
false
...
...
@@ -211,14 +198,13 @@ Lint/ToJSON:
-
'
lib/gitlab/cycle_analytics/usage_data.rb'
-
'
lib/gitlab/template/base_template.rb'
# Offense count:
7
# Offense count:
6
Lint/UriEscapeUnescape
:
Exclude
:
-
'
app/controllers/application_controller.rb'
-
'
app/models/project_services/drone_ci_service.rb'
-
'
spec/lib/google_api/auth_spec.rb'
-
'
spec/requests/api/files_spec.rb'
-
'
spec/requests/api/internal/base_spec.rb'
# Offense count: 1
# Configuration parameters: CheckForMethodsWithNoSideEffects.
...
...
@@ -226,14 +212,14 @@ Lint/Void:
Exclude
:
-
'
lib/gitlab/git/diff_collection.rb'
# Offense count: 1
58
# Offense count: 1
65
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength
:
Max
:
176
# Offense count:
94
# Offense count:
143
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName
:
...
...
@@ -250,32 +236,32 @@ Naming/HeredocDelimiterCase:
-
'
spec/support/helpers/repo_helpers.rb'
-
'
spec/support/helpers/seed_repo.rb'
# Offense count:
197
# Offense count:
211
# Configuration parameters: Blacklist.
# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
Naming/HeredocDelimiterNaming
:
Enabled
:
false
# Offense count: 1
25
# Offense count: 1
39
# Cop supports --auto-correct.
# Configuration parameters: PreferredName.
Naming/RescuedExceptionsVariableName
:
Enabled
:
false
# Offense count:
7081
# Offense count:
9913
# Configuration parameters: Prefixes.
# Prefixes: when, with, without
RSpec/ContextWording
:
Enabled
:
false
# Offense count:
71
9
# Offense count:
87
9
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: method_call, block
RSpec/ExpectChange
:
Enabled
:
false
# Offense count:
512
# Offense count:
660
RSpec/ExpectInHook
:
Enabled
:
false
...
...
@@ -317,40 +303,38 @@ RSpec/MultipleSubjects:
Exclude
:
-
'
spec/services/merge_requests/create_from_issue_service_spec.rb'
# Offense count:
4
# Offense count:
3
RSpec/OverwritingSetup
:
Exclude
:
-
'
spec/lib/gitlab/background_migration/migrate_events_to_push_event_payloads_spec.rb'
-
'
spec/models/email_spec.rb'
-
'
spec/services/merge_requests/add_todo_when_build_fails_service_spec.rb'
-
'
spec/services/notes/quick_actions_service_spec.rb'
# Offense count:
182
8
# Offense count:
201
8
# Cop supports --auto-correct.
# Configuration parameters: Strict, EnforcedStyle.
# Configuration parameters: Strict, EnforcedStyle
, AllowedExplicitMatchers
.
# SupportedStyles: inflected, explicit
RSpec/PredicateMatcher
:
Enabled
:
false
# Offense count:
57
# Offense count:
69
RSpec/RepeatedExample
:
Enabled
:
false
# Offense count:
47
4
# Offense count:
58
4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: and_return, block
RSpec/ReturnFromStub
:
Enabled
:
false
# Offense count:
188
# Offense count:
380
RSpec/ScatteredLet
:
Enabled
:
false
# Offense count:
10
# Offense count:
8
RSpec/ScatteredSetup
:
Exclude
:
-
'
spec/controllers/projects/templates_controller_spec.rb'
-
'
spec/lib/gitlab/bitbucket_import/importer_spec.rb'
-
'
spec/requests/api/jobs_spec.rb'
-
'
spec/services/projects/create_service_spec.rb'
...
...
@@ -369,6 +353,27 @@ RSpec/VoidExpect:
-
'
spec/models/ci/runner_spec.rb'
-
'
spec/services/users/destroy_service_spec.rb'
# Offense count: 10
# Cop supports --auto-correct.
Rails/ApplicationController
:
Exclude
:
-
'
app/controllers/acme_challenges_controller.rb'
-
'
app/controllers/chaos_controller.rb'
-
'
app/controllers/health_controller.rb'
-
'
app/controllers/metrics_controller.rb'
-
'
ee/app/controllers/oauth/geo_auth_controller.rb'
-
'
ee/spec/helpers/ee/services_helper_spec.rb'
-
'
lib/gitlab/base_doorkeeper_controller.rb'
-
'
lib/gitlab/request_forgery_protection.rb'
-
'
spec/controllers/concerns/continue_params_spec.rb'
-
'
spec/lib/marginalia_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
Rails/ApplicationMailer
:
Exclude
:
-
'
app/mailers/base_mailer.rb'
# Offense count: 8
# Cop supports --auto-correct.
Rails/BelongsTo
:
...
...
@@ -378,39 +383,37 @@ Rails/BelongsTo:
-
'
ee/app/models/prometheus_alert.rb'
-
'
ee/app/models/prometheus_alert_event.rb'
# Offense count:
80
# Offense count:
151
# Configuration parameters: Include.
# Include: db/migrate/*.rb
Rails/CreateTableWithTimestamps
:
Enabled
:
false
# Offense count: 2
22
# Offense count: 2
66
# Configuration parameters: EnforcedStyle.
# SupportedStyles: slashes, arguments
Rails/FilePath
:
Enabled
:
false
# Offense count:
167
# Offense count:
211
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasManyOrHasOneDependent
:
Enabled
:
false
# Offense count:
2
# Offense count:
431
# Configuration parameters: Include.
# Include: app/controllers/**/*.rb
Rails/IgnoredSkipActionFilterOption
:
Exclude
:
-
'
app/controllers/projects/snippets_controller.rb'
-
'
app/controllers/snippets_controller.rb'
# Include: app/helpers/**/*.rb
Rails/HelperInstanceVariable
:
Enabled
:
false
# Offense count:
87
# Offense count:
103
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/InverseOf
:
Enabled
:
false
# Offense count:
46
# Offense count:
51
# Configuration parameters: Include.
# Include: app/controllers/**/*.rb
Rails/LexicallyScopedActionFilter
:
...
...
@@ -425,6 +428,12 @@ Rails/LinkToBlank:
-
'
ee/app/helpers/ee/user_callouts_helper.rb'
-
'
ee/app/helpers/license_helper.rb'
# Offense count: 35
# Configuration parameters: Include.
# Include: **/Rakefile, **/*.rake
Rails/RakeEnvironment
:
Enabled
:
false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: Include.
...
...
@@ -433,31 +442,16 @@ Rails/RedundantAllowNil:
Exclude
:
-
'
app/models/application_setting.rb'
# Offense count: 2
# Configuration parameters: Include.
# Include: db/migrate/*.rb
Rails/ReversibleMigration
:
Exclude
:
-
'
db/migrate/20160824103857_drop_unused_ci_tables.rb'
# Offense count: 860
# Offense count: 868
# Configuration parameters: Blacklist, Whitelist.
# Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters
Rails/SkipsModelValidations
:
Enabled
:
false
# Offense count: 1
# Configuration parameters: Environments.
# Environments: development, test, production
Rails/UnknownEnv
:
Exclude
:
-
'
db/migrate/20171124125748_populate_missing_merge_request_statuses.rb'
# Offense count: 11
# Offense count: 8
# Cop supports --auto-correct.
Security/YAMLLoad
:
Exclude
:
-
'
lib/gitlab/background_migration/deserialize_merge_request_diffs_and_commits.rb'
-
'
lib/gitlab/redis/wrapper.rb'
-
'
lib/system_check/incoming_email/imap_authentication_check.rb'
-
'
spec/config/mail_room_spec.rb'
...
...
@@ -470,7 +464,7 @@ Security/YAMLLoad:
Style/AccessModifierDeclarations
:
Enabled
:
false
# Offense count: 12
1
# Offense count: 12
7
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: percent_q, bare_percent
...
...
@@ -489,19 +483,18 @@ Style/Dir:
Exclude
:
-
'
qa/qa.rb'
# Offense count:
7
# Offense count:
6
# Cop supports --auto-correct.
Style/EachWithObject
:
Exclude
:
-
'
lib/expand_variables.rb'
-
'
lib/gitlab/ci/ansi2html.rb'
-
'
lib/gitlab/ee_compat_check.rb'
-
'
lib/gitlab/hook_data/issuable_builder.rb'
-
'
lib/gitlab/i18n/po_linter.rb'
-
'
lib/gitlab/import_export/members_mapper.rb'
-
'
lib/gitlab/import_export/relation_factory.rb'
# Offense count:
34
# Offense count:
41
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty, nil, both
...
...
@@ -515,7 +508,7 @@ Style/EmptyLambdaParameter:
-
'
app/models/ci/build.rb'
-
'
app/models/ci/runner.rb'
# Offense count:
9
# Offense count:
8
# Cop supports --auto-correct.
Style/EmptyLiteral
:
Exclude
:
...
...
@@ -523,40 +516,40 @@ Style/EmptyLiteral:
-
'
lib/gitlab/git/diff_collection.rb'
-
'
lib/gitlab/gitaly_client.rb'
-
'
spec/helpers/merge_requests_helper_spec.rb'
-
'
spec/lib/gitlab/request_context_spec.rb'
-
'
spec/lib/gitlab/workhorse_spec.rb'
-
'
spec/requests/api/jobs_spec.rb'
-
'
spec/support/shared_examples/chat_slash_commands_shared_examples.rb'
# Offense count: 1
80
# Offense count: 1
48
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: compact, expanded
Style/EmptyMethod
:
Enabled
:
false
# Offense count:
203
# Offense count:
346
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: format, sprintf, percent
Style/FormatString
:
Enabled
:
false
# Offense count: 6
69
# Offense count: 6
92
# Configuration parameters: MinBodyLength.
Style/GuardClause
:
Enabled
:
false
# Offense count: 27
# Configuration parameters: AllowIfModifier.
Style/IfInsideElse
:
Enabled
:
false
# Offense count: 1
346
# Offense count: 1
474
# Cop supports --auto-correct.
Style/IfUnlessModifier
:
Enabled
:
false
# Offense count:
186
# Offense count:
314
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: line_count_dependent, lambda, literal
...
...
@@ -570,11 +563,11 @@ Style/LineEndConcatenation:
-
'
spec/lib/gitlab/gfm/reference_rewriter_spec.rb'
-
'
spec/lib/gitlab/incoming_email_spec.rb'
# Offense count: 1
8
# Offense count: 1
7
Style/MethodMissingSuper
:
Enabled
:
false
# Offense count: 1
8
# Offense count: 1
7
Style/MissingRespondToMissing
:
Enabled
:
false
...
...
@@ -597,35 +590,28 @@ Style/MultilineIfModifier:
-
'
app/services/ci/process_pipeline_service.rb'
-
'
lib/api/commit_statuses.rb'
# Offense count: 72
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: literals, strict
Style/MutableConstant
:
Enabled
:
false
# Offense count: 28
# Offense count: 34
# Cop supports --auto-correct.
# Configuration parameters: Whitelist.
# Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
Style/NestedParenthesizedCalls
:
Enabled
:
false
# Offense count:
31
# Offense count:
25
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinBodyLength.
# SupportedStyles: skip_modifier_ifs, always
Style/Next
:
Enabled
:
false
# Offense count:
67
# Offense count:
71
# Cop supports --auto-correct.
# Configuration parameters: EnforcedOctalStyle.
# SupportedOctalStyles: zero_with_o, zero_only
Style/NumericLiteralPrefix
:
Enabled
:
false
# Offense count:
186
# Offense count:
234
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
# SupportedStyles: predicate, comparison
...
...
@@ -639,12 +625,12 @@ Style/OrAssignment:
-
'
lib/api/commit_statuses.rb'
-
'
lib/gitlab/project_transfer.rb'
# Offense count:
79
# Offense count:
106
# Cop supports --auto-correct.
Style/ParallelAssignment
:
Enabled
:
false
# Offense count: 1
390
# Offense count: 1
692
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters
:
...
...
@@ -666,7 +652,7 @@ Style/PerlBackrefs:
-
'
lib/gitlab/search_results.rb'
-
'
lib/gitlab/sherlock/query.rb'
# Offense count: 1
29
# Offense count: 1
65
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: compact, exploded
...
...
@@ -687,7 +673,7 @@ Style/RedundantConditional:
Exclude
:
-
'
lib/system_check/helpers.rb'
# Offense count:
360
# Offense count:
221
# Cop supports --auto-correct.
Style/RedundantFreeze
:
Enabled
:
false
...
...
@@ -707,31 +693,31 @@ Style/RedundantReturn:
-
'
lib/gitlab/utils.rb'
-
'
lib/google_api/auth.rb'
# Offense count: 7
00
# Offense count: 7
39
# Cop supports --auto-correct.
Style/RedundantSelf
:
Enabled
:
false
# Offense count:
28
# Offense count:
80
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral
:
Enabled
:
false
# Offense count: 4
1
# Offense count: 4
2
# Cop supports --auto-correct.
Style/RescueModifier
:
Enabled
:
false
# Offense count:
19
7
# Offense count:
23
7
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: implicit, explicit
Style/RescueStandardError
:
Enabled
:
false
# Offense count:
5
# Offense count:
4
# Cop supports --auto-correct.
Style/SelfAssignment
:
Exclude
:
...
...
@@ -746,7 +732,7 @@ Style/SingleLineMethods:
Exclude
:
-
'
lib/gitlab/ci/ansi2html.rb'
# Offense count: 9
1
# Offense count: 9
4
# Cop supports --auto-correct.
# Configuration parameters: .
# SupportedStyles: use_perl_names, use_english_names
...
...
@@ -759,14 +745,14 @@ Style/StderrPuts:
Exclude
:
-
'
config/initializers/rspec_profiling.rb'
# Offense count:
6
5
# Offense count:
7
5
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiteralsInInterpolation
:
Enabled
:
false
# Offense count:
187
# Offense count:
216
# Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods.
# IgnoredMethods: respond_to, define_method
...
...
@@ -793,24 +779,22 @@ Style/TrailingCommaInArguments:
Exclude
:
-
'
spec/features/markdown/copy_as_gfm_spec.rb'
# Offense count:
10
# Offense count:
2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInArrayLiteral
:
Exclude
:
-
'
ee/spec/models/project_spec.rb'
-
'
spec/lib/gitlab/diff/position_tracer_spec.rb'
-
'
spec/lib/gitlab/metrics/dashboard/processor_spec.rb'
# Offense count:
2
# Offense count:
1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInHashLiteral
:
Exclude
:
-
'
lib/gitlab/ci/ansi2html.rb'
-
'
lib/gitlab/kubernetes.rb'
# Offense count: 2
# Cop supports --auto-correct.
...
...
@@ -819,7 +803,7 @@ Style/UnlessElse:
-
'
lib/backup/manager.rb'
-
'
lib/gitlab/project_search_results.rb'
# Offense count:
10
# Offense count:
8
# Cop supports --auto-correct.
Style/UnneededCondition
:
Exclude
:
...
...
@@ -827,12 +811,10 @@ Style/UnneededCondition:
-
'
app/helpers/environment_helper.rb'
-
'
app/models/project.rb'
-
'
app/services/issuable/clone/base_service.rb'
-
'
app/services/prometheus/adapter_service.rb'
-
'
lib/gitlab/email/message/repository_push.rb'
-
'
lib/gitlab/prometheus_client.rb'
-
'
spec/lib/rspec_flaky/flaky_example_spec.rb'
# Offense count:
73
# Offense count:
99
# Cop supports --auto-correct.
Style/UnneededInterpolation
:
Enabled
:
false
...
...
app/models/user.rb
View file @
7d903519
...
...
@@ -223,19 +223,19 @@ class User < ApplicationRecord
after_initialize
:set_projects_limit
# User's Layout preference
enum
layout:
[
:fixed
,
:fluid
]
enum
layout:
{
fixed:
0
,
fluid:
1
}
# User's Dashboard preference
# Note: When adding an option, it MUST go on the end of the array.
enum
dashboard:
[
:projects
,
:stars
,
:project_activity
,
:starred_project_activity
,
:groups
,
:todos
,
:issues
,
:merge_requests
,
:operations
]
enum
dashboard:
{
projects:
0
,
stars:
1
,
project_activity:
2
,
starred_project_activity:
3
,
groups:
4
,
todos:
5
,
issues:
6
,
merge_requests:
7
,
operations:
8
}
# User's Project preference
# Note: When adding an option, it MUST go on the end of the array.
enum
project_view:
[
:readme
,
:activity
,
:files
]
enum
project_view:
{
readme:
0
,
activity:
1
,
files:
2
}
# User's role
# Note: When adding an option, it MUST go on the end of the array.
enum
role:
[
:software_developer
,
:development_team_lead
,
:devops_engineer
,
:systems_administrator
,
:security_analyst
,
:data_analyst
,
:product_manager
,
:product_designer
,
:other
]
,
_suffix:
true
enum
role:
{
software_developer:
0
,
development_team_lead:
1
,
devops_engineer:
2
,
systems_administrator:
3
,
security_analyst:
4
,
data_analyst:
5
,
product_manager:
6
,
product_designer:
7
,
other:
8
}
,
_suffix:
true
delegate
:path
,
to: :namespace
,
allow_nil:
true
,
prefix:
true
delegate
:notes_filter_for
,
to: :user_preference
...
...
ee/app/services/ee/groups/update_service.rb
View file @
7d903519
...
...
@@ -105,7 +105,7 @@ module EE
return
unless
group
.
allowed_email_domain
.
present?
return
unless
allowed_domain_params
if
allowed_domain_params
[
:domain
]
&
.
blank?
if
allowed_domain_params
[
:domain
].
blank?
allowed_domain_params
[
:_destroy
]
=
1
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment