diff --git a/.rubocop.yml b/.rubocop.yml index 80eb4a5c19ea9a7983daea50ca4c0efa22b3f375..bf2b2d8afc2a2b5c6faac0cfbb4a87ac257524de 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -343,10 +343,6 @@ Style/ParenthesesAroundCondition: Style/RedundantParentheses: Enabled: true -# Don't use return where it's not required. -Style/RedundantReturn: - Enabled: true - # Don't use semicolons to terminate expressions. Style/Semicolon: Enabled: true diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2434e8c4b4215b11690ce629afa127e8c7676c44..6d4d7170fe8a6a9e8e4a0de45e5cb5a22bce44c3 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,19 +1,18 @@ # This configuration was generated by -# `rubocop --auto-gen-config` -# on 2017-01-05 14:31:09 -0800 using RuboCop version 0.46.0. +# `rubocop --auto-gen-config --exclude-limit 0` +# on 2017-01-11 09:38:25 +0000 using RuboCop version 0.46.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: 28 +# Offense count: 27 # Configuration parameters: Include. # Include: **/Gemfile, **/gems.rb Bundler/OrderedGems: - Exclude: - - 'Gemfile' + Enabled: false -# Offense count: 174 +# Offense count: 175 Lint/AmbiguousRegexpLiteral: Enabled: false @@ -24,8 +23,7 @@ Lint/AssignmentInCondition: # Offense count: 1 Lint/EmptyWhen: - Exclude: - - 'lib/gitlab/diff/parser.rb' + Enabled: false # Offense count: 20 Lint/HandleExceptions: @@ -33,37 +31,21 @@ Lint/HandleExceptions: # Offense count: 1 Lint/Loop: - Exclude: - - 'app/mailers/notify.rb' + Enabled: false -# Offense count: 28 +# Offense count: 27 Lint/ShadowingOuterLocalVariable: Enabled: false # Offense count: 10 # Cop supports --auto-correct. Lint/UnifiedInteger: - Exclude: - - 'spec/lib/gitlab/metrics/method_call_spec.rb' - - 'spec/lib/gitlab/metrics/metric_spec.rb' - - 'spec/lib/gitlab/metrics/system_spec.rb' - - 'spec/lib/gitlab/metrics/transaction_spec.rb' - - 'spec/models/repository_spec.rb' + Enabled: false # Offense count: 21 # Cop supports --auto-correct. Lint/UnneededSplatExpansion: - Exclude: - - 'config/application.rb' - - 'lib/banzai/filter/gollum_tags_filter.rb' - - 'lib/bitbucket/page.rb' - - 'lib/gitlab/markup_helper.rb' - - 'spec/helpers/auth_helper_spec.rb' - - 'spec/models/project_wiki_spec.rb' - - 'spec/requests/api/projects_spec.rb' - - 'spec/requests/api/tags_spec.rb' - - 'spec/support/seed_helper.rb' - - 'spec/support/test_env.rb' + Enabled: false # Offense count: 82 # Cop supports --auto-correct. @@ -77,28 +59,20 @@ Lint/UnusedBlockArgument: Lint/UnusedMethodArgument: Enabled: false -# Offense count: 94 +# Offense count: 93 # Configuration parameters: CountComments. Metrics/BlockLength: - Max: 289 + Max: 288 # Offense count: 3 # Cop supports --auto-correct. Performance/RedundantBlockCall: - Exclude: - - 'app/controllers/application_controller.rb' - - 'lib/gitlab/backend/shell.rb' - - 'lib/gitlab/optimistic_locking.rb' + Enabled: false # Offense count: 5 # Cop supports --auto-correct. Performance/RedundantMatch: - Exclude: - - 'app/models/external_issue.rb' - - 'lib/ci/api/helpers.rb' - - 'lib/extracts_path.rb' - - 'lib/gitlab/diff/highlight.rb' - - 'lib/gitlab/diff/parser.rb' + Enabled: false # Offense count: 32 # Cop supports --auto-correct. @@ -108,26 +82,16 @@ Performance/RedundantMerge: # Offense count: 7 RSpec/BeEql: - Exclude: - - 'spec/lib/gitlab/ldap/user_spec.rb' - - 'spec/lib/gitlab/o_auth/user_spec.rb' - - 'spec/lib/gitlab/saml/user_spec.rb' + Enabled: false # Offense count: 15 # Configuration parameters: CustomIncludeMethods. RSpec/EmptyExampleGroup: - Exclude: - - 'spec/features/issues_spec.rb' - - 'spec/features/notes_on_merge_requests_spec.rb' - - 'spec/lib/gitlab/git_access_spec.rb' - - 'spec/models/project_snippet_spec.rb' - - 'spec/models/protected_branch_spec.rb' - - 'spec/routing/routing_spec.rb' + Enabled: false # Offense count: 24 RSpec/ExpectActual: - Exclude: - - 'spec/lib/gitlab/regex_spec.rb' + Enabled: false # Offense count: 58 # Configuration parameters: EnforcedStyle, SupportedStyles. @@ -139,74 +103,48 @@ RSpec/HookArgument: # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: is_expected, should RSpec/ImplicitExpect: - Exclude: - - 'spec/lib/banzai/renderer_spec.rb' - - 'spec/models/project_group_link_spec.rb' - - 'spec/models/project_services/external_wiki_service_spec.rb' - - 'spec/models/project_spec.rb' + Enabled: false -# Offense count: 235 +# Offense count: 237 RSpec/LeadingSubject: Enabled: false -# Offense count: 246 +# Offense count: 253 RSpec/LetSetup: Enabled: false # Offense count: 13 RSpec/MessageChain: - Exclude: - - 'spec/finders/move_to_project_finder_spec.rb' - - 'spec/helpers/issues_helper_spec.rb' - - 'spec/initializers/secret_token_spec.rb' - - 'spec/models/build_spec.rb' - - 'spec/requests/api/internal_spec.rb' - - 'spec/services/merge_requests/build_service_spec.rb' - - 'spec/services/notes/create_service_spec.rb' - - 'spec/workers/emails_on_push_worker_spec.rb' - -# Offense count: 468 + Enabled: false + +# Offense count: 479 # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: have_received, receive RSpec/MessageSpies: Enabled: false -# Offense count: 3013 +# Offense count: 3036 RSpec/MultipleExpectations: Max: 37 -# Offense count: 2072 +# Offense count: 2133 RSpec/NamedSubject: Enabled: false -# Offense count: 1949 +# Offense count: 1974 # Configuration parameters: MaxNesting. RSpec/NestedGroups: Enabled: false # Offense count: 32 RSpec/RepeatedDescription: - Exclude: - - 'spec/controllers/projects/todo_controller_spec.rb' - - 'spec/features/boards/boards_spec.rb' - - 'spec/helpers/issuables_helper_spec.rb' - - 'spec/lib/banzai/filter/emoji_filter_spec.rb' - - 'spec/models/commit_range_spec.rb' - - 'spec/models/global_milestone_spec.rb' - - 'spec/models/hooks/system_hook_spec.rb' - - 'spec/requests/api/commits_spec.rb' - - 'spec/requests/api/merge_requests_spec.rb' - - 'spec/requests/api/users_spec.rb' - - 'spec/requests/lfs_http_spec.rb' - - 'spec/routing/admin_routing_spec.rb' - - 'spec/services/notification_service_spec.rb' + Enabled: false # Offense count: 1 RSpec/SingleArgumentMessageChain: - Exclude: - - 'spec/requests/api/internal_spec.rb' + Enabled: false -# Offense count: 125 +# Offense count: 133 RSpec/SubjectStub: Enabled: false @@ -217,7 +155,7 @@ RSpec/SubjectStub: Rails/DynamicFindBy: Enabled: false -# Offense count: 929 +# Offense count: 932 # Cop supports --auto-correct. # Configuration parameters: Include. # Include: spec/**/*, test/**/* @@ -228,7 +166,7 @@ Rails/HttpPositionalArguments: Rails/OutputSafety: Enabled: false -# Offense count: 181 +# Offense count: 182 # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: strict, flexible Rails/TimeZone: @@ -239,31 +177,15 @@ Rails/TimeZone: # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/Validation: - Exclude: - - 'app/models/ci/build.rb' - - 'app/models/ci/pipeline.rb' - - 'app/models/ci/runner_project.rb' - - 'app/models/ci/trigger.rb' - - 'app/models/commit_status.rb' - - 'app/models/members/group_member.rb' - - 'app/models/members/project_member.rb' - - 'app/models/project.rb' - - 'app/models/protected_branch.rb' - - 'app/models/user.rb' + Enabled: false # Offense count: 8 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect. Security/JSONLoad: - Exclude: - - 'db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb' - - 'db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb' - - 'db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb' - - 'spec/migrations/migrate_process_commit_worker_jobs_spec.rb' - - 'spec/models/project_services/irker_service_spec.rb' - - 'spec/support/stub_gitlab_calls.rb' + Enabled: false -# Offense count: 339 +# Offense count: 346 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: with_first_parameter, with_fixed_indentation @@ -277,14 +199,14 @@ Style/AlignParameters: Style/AndOr: Enabled: false -# Offense count: 53 +# Offense count: 54 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: percent_q, bare_percent Style/BarePercentLiterals: Enabled: false -# Offense count: 354 +# Offense count: 358 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: braces, no_braces, context_dependent @@ -293,13 +215,7 @@ Style/BracesAroundHashParameters: # Offense count: 6 Style/CaseEquality: - Exclude: - - 'app/helpers/auth_helper.rb' - - 'app/models/commit.rb' - - 'app/models/protected_branch.rb' - - 'app/services/projects/download_service.rb' - - 'config/initializers/trusted_proxies.rb' - - 'spec/features/calendar_spec.rb' + Enabled: false # Offense count: 37 # Cop supports --auto-correct. @@ -311,11 +227,7 @@ Style/ColonMethodCall: # Configuration parameters: Keywords. # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW Style/CommentAnnotation: - Exclude: - - 'config/routes/user.rb' - - 'lib/api/commits.rb' - - 'lib/api/entities.rb' - - 'spec/requests/api/project_snippets_spec.rb' + Enabled: false # Offense count: 29 # Cop supports --auto-correct. @@ -333,33 +245,12 @@ Style/DotPosition: # Offense count: 18 Style/DoubleNegation: - Exclude: - - 'app/controllers/users_controller.rb' - - 'app/models/commit.rb' - - 'app/models/merge_request.rb' - - 'app/models/project.rb' - - 'app/models/project_services/buildkite_service.rb' - - 'app/models/project_services/drone_ci_service.rb' - - 'app/models/project_wiki.rb' - - 'app/models/user.rb' - - 'config/initializers/6_validations.rb' - - 'lib/banzai/filter/relative_link_filter.rb' - - 'lib/gitlab/git/diff_collection.rb' - - 'lib/gitlab/git/repository.rb' - - 'lib/gitlab/sherlock.rb' - - 'lib/gitlab/sherlock/middleware.rb' + Enabled: false # Offense count: 7 # Cop supports --auto-correct. Style/EachWithObject: - Exclude: - - 'app/controllers/projects/cycle_analytics_controller.rb' - - 'app/services/merge_requests/get_urls_service.rb' - - 'lib/ci/ansi2html.rb' - - 'lib/expand_variables.rb' - - 'lib/gitlab/ee_compat_check.rb' - - 'lib/gitlab/import_export/members_mapper.rb' - - 'lib/gitlab/import_export/relation_factory.rb' + Enabled: false # Offense count: 24 # Cop supports --auto-correct. @@ -371,11 +262,7 @@ Style/EmptyElse: # Offense count: 4 # Cop supports --auto-correct. Style/EmptyLiteral: - Exclude: - - 'features/steps/project/commits/commits.rb' - - 'lib/gitlab/fogbugz_import/importer.rb' - - 'lib/gitlab/git/diff_collection.rb' - - 'spec/lib/gitlab/workhorse_spec.rb' + Enabled: false # Offense count: 57 # Cop supports --auto-correct. @@ -384,7 +271,7 @@ Style/EmptyLiteral: Style/EmptyMethod: Enabled: false -# Offense count: 145 +# Offense count: 147 # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. Style/ExtraSpacing: @@ -394,33 +281,16 @@ Style/ExtraSpacing: # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: format, sprintf, percent Style/FormatString: - Exclude: - - 'app/models/ci/pipeline.rb' - - 'app/services/gravatar_service.rb' - - 'config/initializers/rack_lineprof.rb' - - 'lib/gitlab/version_info.rb' - - 'spec/factories/lfs_objects.rb' - - 'spec/services/issues/move_service_spec.rb' - -# Offense count: 236 + Enabled: false + +# Offense count: 238 # Configuration parameters: MinBodyLength. Style/GuardClause: Enabled: false # Offense count: 11 Style/IfInsideElse: - Exclude: - - 'app/controllers/projects/forks_controller.rb' - - 'app/controllers/projects/imports_controller.rb' - - 'app/helpers/milestones_helper.rb' - - 'app/helpers/projects_helper.rb' - - 'app/services/system_note_service.rb' - - 'config/initializers/1_settings.rb' - - 'lib/gitlab/auth.rb' - - 'lib/gitlab/checks/change_access.rb' - - 'lib/gitlab/database.rb' - - 'spec/controllers/projects/merge_requests_controller_spec.rb' - - 'spec/support/import_export/export_file_helper.rb' + Enabled: false # Offense count: 173 # Cop supports --auto-correct. @@ -435,7 +305,7 @@ Style/IfUnlessModifier: Style/IndentArray: Enabled: false -# Offense count: 99 +# Offense count: 101 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_braces @@ -452,49 +322,23 @@ Style/Lambda: # Offense count: 5 # Cop supports --auto-correct. Style/LineEndConcatenation: - Exclude: - - 'app/helpers/preferences_helper.rb' - - 'app/helpers/tree_helper.rb' - - 'app/models/merge_request.rb' - - 'spec/lib/gitlab/gfm/reference_rewriter_spec.rb' + Enabled: false # Offense count: 19 # Cop supports --auto-correct. Style/MethodCallParentheses: - Exclude: - - 'lib/ci/ansi2html.rb' - - 'spec/controllers/dashboard/todos_controller_spec.rb' - - 'spec/controllers/projects/issues_controller_spec.rb' - - 'spec/controllers/projects/merge_requests_controller_spec.rb' - - 'spec/controllers/projects/snippets_controller_spec.rb' - - 'spec/features/calendar_spec.rb' - - 'spec/features/dashboard/datetime_on_tooltips_spec.rb' - - 'spec/helpers/submodule_helper_spec.rb' - - 'spec/lib/gitlab/git/repository_spec.rb' - - 'spec/requests/api/internal_spec.rb' + Enabled: false # Offense count: 9 Style/MethodMissing: - Exclude: - - 'app/controllers/projects/application_controller.rb' - - 'app/models/commit.rb' - - 'app/models/network/commit.rb' - - 'app/models/repository.rb' - - 'config/initializers/gollum.rb' - - 'lib/bitbucket/collection.rb' - - 'lib/gitlab/github_import/client.rb' - - 'lib/gitlab/lazy.rb' - - 'lib/uploaded_file.rb' + Enabled: false # Offense count: 3 # Cop supports --auto-correct. Style/MultilineIfModifier: - Exclude: - - 'app/helpers/snippets_helper.rb' - - 'app/models/merge_request.rb' - - 'app/models/project_wiki.rb' + Enabled: false -# Offense count: 178 +# Offense count: 179 # Cop supports --auto-correct. Style/MutableConstant: Enabled: false @@ -502,49 +346,21 @@ Style/MutableConstant: # Offense count: 8 # Cop supports --auto-correct. Style/NestedParenthesizedCalls: - Exclude: - - 'app/helpers/commits_helper.rb' - - 'app/workers/irker_worker.rb' - - 'spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb' - - 'spec/lib/gitlab/email/message/repository_push_spec.rb' + Enabled: false # Offense count: 13 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. # SupportedStyles: skip_modifier_ifs, always Style/Next: - Exclude: - - 'app/models/namespace.rb' - - 'app/models/user.rb' - - 'config/initializers/secret_token.rb' - - 'db/migrate/20161220141214_remove_dot_git_from_group_names.rb' - - 'db/migrate/20161226122833_remove_dot_git_from_usernames.rb' - - 'lib/banzai/filter/math_filter.rb' - - 'lib/banzai/filter/table_of_contents_filter.rb' - - 'lib/gitlab/fogbugz_import/importer.rb' - - 'lib/gitlab/metrics/instrumentation.rb' - - 'lib/gitlab/metrics/sampler.rb' - - 'lib/gitlab/project_search_results.rb' + Enabled: false # Offense count: 19 # Cop supports --auto-correct. # Configuration parameters: EnforcedOctalStyle, SupportedOctalStyles. # SupportedOctalStyles: zero_with_o, zero_only Style/NumericLiteralPrefix: - Exclude: - - 'config/initializers/1_settings.rb' - - 'config/initializers/secret_token.rb' - - 'lib/gitlab/backend/shell.rb' - - 'lib/gitlab/import_export/command_line_util.rb' - - 'lib/gitlab/workhorse.rb' - - 'spec/features/projects/import_export/export_file_spec.rb' - - 'spec/lib/gitlab/git/blob_spec.rb' - - 'spec/lib/gitlab/git/hook_spec.rb' - - 'spec/lib/gitlab/git/repository_spec.rb' - - 'spec/lib/gitlab/workhorse_spec.rb' - - 'spec/support/import_export/export_file_helper.rb' - - 'spec/support/test_env.rb' - - 'spec/tasks/gitlab/backup_rake_spec.rb' + Enabled: false # Offense count: 19 # Cop supports --auto-correct. @@ -558,7 +374,7 @@ Style/NumericPredicate: Style/ParallelAssignment: Enabled: false -# Offense count: 416 +# Offense count: 417 # Cop supports --auto-correct. # Configuration parameters: PreferredDelimiters. Style/PercentLiteralDelimiters: @@ -569,28 +385,14 @@ Style/PercentLiteralDelimiters: # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: lower_case_q, upper_case_q Style/PercentQLiterals: - Exclude: - - 'spec/lib/gitlab/diff/highlight_spec.rb' - - 'spec/models/project_services/bamboo_service_spec.rb' - - 'spec/models/project_services/teamcity_service_spec.rb' - - 'spec/workers/repository_import_worker_spec.rb' + Enabled: false # Offense count: 13 # Cop supports --auto-correct. Style/PerlBackrefs: - Exclude: - - 'app/controllers/projects/application_controller.rb' - - 'app/helpers/submodule_helper.rb' - - 'lib/banzai/filter/abstract_reference_filter.rb' - - 'lib/banzai/filter/autolink_filter.rb' - - 'lib/banzai/filter/emoji_filter.rb' - - 'lib/banzai/filter/gollum_tags_filter.rb' - - 'lib/expand_variables.rb' - - 'lib/gitlab/diff/highlight.rb' - - 'lib/gitlab/search_results.rb' - - 'lib/gitlab/sherlock/query.rb' - -# Offense count: 63 + Enabled: false + +# Offense count: 64 # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist. # NamePrefix: is_, has_, have_ # NamePrefixBlacklist: is_, has_, have_ @@ -608,13 +410,7 @@ Style/PreferredHashMethods: # Offense count: 8 # Cop supports --auto-correct. Style/Proc: - Exclude: - - 'app/mailers/base_mailer.rb' - - 'app/models/milestone.rb' - - 'app/models/service.rb' - - 'lib/api/api_guard.rb' - - 'lib/gitlab/ldap/config.rb' - - 'spec/initializers/trusted_proxies_spec.rb' + Enabled: false # Offense count: 50 # Cop supports --auto-correct. @@ -626,47 +422,23 @@ Style/RaiseArgs: # Offense count: 4 # Cop supports --auto-correct. Style/RedundantBegin: - Exclude: - - 'app/models/ci/build.rb' - - 'app/models/merge_request.rb' - - 'app/services/projects/import_service.rb' - - 'lib/gitlab/git/commit.rb' + Enabled: false # Offense count: 1 # Cop supports --auto-correct. Style/RedundantException: - Exclude: - - 'app/helpers/preferences_helper.rb' + Enabled: false # Offense count: 29 # Cop supports --auto-correct. Style/RedundantFreeze: - Exclude: - - 'app/models/merge_request.rb' - - 'app/validators/color_validator.rb' - - 'app/validators/line_code_validator.rb' - - 'lib/api/templates.rb' - - 'lib/banzai/filter/blockquote_fence_filter.rb' - - 'lib/banzai/filter/gollum_tags_filter.rb' - - 'lib/banzai/filter/yaml_front_matter_filter.rb' - - 'lib/gitlab/diff/inline_diff.rb' - - 'lib/gitlab/ee_compat_check.rb' - - 'lib/gitlab/import_export/relation_factory.rb' - - 'lib/gitlab/incoming_email.rb' - - 'lib/gitlab/middleware/static.rb' - - 'lib/gitlab/regex.rb' + Enabled: false # Offense count: 11 # Cop supports --auto-correct. # Configuration parameters: AllowMultipleReturnValues. Style/RedundantReturn: - Exclude: - - 'app/controllers/concerns/issuable_actions.rb' - - 'app/controllers/groups/application_controller.rb' - - 'app/controllers/groups_controller.rb' - - 'app/controllers/projects/labels_controller.rb' - - 'app/controllers/projects/milestones_controller.rb' - - 'app/services/access_token_validation_service.rb' + Enabled: false # Offense count: 359 # Cop supports --auto-correct. @@ -683,49 +455,26 @@ Style/RegexpLiteral: # Offense count: 19 # Cop supports --auto-correct. Style/RescueModifier: - Exclude: - - 'app/controllers/admin/system_info_controller.rb' - - 'app/controllers/users_controller.rb' - - 'app/helpers/blob_helper.rb' - - 'app/helpers/issues_helper.rb' - - 'app/models/diff_note.rb' - - 'app/models/project_services/external_wiki_service.rb' - - 'app/models/sent_notification.rb' - - 'app/models/todo.rb' - - 'config/initializers/1_settings.rb' - - 'config/initializers/attr_encrypted_no_db_connection.rb' - - 'lib/gitlab/current_settings.rb' - - 'lib/gitlab/diff/parser.rb' - - 'lib/gitlab/kubernetes.rb' - - 'lib/gitlab/slash_commands/command_definition.rb' - - 'spec/support/matchers/be_url.rb' + Enabled: false # Offense count: 7 # Cop supports --auto-correct. Style/SelfAssignment: - Exclude: - - 'app/models/project_team.rb' - - 'app/services/notification_service.rb' - - 'lib/api/runners.rb' - - 'spec/features/merge_requests/diff_notes_resolve_spec.rb' - - 'spec/support/import_export/configuration_helper.rb' + Enabled: false # Offense count: 2 # Configuration parameters: Methods. # Methods: {"reduce"=>["acc", "elem"]}, {"inject"=>["acc", "elem"]} Style/SingleLineBlockParams: - Exclude: - - 'app/models/commit.rb' - - 'spec/support/services_shared_context.rb' + Enabled: false # Offense count: 50 # Cop supports --auto-correct. # Configuration parameters: AllowIfMethodIsEmpty. Style/SingleLineMethods: - Exclude: - - 'lib/ci/ansi2html.rb' + Enabled: false -# Offense count: 140 +# Offense count: 138 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: space, no_space @@ -736,33 +485,14 @@ Style/SpaceBeforeBlockBraces: # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment. Style/SpaceBeforeFirstArg: - Exclude: - - 'config/routes/project.rb' - - 'features/steps/project/source/browse_files.rb' - - 'features/steps/project/source/markdown_render.rb' - - 'spec/routing/project_routing_spec.rb' - - 'spec/services/system_note_service_spec.rb' + Enabled: false # Offense count: 37 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: require_no_space, require_space Style/SpaceInLambdaLiteral: - Exclude: - - 'app/models/concerns/mentionable.rb' - - 'app/models/issue.rb' - - 'app/models/member.rb' - - 'lib/api/entities.rb' - - 'lib/file_size_validator.rb' - - 'lib/gitlab/visibility_level.rb' - - 'spec/models/concerns/participable_spec.rb' - - 'spec/models/cycle_analytics/code_spec.rb' - - 'spec/models/cycle_analytics/issue_spec.rb' - - 'spec/models/cycle_analytics/plan_spec.rb' - - 'spec/models/cycle_analytics/production_spec.rb' - - 'spec/models/cycle_analytics/review_spec.rb' - - 'spec/models/cycle_analytics/staging_spec.rb' - - 'spec/models/cycle_analytics/test_spec.rb' + Enabled: false # Offense count: 174 # Cop supports --auto-correct. @@ -784,8 +514,7 @@ Style/SpaceInsideParens: # Offense count: 4 # Cop supports --auto-correct. Style/SpaceInsidePercentLiteralDelimiters: - Exclude: - - 'lib/gitlab/git_access.rb' + Enabled: false # Offense count: 53 # Cop supports --auto-correct. @@ -799,23 +528,9 @@ Style/SpecialGlobalVars: # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: single_quotes, double_quotes Style/StringLiteralsInInterpolation: - Exclude: - - 'app/helpers/labels_helper.rb' - - 'app/helpers/time_helper.rb' - - 'app/helpers/todos_helper.rb' - - 'app/models/application_setting.rb' - - 'app/models/project_services/campfire_service.rb' - - 'app/models/project_services/jira_service.rb' - - 'db/migrate/20161017125927_add_unique_index_to_labels.rb' - - 'features/steps/groups.rb' - - 'features/steps/project/merge_requests.rb' - - 'lib/banzai/filter/abstract_reference_filter.rb' - - 'lib/ci/gitlab_ci_yaml_processor.rb' - - 'lib/gitlab/google_code_import/importer.rb' - - 'spec/lib/banzai/filter/issue_reference_filter_spec.rb' - - 'spec/models/project_services/hipchat_service_spec.rb' - -# Offense count: 52 + Enabled: false + +# Offense count: 54 # Cop supports --auto-correct. # Configuration parameters: IgnoredMethods. # IgnoredMethods: respond_to, define_method @@ -827,21 +542,16 @@ Style/SymbolProc: # Configuration parameters: EnforcedStyle, SupportedStyles, AllowSafeAssignment. # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex Style/TernaryParentheses: - Exclude: - - 'features/support/capybara.rb' - - 'lib/api/projects.rb' - - 'lib/banzai/filter/table_of_contents_filter.rb' - - 'lib/gitlab/ci/build/artifacts/metadata/entry.rb' - - 'spec/support/capybara.rb' + Enabled: false -# Offense count: 35 +# Offense count: 36 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles. # SupportedStyles: comma, consistent_comma, no_comma Style/TrailingCommaInArguments: Enabled: false -# Offense count: 149 +# Offense count: 150 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles. # SupportedStyles: comma, consistent_comma, no_comma @@ -852,15 +562,9 @@ Style/TrailingCommaInLiteral: # Cop supports --auto-correct. # Configuration parameters: AllowNamedUnderscoreVariables. Style/TrailingUnderscoreVariable: - Exclude: - - 'app/controllers/admin/background_jobs_controller.rb' - - 'app/controllers/invites_controller.rb' - - 'app/controllers/projects/git_http_client_controller.rb' - - 'app/helpers/tab_helper.rb' - - 'lib/gitlab/git/repository.rb' - - 'lib/gitlab/logger.rb' + Enabled: false -# Offense count: 66 +# Offense count: 67 # Cop supports --auto-correct. Style/TrailingWhitespace: Enabled: false @@ -870,44 +574,19 @@ Style/TrailingWhitespace: # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist. # Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym Style/TrivialAccessors: - Exclude: - - 'app/models/external_issue.rb' - - 'app/serializers/base_serializer.rb' - - 'lib/gitlab/ldap/person.rb' + Enabled: false # Offense count: 2 # Cop supports --auto-correct. Style/UnlessElse: - Exclude: - - 'lib/gitlab/project_search_results.rb' - - 'spec/features/issues/award_emoji_spec.rb' + Enabled: false # Offense count: 17 # Cop supports --auto-correct. Style/UnneededInterpolation: - Exclude: - - 'app/helpers/boards_helper.rb' - - 'app/helpers/projects_helper.rb' - - 'app/helpers/search_helper.rb' - - 'app/helpers/time_helper.rb' - - 'app/models/merge_request.rb' - - 'app/models/project_services/pushover_service.rb' - - 'features/steps/project/forked_merge_requests.rb' - - 'spec/features/admin/admin_projects_spec.rb' - - 'spec/features/issues_spec.rb' - - 'spec/features/projects/branches_spec.rb' - - 'spec/features/projects/issuable_templates_spec.rb' - - 'spec/lib/banzai/filter/issue_reference_filter_spec.rb' - - 'spec/views/projects/commit/_commit_box.html.haml_spec.rb' + Enabled: false # Offense count: 8 # Cop supports --auto-correct. Style/ZeroLengthPredicate: - Exclude: - - 'app/models/deploy_key.rb' - - 'app/models/merge_request.rb' - - 'app/models/network/commit.rb' - - 'app/models/network/graph.rb' - - 'app/models/project_services/asana_service.rb' - - 'app/models/repository.rb' - - 'lib/extracts_path.rb' + Enabled: false