Commit c0ef656f authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'update-gitlab-styles' into 'master'

Update gitlab-styles to 6.0.0

See merge request gitlab-org/gitlab!51116
parents d09577b8 30bbf070
# This configuration was generated by # This configuration was generated by
# `rubocop --auto-gen-config` # `rubocop --auto-gen-config`
# on 2020-12-14 18:35:57 UTC using RuboCop version 0.89.1. # on 2021-01-11 15:49:32 UTC using RuboCop version 0.91.1.
# The point is for the user to remove these configuration records # The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base. # one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new # Note that changes in the inspected code, or installation of new
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
Capybara/CurrentPathExpectation: Capybara/CurrentPathExpectation:
Enabled: false Enabled: false
# Offense count: 216 # Offense count: 218
Capybara/VisibilityMatcher: Capybara/VisibilityMatcher:
Enabled: false Enabled: false
...@@ -25,44 +25,53 @@ Graphql/IDType: ...@@ -25,44 +25,53 @@ Graphql/IDType:
Exclude: Exclude:
- 'app/graphql/mutations/boards/issues/issue_move_list.rb' - 'app/graphql/mutations/boards/issues/issue_move_list.rb'
# Offense count: 5 # Offense count: 2054
Graphql/ResolverType:
Exclude:
- 'app/graphql/resolvers/base_resolver.rb'
- 'app/graphql/resolvers/ci/jobs_resolver.rb'
- 'app/graphql/resolvers/ci/pipeline_stages_resolver.rb'
- 'app/graphql/resolvers/users/group_count_resolver.rb'
- 'ee/app/graphql/resolvers/vulnerabilities_base_resolver.rb'
# Offense count: 2002
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth. # Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_argument, with_fixed_indentation # SupportedStyles: with_first_argument, with_fixed_indentation
Layout/ArgumentAlignment: Layout/ArgumentAlignment:
Enabled: false Enabled: false
# Offense count: 50 # Offense count: 11
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleAlignWith, Severity.
# SupportedStylesAlignWith: start_of_line, begin
Layout/BeginEndAlignment:
Exclude:
- 'app/controllers/groups/shared_projects_controller.rb'
- 'app/workers/concerns/reactive_cacheable_worker.rb'
- 'ee/app/services/security/token_revocation_service.rb'
- 'ee/lib/gitlab/analytics/cycle_analytics/summary/group/deploy.rb'
- 'ee/lib/gitlab/ci/config/entry/vault/secret.rb'
- 'lib/api/internal/base.rb'
- 'lib/atlassian/jira_connect/serializers/build_entity.rb'
- 'lib/gitlab/ci/jwt.rb'
- 'lib/gitlab/external_authorization/client.rb'
- 'lib/gitlab/phabricator_import/project_creator.rb'
- 'scripts/gitaly_test.rb'
# Offense count: 52
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: AllowAliasSyntax, AllowedMethods. # Configuration parameters: AllowAliasSyntax, AllowedMethods.
# AllowedMethods: alias_method, public, protected, private # AllowedMethods: alias_method, public, protected, private
Layout/EmptyLinesAroundAttributeAccessor: Layout/EmptyLinesAroundAttributeAccessor:
Enabled: false Enabled: false
# Offense count: 694 # Offense count: 721
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth. # Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets # SupportedStyles: special_inside_parentheses, consistent, align_brackets
Layout/FirstArrayElementIndentation: Layout/FirstArrayElementIndentation:
Enabled: false Enabled: false
# Offense count: 1621 # Offense count: 1592
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth. # Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_braces # SupportedStyles: special_inside_parentheses, consistent, align_braces
Layout/FirstHashElementIndentation: Layout/FirstHashElementIndentation:
Enabled: false Enabled: false
# Offense count: 2979 # Offense count: 3019
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# SupportedHashRocketStyles: key, separator, table # SupportedHashRocketStyles: key, separator, table
...@@ -71,33 +80,47 @@ Layout/FirstHashElementIndentation: ...@@ -71,33 +80,47 @@ Layout/FirstHashElementIndentation:
Layout/HashAlignment: Layout/HashAlignment:
Enabled: false Enabled: false
# Offense count: 72 # Offense count: 73
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https # URISchemes: http, https
Layout/LineLength: Layout/LineLength:
Max: 1313 Max: 1313
# Offense count: 162 # Offense count: 163
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth. # Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: aligned, indented # SupportedStyles: aligned, indented
Layout/MultilineOperationIndentation: Layout/MultilineOperationIndentation:
Enabled: false Enabled: false
# Offense count: 52 # Offense count: 11
# Cop supports --auto-correct.
Layout/RescueEnsureAlignment:
Exclude:
- 'app/models/blob_viewer/dependency_manager.rb'
- 'app/models/project.rb'
- 'app/services/prometheus/proxy_service.rb'
- 'app/workers/concerns/reactive_cacheable_worker.rb'
- 'app/workers/delete_stored_files_worker.rb'
- 'config/initializers/1_settings.rb'
- 'config/initializers/trusted_proxies.rb'
- 'lib/api/internal/base.rb'
- 'lib/gitlab/highlight.rb'
# Offense count: 53
# Cop supports --auto-correct. # Cop supports --auto-correct.
Layout/SpaceAroundMethodCallOperator: Layout/SpaceAroundMethodCallOperator:
Enabled: false Enabled: false
# Offense count: 737 # Offense count: 725
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: require_no_space, require_space # SupportedStyles: require_no_space, require_space
Layout/SpaceInLambdaLiteral: Layout/SpaceInLambdaLiteral:
Enabled: false Enabled: false
# Offense count: 1160 # Offense count: 218
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
# SupportedStyles: space, no_space # SupportedStyles: space, no_space
...@@ -105,17 +128,16 @@ Layout/SpaceInLambdaLiteral: ...@@ -105,17 +128,16 @@ Layout/SpaceInLambdaLiteral:
Layout/SpaceInsideBlockBraces: Layout/SpaceInsideBlockBraces:
Enabled: false Enabled: false
# Offense count: 539 # Offense count: 559
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: space, no_space # SupportedStyles: space, no_space
Layout/SpaceInsideParens: Layout/SpaceInsideParens:
Enabled: false Enabled: false
# Offense count: 19 # Offense count: 18
Lint/BinaryOperatorWithIdenticalOperands: Lint/BinaryOperatorWithIdenticalOperands:
Exclude: Exclude:
- 'app/finders/concerns/time_frame_filter.rb'
- 'ee/spec/lib/ee/gitlab/application_context_spec.rb' - 'ee/spec/lib/ee/gitlab/application_context_spec.rb'
- 'spec/helpers/visibility_level_helper_spec.rb' - 'spec/helpers/visibility_level_helper_spec.rb'
- 'spec/lib/gitlab/conan_token_spec.rb' - 'spec/lib/gitlab/conan_token_spec.rb'
...@@ -129,6 +151,10 @@ Lint/BinaryOperatorWithIdenticalOperands: ...@@ -129,6 +151,10 @@ Lint/BinaryOperatorWithIdenticalOperands:
- 'spec/models/repository_spec.rb' - 'spec/models/repository_spec.rb'
- 'spec/models/ssh_host_key_spec.rb' - 'spec/models/ssh_host_key_spec.rb'
# Offense count: 83
Lint/ConstantDefinitionInBlock:
Enabled: false
# Offense count: 9 # Offense count: 9
# Cop supports --auto-correct. # Cop supports --auto-correct.
Lint/DeprecatedOpenSSLConstant: Lint/DeprecatedOpenSSLConstant:
...@@ -143,7 +169,26 @@ Lint/DeprecatedOpenSSLConstant: ...@@ -143,7 +169,26 @@ Lint/DeprecatedOpenSSLConstant:
- 'spec/support/helpers/smime_helper.rb' - 'spec/support/helpers/smime_helper.rb'
- 'spec/support/shared_contexts/requests/api/conan_packages_shared_context.rb' - 'spec/support/shared_contexts/requests/api/conan_packages_shared_context.rb'
# Offense count: 183 # Offense count: 1
Lint/DuplicateRequire:
Exclude:
- 'ee/spec/lib/gitlab/auth/group_saml/user_spec.rb'
# Offense count: 2
# Configuration parameters: AllowComments.
Lint/EmptyFile:
Exclude:
- 'db/seeds.rb'
- 'ee/db/geo/seeds.rb'
# Offense count: 8
# Cop supports --auto-correct.
Lint/IdentityComparison:
Exclude:
- 'spec/lib/gitlab/danger/weightage/maintainers_spec.rb'
- 'spec/lib/gitlab/danger/weightage/reviewers_spec.rb'
# Offense count: 184
# Configuration parameters: MaximumRangeSize. # Configuration parameters: MaximumRangeSize.
Lint/MissingCopEnableDirective: Lint/MissingCopEnableDirective:
Enabled: false Enabled: false
...@@ -166,7 +211,7 @@ Lint/MixedRegexpCaptureTypes: ...@@ -166,7 +211,7 @@ Lint/MixedRegexpCaptureTypes:
- 'lib/gitlab/slash_commands/issue_new.rb' - 'lib/gitlab/slash_commands/issue_new.rb'
- 'lib/gitlab/slash_commands/run.rb' - 'lib/gitlab/slash_commands/run.rb'
# Offense count: 135 # Offense count: 141
# Cop supports --auto-correct. # Cop supports --auto-correct.
Lint/RedundantCopDisableDirective: Lint/RedundantCopDisableDirective:
Enabled: false Enabled: false
...@@ -188,20 +233,63 @@ Lint/UnreachableLoop: ...@@ -188,20 +233,63 @@ Lint/UnreachableLoop:
Exclude: Exclude:
- 'qa/qa/runtime/feature.rb' - 'qa/qa/runtime/feature.rb'
# Offense count: 22
# Cop supports --auto-correct.
# Configuration parameters: AllowComments.
Lint/UselessMethodDefinition:
Enabled: false
# Offense count: 7 # Offense count: 7
# Configuration parameters: IgnoredMethods. # Configuration parameters: IgnoredMethods, Max.
Metrics/AbcSize: Metrics/AbcSize:
Max: 59 Exclude:
- 'app/helpers/issuables_helper.rb'
- 'app/services/merge_requests/build_service.rb'
- 'app/services/projects/create_service.rb'
- 'lib/api/helpers.rb'
- 'lib/gitlab/lograge/custom_options.rb'
- 'lib/gitlab/rack_attack.rb'
- 'qa/qa/resource/repository/push.rb'
# Offense count: 15 # Offense count: 15
# Configuration parameters: IgnoredMethods. # Configuration parameters: IgnoredMethods, Max.
Metrics/CyclomaticComplexity: Metrics/CyclomaticComplexity:
Max: 25 Exclude:
- 'app/services/projects/create_service.rb'
- 'app/services/system_hooks_service.rb'
- 'ee/app/controllers/ee/groups_controller.rb'
- 'ee/app/helpers/ee/groups_helper.rb'
- 'ee/lib/security/ci_configuration/sast_build_actions.rb'
- 'lib/banzai/filter/abstract_reference_filter.rb'
- 'lib/declarative_policy/runner.rb'
- 'lib/gitlab/conflict/file.rb'
- 'lib/gitlab/danger/roulette.rb'
- 'lib/gitlab/diff/parser.rb'
- 'lib/gitlab/rack_attack.rb'
- 'lib/gitlab/sidekiq_cluster/cli.rb'
- 'lib/gitlab/utils/merge_hash.rb'
- 'lib/kramdown/parser/atlassian_document_format.rb'
- 'spec/support/cycle_analytics_helpers/test_generation.rb'
# Offense count: 14 # Offense count: 15
# Configuration parameters: IgnoredMethods. # Configuration parameters: IgnoredMethods, Max.
Metrics/PerceivedComplexity: Metrics/PerceivedComplexity:
Max: 25 Exclude:
- 'app/helpers/submodule_helper.rb'
- 'app/helpers/tab_helper.rb'
- 'app/services/projects/create_service.rb'
- 'ee/app/controllers/ee/groups_controller.rb'
- 'ee/app/helpers/ee/groups_helper.rb'
- 'ee/lib/security/ci_configuration/sast_build_actions.rb'
- 'lib/banzai/filter/abstract_reference_filter.rb'
- 'lib/banzai/renderer.rb'
- 'lib/declarative_policy/runner.rb'
- 'lib/gitlab/conflict/file.rb'
- 'lib/gitlab/danger/roulette.rb'
- 'lib/gitlab/rack_attack.rb'
- 'lib/gitlab/sidekiq_cluster/cli.rb'
- 'lib/gitlab/utils/merge_hash.rb'
- 'spec/support/cycle_analytics_helpers/test_generation.rb'
# Offense count: 1 # Offense count: 1
# Cop supports --auto-correct. # Cop supports --auto-correct.
...@@ -209,7 +297,7 @@ Migration/DepartmentName: ...@@ -209,7 +297,7 @@ Migration/DepartmentName:
Exclude: Exclude:
- 'app/models/commit.rb' - 'app/models/commit.rb'
# Offense count: 181 # Offense count: 184
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms. # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, 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 # 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: Naming/FileName:
...@@ -226,7 +314,7 @@ Naming/HeredocDelimiterCase: ...@@ -226,7 +314,7 @@ Naming/HeredocDelimiterCase:
- 'spec/support/helpers/repo_helpers.rb' - 'spec/support/helpers/repo_helpers.rb'
- 'spec/support/helpers/seed_repo.rb' - 'spec/support/helpers/seed_repo.rb'
# Offense count: 303 # Offense count: 308
# Configuration parameters: ForbiddenDelimiters. # Configuration parameters: ForbiddenDelimiters.
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$)) # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
Naming/HeredocDelimiterNaming: Naming/HeredocDelimiterNaming:
...@@ -240,7 +328,7 @@ Naming/MethodParameterName: ...@@ -240,7 +328,7 @@ Naming/MethodParameterName:
- 'lib/gitlab/diff/inline_diff.rb' - 'lib/gitlab/diff/inline_diff.rb'
- 'spec/support/helpers/key_generator_helper.rb' - 'spec/support/helpers/key_generator_helper.rb'
# Offense count: 203 # Offense count: 206
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: PreferredName. # Configuration parameters: PreferredName.
Naming/RescuedExceptionsVariableName: Naming/RescuedExceptionsVariableName:
...@@ -252,11 +340,21 @@ Performance/AncestorsInclude: ...@@ -252,11 +340,21 @@ Performance/AncestorsInclude:
Exclude: Exclude:
- 'lib/gitlab/ci/config/extendable/entry.rb' - 'lib/gitlab/ci/config/extendable/entry.rb'
# Offense count: 39
# Cop supports --auto-correct.
Performance/BlockGivenWithExplicitBlock:
Enabled: false
# Offense count: 28 # Offense count: 28
# Configuration parameters: MinSize. # Configuration parameters: MinSize.
Performance/CollectionLiteralInLoop: Performance/CollectionLiteralInLoop:
Enabled: false Enabled: false
# Offense count: 37
# Cop supports --auto-correct.
Performance/ConstantRegexp:
Enabled: false
# Offense count: 18 # Offense count: 18
# Cop supports --auto-correct. # Cop supports --auto-correct.
Performance/Count: Performance/Count:
...@@ -311,6 +409,10 @@ Performance/Detect: ...@@ -311,6 +409,10 @@ Performance/Detect:
- 'spec/lib/gitlab/import_export/project/tree_restorer_spec.rb' - 'spec/lib/gitlab/import_export/project/tree_restorer_spec.rb'
- 'spec/models/event_spec.rb' - 'spec/models/event_spec.rb'
# Offense count: 116
Performance/MethodObjectAsBlock:
Enabled: false
# Offense count: 18 # Offense count: 18
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: AutoCorrect. # Configuration parameters: AutoCorrect.
...@@ -331,19 +433,27 @@ Performance/StringInclude: ...@@ -331,19 +433,27 @@ Performance/StringInclude:
- 'spec/spec_helper.rb' - 'spec/spec_helper.rb'
- 'spec/support_specs/helpers/active_record/query_recorder_spec.rb' - 'spec/support_specs/helpers/active_record/query_recorder_spec.rb'
# Offense count: 9 # Offense count: 18
# Cop supports --auto-correct. # Cop supports --auto-correct.
Performance/Sum: Performance/Sum:
Exclude: Exclude:
- 'app/controllers/projects/pipelines/tests_controller.rb'
- 'app/models/application_setting_implementation.rb' - 'app/models/application_setting_implementation.rb'
- 'app/models/ci/pipeline.rb' - 'app/models/ci/pipeline.rb'
- 'app/services/issues/export_csv_service.rb'
- 'ee/spec/lib/gitlab/elastic/bulk_indexer_spec.rb' - 'ee/spec/lib/gitlab/elastic/bulk_indexer_spec.rb'
- 'lib/api/entities/issuable_time_stats.rb'
- 'lib/container_registry/tag.rb'
- 'lib/declarative_policy/rule.rb' - 'lib/declarative_policy/rule.rb'
- 'lib/declarative_policy/runner.rb' - 'lib/declarative_policy/runner.rb'
- 'lib/gitlab/ci/reports/test_suite_comparer.rb'
- 'lib/gitlab/diff/file.rb'
- 'lib/gitlab/sherlock/transaction.rb' - 'lib/gitlab/sherlock/transaction.rb'
- 'lib/gitlab/usage_data.rb' - 'lib/gitlab/usage_data.rb'
- 'lib/peek/views/detailed_view.rb'
- 'spec/models/namespace/root_storage_statistics_spec.rb'
# Offense count: 14469 # Offense count: 14717
# Configuration parameters: Prefixes. # Configuration parameters: Prefixes.
# Prefixes: when, with, without # Prefixes: when, with, without
RSpec/ContextWording: RSpec/ContextWording:
...@@ -356,23 +466,23 @@ RSpec/EmptyExampleGroup: ...@@ -356,23 +466,23 @@ RSpec/EmptyExampleGroup:
- 'ee/spec/services/personal_access_tokens/revoke_invalid_tokens_spec.rb' - 'ee/spec/services/personal_access_tokens/revoke_invalid_tokens_spec.rb'
- 'spec/services/projects/prometheus/alerts/notify_service_spec.rb' - 'spec/services/projects/prometheus/alerts/notify_service_spec.rb'
# Offense count: 1355 # Offense count: 1365
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: method_call, block # SupportedStyles: method_call, block
RSpec/ExpectChange: RSpec/ExpectChange:
Enabled: false Enabled: false
# Offense count: 903 # Offense count: 889
RSpec/ExpectInHook: RSpec/ExpectInHook:
Enabled: false Enabled: false
# Offense count: 16472 # Offense count: 16403
# Configuration parameters: AllowSubject. # Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers: RSpec/MultipleMemoizedHelpers:
Max: 40 Max: 40
# Offense count: 2344 # Offense count: 2352
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers. # Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers.
# SupportedStyles: inflected, explicit # SupportedStyles: inflected, explicit
...@@ -394,7 +504,7 @@ RSpec/RepeatedExampleGroupDescription: ...@@ -394,7 +504,7 @@ RSpec/RepeatedExampleGroupDescription:
RSpec/ReturnFromStub: RSpec/ReturnFromStub:
Enabled: false Enabled: false
# Offense count: 587 # Offense count: 596
# Cop supports --auto-correct. # Cop supports --auto-correct.
RSpec/ScatteredLet: RSpec/ScatteredLet:
Enabled: false Enabled: false
...@@ -453,7 +563,7 @@ Rails/BelongsTo: ...@@ -453,7 +563,7 @@ Rails/BelongsTo:
- 'app/models/deployment.rb' - 'app/models/deployment.rb'
- 'app/models/environment.rb' - 'app/models/environment.rb'
# Offense count: 88 # Offense count: 90
# Configuration parameters: Database, Include. # Configuration parameters: Database, Include.
# SupportedDatabases: mysql, postgresql # SupportedDatabases: mysql, postgresql
# Include: db/migrate/*.rb # Include: db/migrate/*.rb
...@@ -465,13 +575,13 @@ Rails/BulkChangeTable: ...@@ -465,13 +575,13 @@ Rails/BulkChangeTable:
Rails/ContentTag: Rails/ContentTag:
Enabled: false Enabled: false
# Offense count: 292 # Offense count: 300
# Configuration parameters: Include. # Configuration parameters: Include.
# Include: db/migrate/*.rb # Include: db/migrate/*.rb
Rails/CreateTableWithTimestamps: Rails/CreateTableWithTimestamps:
Enabled: false Enabled: false
# Offense count: 343 # Offense count: 347
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: slashes, arguments # SupportedStyles: slashes, arguments
Rails/FilePath: Rails/FilePath:
...@@ -493,13 +603,13 @@ Rails/FindById: ...@@ -493,13 +603,13 @@ Rails/FindById:
- 'spec/finders/concerns/finder_methods_spec.rb' - 'spec/finders/concerns/finder_methods_spec.rb'
- 'spec/finders/concerns/finder_with_cross_project_access_spec.rb' - 'spec/finders/concerns/finder_with_cross_project_access_spec.rb'
# Offense count: 343 # Offense count: 346
# Configuration parameters: Include. # Configuration parameters: Include.
# Include: app/models/**/*.rb # Include: app/models/**/*.rb
Rails/HasManyOrHasOneDependent: Rails/HasManyOrHasOneDependent:
Enabled: false Enabled: false
# Offense count: 538 # Offense count: 539
# Configuration parameters: Include. # Configuration parameters: Include.
# Include: app/helpers/**/*.rb # Include: app/helpers/**/*.rb
Rails/HelperInstanceVariable: Rails/HelperInstanceVariable:
...@@ -561,17 +671,17 @@ Rails/MailerName: ...@@ -561,17 +671,17 @@ Rails/MailerName:
Exclude: Exclude:
- 'app/mailers/notify.rb' - 'app/mailers/notify.rb'
# Offense count: 49 # Offense count: 51
# Cop supports --auto-correct. # Cop supports --auto-correct.
Rails/NegateInclude: Rails/NegateInclude:
Enabled: false Enabled: false
# Offense count: 42 # Offense count: 44
# Cop supports --auto-correct. # Cop supports --auto-correct.
Rails/Pick: Rails/Pick:
Enabled: false Enabled: false
# Offense count: 119 # Offense count: 110
# Cop supports --auto-correct. # Cop supports --auto-correct.
Rails/Pluck: Rails/Pluck:
Enabled: false Enabled: false
...@@ -583,7 +693,7 @@ Rails/Pluck: ...@@ -583,7 +693,7 @@ Rails/Pluck:
Rails/RakeEnvironment: Rails/RakeEnvironment:
Enabled: false Enabled: false
# Offense count: 56 # Offense count: 58
# Cop supports --auto-correct. # Cop supports --auto-correct.
Rails/RedundantForeignKey: Rails/RedundantForeignKey:
Enabled: false Enabled: false
...@@ -603,18 +713,23 @@ Rails/ShortI18n: ...@@ -603,18 +713,23 @@ Rails/ShortI18n:
- 'app/uploaders/content_type_whitelist.rb' - 'app/uploaders/content_type_whitelist.rb'
- 'spec/views/shared/runners/show.html.haml_spec.rb' - 'spec/views/shared/runners/show.html.haml_spec.rb'
# Offense count: 1064 # Offense count: 1080
# Configuration parameters: ForbiddenMethods, AllowedMethods. # Configuration parameters: ForbiddenMethods, AllowedMethods.
# ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all # ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all
Rails/SkipsModelValidations: Rails/SkipsModelValidations:
Enabled: false Enabled: false
# Offense count: 245 # Offense count: 251
# Cop supports --auto-correct. # Cop supports --auto-correct.
Rails/SquishedSQLHeredocs: Rails/SquishedSQLHeredocs:
Enabled: false Enabled: false
# Offense count: 38 # Offense count: 45
# Cop supports --auto-correct.
Rails/WhereEquals:
Enabled: false
# Offense count: 40
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: exists, where # SupportedStyles: exists, where
...@@ -636,20 +751,19 @@ Security/YAMLLoad: ...@@ -636,20 +751,19 @@ Security/YAMLLoad:
- 'spec/initializers/secret_token_spec.rb' - 'spec/initializers/secret_token_spec.rb'
- 'spec/lib/gitlab/prometheus/additional_metrics_parser_spec.rb' - 'spec/lib/gitlab/prometheus/additional_metrics_parser_spec.rb'
# Offense count: 247 # Offense count: 240
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: separated, grouped # SupportedStyles: separated, grouped
Style/AccessorGrouping: Style/AccessorGrouping:
Enabled: false Enabled: false
# Offense count: 13 # Offense count: 12
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/ArrayCoercion: Style/ArrayCoercion:
Exclude: Exclude:
- 'app/controllers/admin/ci/variables_controller.rb' - 'app/controllers/admin/ci/variables_controller.rb'
- 'app/controllers/groups/variables_controller.rb' - 'app/controllers/groups/variables_controller.rb'
- 'app/controllers/import/bulk_imports_controller.rb'
- 'app/controllers/projects/variables_controller.rb' - 'app/controllers/projects/variables_controller.rb'
- 'db/migrate/20190620105427_change_null_private_profile_to_false.rb' - 'db/migrate/20190620105427_change_null_private_profile_to_false.rb'
- 'db/post_migrate/20190812070645_migrate_private_profile_nulls.rb' - 'db/post_migrate/20190812070645_migrate_private_profile_nulls.rb'
...@@ -661,7 +775,7 @@ Style/ArrayCoercion: ...@@ -661,7 +775,7 @@ Style/ArrayCoercion:
- 'ee/lib/ee/banzai/pipeline/gfm_pipeline.rb' - 'ee/lib/ee/banzai/pipeline/gfm_pipeline.rb'
- 'spec/support/helpers/lfs_http_helpers.rb' - 'spec/support/helpers/lfs_http_helpers.rb'
# Offense count: 184 # Offense count: 183
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: percent_q, bare_percent # SupportedStyles: percent_q, bare_percent
...@@ -680,6 +794,22 @@ Style/BisectedAttrAccessor: ...@@ -680,6 +794,22 @@ Style/BisectedAttrAccessor:
Style/CaseLikeIf: Style/CaseLikeIf:
Enabled: false Enabled: false
# Offense count: 15
Style/CombinableLoops:
Exclude:
- 'app/models/application_setting.rb'
- 'ee/db/fixtures/development/30_customizable_cycle_analytics.rb'
- 'ee/lib/gitlab/audit/events/preloader.rb'
- 'ee/spec/finders/snippets_finder_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/remove_duplicate_cs_findings_spec.rb'
- 'rubocop/code_reuse_helpers.rb'
- 'spec/features/merge_request/user_suggests_changes_on_diff_spec.rb'
- 'spec/finders/packages/group_packages_finder_spec.rb'
- 'spec/migrations/cleanup_optimistic_locking_nulls_pt2_fixed_spec.rb'
- 'spec/migrations/cleanup_optimistic_locking_nulls_spec.rb'
- 'spec/requests/api/members_spec.rb'
- 'spec/support/shared_examples/features/protected_branches_access_control_ce_shared_examples.rb'
# Offense count: 1 # Offense count: 1
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions. # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
...@@ -698,14 +828,14 @@ Style/EachWithObject: ...@@ -698,14 +828,14 @@ Style/EachWithObject:
- 'lib/gitlab/i18n/po_linter.rb' - 'lib/gitlab/i18n/po_linter.rb'
- 'lib/gitlab/import_export/members_mapper.rb' - 'lib/gitlab/import_export/members_mapper.rb'
# Offense count: 54 # Offense count: 53
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: empty, nil, both # SupportedStyles: empty, nil, both
Style/EmptyElse: Style/EmptyElse:
Enabled: false Enabled: false
# Offense count: 198 # Offense count: 197
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: compact, expanded # SupportedStyles: compact, expanded
...@@ -719,62 +849,67 @@ Style/ExpandPathArguments: ...@@ -719,62 +849,67 @@ Style/ExpandPathArguments:
- 'cable/config.ru' - 'cable/config.ru'
- 'config.ru' - 'config.ru'
# Offense count: 114 # Offense count: 116
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/ExplicitBlockArgument: Style/ExplicitBlockArgument:
Enabled: false Enabled: false
# Offense count: 542 # Offense count: 555
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: format, sprintf, percent # SupportedStyles: format, sprintf, percent
Style/FormatString: Style/FormatString:
Enabled: false Enabled: false
# Offense count: 59 # Offense count: 61
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/GlobalStdStream: Style/GlobalStdStream:
Enabled: false Enabled: false
# Offense count: 857 # Offense count: 879
# Configuration parameters: MinBodyLength. # Configuration parameters: MinBodyLength.
Style/GuardClause: Style/GuardClause:
Enabled: false Enabled: false
# Offense count: 92 # Offense count: 56
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: braces, no_braces # SupportedStyles: braces, no_braces
Style/HashAsLastArrayItem: Style/HashAsLastArrayItem:
Enabled: false Enabled: false
# Offense count: 60 # Offense count: 66
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/HashEachMethods: Style/HashEachMethods:
Enabled: false Enabled: false
# Offense count: 34 # Offense count: 33
# Configuration parameters: AllowIfModifier. # Configuration parameters: AllowIfModifier.
Style/IfInsideElse: Style/IfInsideElse:
Enabled: false Enabled: false
# Offense count: 1856 # Offense count: 1888
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/IfUnlessModifier: Style/IfUnlessModifier:
Enabled: false Enabled: false
# Offense count: 439 # Offense count: 68
# Cop supports --auto-correct.
Style/KeywordParametersOrder:
Enabled: false
# Offense count: 431
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: line_count_dependent, lambda, literal # SupportedStyles: line_count_dependent, lambda, literal
Style/Lambda: Style/Lambda:
Enabled: false Enabled: false
# Offense count: 18 # Offense count: 20
Style/MissingRespondToMissing: Style/MissingRespondToMissing:
Enabled: false Enabled: false
# Offense count: 36 # Offense count: 35
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinBodyLength. # Configuration parameters: EnforcedStyle, MinBodyLength.
# SupportedStyles: skip_modifier_ifs, always # SupportedStyles: skip_modifier_ifs, always
...@@ -788,25 +923,25 @@ Style/Next: ...@@ -788,25 +923,25 @@ Style/Next:
Style/NumericLiteralPrefix: Style/NumericLiteralPrefix:
Enabled: false Enabled: false
# Offense count: 136 # Offense count: 135
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/ParallelAssignment: Style/ParallelAssignment:
Enabled: false Enabled: false
# Offense count: 2557 # Offense count: 2601
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters. # Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters: Style/PercentLiteralDelimiters:
Enabled: false Enabled: false
# Offense count: 251 # Offense count: 1
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: compact, exploded # SupportedStyles: compact, exploded
Style/RaiseArgs: Style/RaiseArgs:
Enabled: false Enabled: false
# Offense count: 68 # Offense count: 65
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/RedundantAssignment: Style/RedundantAssignment:
Enabled: false Enabled: false
...@@ -828,24 +963,23 @@ Style/RedundantFetchBlock: ...@@ -828,24 +963,23 @@ Style/RedundantFetchBlock:
Style/RedundantFileExtensionInRequire: Style/RedundantFileExtensionInRequire:
Enabled: false Enabled: false
# Offense count: 272 # Offense count: 220
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/RedundantFreeze: Style/RedundantFreeze:
Enabled: false Enabled: false
# Offense count: 179 # Offense count: 182
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/RedundantInterpolation: Style/RedundantInterpolation:
Enabled: false Enabled: false
# Offense count: 9 # Offense count: 8
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/RedundantRegexpCharacterClass: Style/RedundantRegexpCharacterClass:
Exclude: Exclude:
- 'app/models/concerns/taskable.rb' - 'app/models/concerns/taskable.rb'
- 'lib/gitlab/authorized_keys.rb' - 'lib/gitlab/authorized_keys.rb'
- 'lib/gitlab/fogbugz_import/repository.rb' - 'lib/gitlab/fogbugz_import/repository.rb'
- 'lib/gitlab/prometheus/internal.rb'
- 'lib/gitlab/quick_actions/substitution_definition.rb' - 'lib/gitlab/quick_actions/substitution_definition.rb'
- 'lib/gitlab/regex.rb' - 'lib/gitlab/regex.rb'
- 'spec/features/merge_request/user_views_open_merge_request_spec.rb' - 'spec/features/merge_request/user_views_open_merge_request_spec.rb'
...@@ -856,62 +990,75 @@ Style/RedundantRegexpCharacterClass: ...@@ -856,62 +990,75 @@ Style/RedundantRegexpCharacterClass:
Style/RedundantRegexpEscape: Style/RedundantRegexpEscape:
Enabled: false Enabled: false
# Offense count: 914 # Offense count: 920
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/RedundantSelf: Style/RedundantSelf:
Enabled: false Enabled: false
# Offense count: 190 # Offense count: 2
# Cop supports --auto-correct.
Style/RedundantSelfAssignment:
Exclude:
- 'app/models/concerns/issuable.rb'
- 'spec/db/schema_spec.rb'
# Offense count: 196
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes. # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed # SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral: Style/RegexpLiteral:
Enabled: false Enabled: false
# Offense count: 49 # Offense count: 50
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/RescueModifier: Style/RescueModifier:
Enabled: false Enabled: false
# Offense count: 338 # Offense count: 346
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: implicit, explicit # SupportedStyles: implicit, explicit
Style/RescueStandardError: Style/RescueStandardError:
Enabled: false Enabled: false
# Offense count: 110 # Offense count: 115
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/SingleArgumentDig: Style/SingleArgumentDig:
Enabled: false Enabled: false
# Offense count: 46 # Offense count: 45
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/SlicingWithRange: Style/SlicingWithRange:
Enabled: false Enabled: false
# Offense count: 120 # Offense count: 61
# Configuration parameters: AllowModifier.
Style/SoleNestedConditional:
Enabled: false
# Offense count: 121
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: . # Configuration parameters: .
# SupportedStyles: use_perl_names, use_english_names # SupportedStyles: use_perl_names, use_english_names
Style/SpecialGlobalVars: Style/SpecialGlobalVars:
EnforcedStyle: use_perl_names EnforcedStyle: use_perl_names
# Offense count: 532 # Offense count: 545
# Cop supports --auto-correct. # Cop supports --auto-correct.
Style/StringConcatenation: Style/StringConcatenation:
Enabled: false Enabled: false
# Offense count: 104 # Offense count: 108
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: single_quotes, double_quotes # SupportedStyles: single_quotes, double_quotes
Style/StringLiteralsInInterpolation: Style/StringLiteralsInInterpolation:
Enabled: false Enabled: false
# Offense count: 296 # Offense count: 292
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods. # Configuration parameters: IgnoredMethods.
# IgnoredMethods: respond_to, define_method # IgnoredMethods: respond_to, define_method
Style/SymbolProc: Style/SymbolProc:
Enabled: false Enabled: false
...@@ -370,7 +370,7 @@ group :development, :test do ...@@ -370,7 +370,7 @@ group :development, :test do
gem 'spring', '~> 2.1.0' gem 'spring', '~> 2.1.0'
gem 'spring-commands-rspec', '~> 1.0.4' gem 'spring-commands-rspec', '~> 1.0.4'
gem 'gitlab-styles', '~> 5.4.0', require: false gem 'gitlab-styles', '~> 6.0.0', require: false
gem 'scss_lint', '~> 0.59.0', require: false gem 'scss_lint', '~> 0.59.0', require: false
gem 'haml_lint', '~> 0.36.0', require: false gem 'haml_lint', '~> 0.36.0', require: false
......
...@@ -447,11 +447,11 @@ GEM ...@@ -447,11 +447,11 @@ GEM
gitlab-pg_query (1.3.1) gitlab-pg_query (1.3.1)
gitlab-sidekiq-fetcher (0.5.2) gitlab-sidekiq-fetcher (0.5.2)
sidekiq (~> 5) sidekiq (~> 5)
gitlab-styles (5.4.0) gitlab-styles (6.0.0)
rubocop (~> 0.89.1) rubocop (~> 0.91.1)
rubocop-gitlab-security (~> 0.1.0) rubocop-gitlab-security (~> 0.1.1)
rubocop-performance (~> 1.8.1) rubocop-performance (~> 1.9.2)
rubocop-rails (~> 2.8) rubocop-rails (~> 2.9)
rubocop-rspec (~> 1.44) rubocop-rspec (~> 1.44)
gitlab_chronic_duration (0.10.6.2) gitlab_chronic_duration (0.10.6.2)
numerizer (~> 0.2) numerizer (~> 0.2)
...@@ -591,7 +591,7 @@ GEM ...@@ -591,7 +591,7 @@ GEM
mime-types (~> 3.0) mime-types (~> 3.0)
multi_xml (>= 0.5.2) multi_xml (>= 0.5.2)
httpclient (2.8.3) httpclient (2.8.3)
i18n (1.8.5) i18n (1.8.7)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
i18n_data (0.8.0) i18n_data (0.8.0)
icalendar (2.4.1) icalendar (2.4.1)
...@@ -836,8 +836,8 @@ GEM ...@@ -836,8 +836,8 @@ GEM
rubypants (~> 0.2) rubypants (~> 0.2)
orm_adapter (0.5.0) orm_adapter (0.5.0)
os (1.1.1) os (1.1.1)
parallel (1.19.2) parallel (1.20.1)
parser (2.7.2.0) parser (3.0.0.0)
ast (~> 2.4.1) ast (~> 2.4.1)
parslet (1.8.2) parslet (1.8.2)
peek (1.1.0) peek (1.1.0)
...@@ -1028,26 +1028,26 @@ GEM ...@@ -1028,26 +1028,26 @@ GEM
pg pg
rails rails
sqlite3 sqlite3
rubocop (0.89.1) rubocop (0.91.1)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 2.7.1.1) parser (>= 2.7.1.1)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7) regexp_parser (>= 1.7)
rexml rexml
rubocop-ast (>= 0.3.0, < 1.0) rubocop-ast (>= 0.4.0, < 1.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0) unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.8.0) rubocop-ast (0.8.0)
parser (>= 2.7.1.5) parser (>= 2.7.1.5)
rubocop-gitlab-security (0.1.1) rubocop-gitlab-security (0.1.1)
rubocop (>= 0.51) rubocop (>= 0.51)
rubocop-performance (1.8.1) rubocop-performance (1.9.2)
rubocop (>= 0.87.0) rubocop (>= 0.90.0, < 2.0)
rubocop-ast (>= 0.4.0) rubocop-ast (>= 0.4.0)
rubocop-rails (2.8.1) rubocop-rails (2.9.1)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
rack (>= 1.1) rack (>= 1.1)
rubocop (>= 0.87.0) rubocop (>= 0.90.0, < 2.0)
rubocop-rspec (1.44.1) rubocop-rspec (1.44.1)
rubocop (~> 0.87) rubocop (~> 0.87)
rubocop-ast (>= 0.7.1) rubocop-ast (>= 0.7.1)
...@@ -1056,7 +1056,7 @@ GEM ...@@ -1056,7 +1056,7 @@ GEM
ruby-fogbugz (0.2.1) ruby-fogbugz (0.2.1)
crack (~> 0.4) crack (~> 0.4)
ruby-prof (1.3.1) ruby-prof (1.3.1)
ruby-progressbar (1.10.1) ruby-progressbar (1.11.0)
ruby-saml (1.7.2) ruby-saml (1.7.2)
nokogiri (>= 1.5.10) nokogiri (>= 1.5.10)
ruby-statistics (2.1.2) ruby-statistics (2.1.2)
...@@ -1364,7 +1364,7 @@ DEPENDENCIES ...@@ -1364,7 +1364,7 @@ DEPENDENCIES
gitlab-markup (~> 1.7.1) gitlab-markup (~> 1.7.1)
gitlab-net-dns (~> 0.9.1) gitlab-net-dns (~> 0.9.1)
gitlab-sidekiq-fetcher (= 0.5.2) gitlab-sidekiq-fetcher (= 0.5.2)
gitlab-styles (~> 5.4.0) gitlab-styles (~> 6.0.0)
gitlab_chronic_duration (~> 0.10.6.2) gitlab_chronic_duration (~> 0.10.6.2)
gitlab_omniauth-ldap (~> 2.1.1) gitlab_omniauth-ldap (~> 2.1.1)
gon (~> 6.2) gon (~> 6.2)
......
...@@ -27,8 +27,7 @@ module Autocomplete ...@@ -27,8 +27,7 @@ module Autocomplete
# This removes the need for using `return render_404` and similar patterns # This removes the need for using `return render_404` and similar patterns
# in controllers that use this finder. # in controllers that use this finder.
unless Ability.allowed?(current_user, :read_group, group) unless Ability.allowed?(current_user, :read_group, group)
raise ActiveRecord::RecordNotFound raise ActiveRecord::RecordNotFound, "Could not find a Group with ID #{group_id}"
.new("Could not find a Group with ID #{group_id}")
end end
group group
......
...@@ -25,8 +25,7 @@ module Autocomplete ...@@ -25,8 +25,7 @@ module Autocomplete
# This removes the need for using `return render_404` and similar patterns # This removes the need for using `return render_404` and similar patterns
# in controllers that use this finder. # in controllers that use this finder.
unless Ability.allowed?(current_user, :read_project, project) unless Ability.allowed?(current_user, :read_project, project)
raise ActiveRecord::RecordNotFound raise ActiveRecord::RecordNotFound, "Could not find a Project with ID #{project_id}"
.new("Could not find a Project with ID #{project_id}")
end end
project project
......
...@@ -22,7 +22,7 @@ module FinderMethods ...@@ -22,7 +22,7 @@ module FinderMethods
def raise_not_found_unless_authorized(result) def raise_not_found_unless_authorized(result)
result = if_authorized(result) result = if_authorized(result)
raise ActiveRecord::RecordNotFound.new("Couldn't find #{model}") unless result raise(ActiveRecord::RecordNotFound, "Couldn't find #{model}") unless result
result result
end end
......
...@@ -53,9 +53,9 @@ module BulkInsertSafe ...@@ -53,9 +53,9 @@ module BulkInsertSafe
class_methods do class_methods do
def set_callback(name, *args) def set_callback(name, *args)
unless _bulk_insert_callback_allowed?(name, args) unless _bulk_insert_callback_allowed?(name, args)
raise MethodNotAllowedError.new( raise MethodNotAllowedError,
"Not allowed to call `set_callback(#{name}, #{args})` when model extends `BulkInsertSafe`." \ "Not allowed to call `set_callback(#{name}, #{args})` when model extends `BulkInsertSafe`." \
"Callbacks that fire per each record being inserted do not work with bulk-inserts.") "Callbacks that fire per each record being inserted do not work with bulk-inserts."
end end
super super
......
...@@ -53,8 +53,6 @@ module RuboCop ...@@ -53,8 +53,6 @@ module RuboCop
) )
PATTERN PATTERN
RESTRICT_ON_SEND = [:expect, :allow].freeze
def on_send(node) def on_send(node)
return unless expect_gitlab_tracking?(node) return unless expect_gitlab_tracking?(node)
......
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