From 9c6746aa41dcbf1df285421b529e756302a97fc5 Mon Sep 17 00:00:00 2001 From: Siddharth Asthana Date: Wed, 3 Aug 2022 23:32:37 +0530 Subject: [PATCH 1/2] RuboCop: Enable previously disabled Style/IfInsideElse Changelog: other --- .rubocop_todo/style/if_inside_else.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.rubocop_todo/style/if_inside_else.yml b/.rubocop_todo/style/if_inside_else.yml index 3ce6e5ec704218..40b71d7de04849 100644 --- a/.rubocop_todo/style/if_inside_else.yml +++ b/.rubocop_todo/style/if_inside_else.yml @@ -1,17 +1,13 @@ --- Style/IfInsideElse: - # Offense count: 43 - # Temporarily disabled due to too many offenses - Enabled: false Exclude: - 'app/controllers/application_controller.rb' - 'app/controllers/passwords_controller.rb' - 'app/finders/projects_finder.rb' - - 'app/finders/user_recent_events_finder.rb' - 'app/helpers/diff_helper.rb' + - 'app/helpers/issuables_helper.rb' - 'app/helpers/members_helper.rb' - 'app/helpers/search_helper.rb' - - 'app/models/ci/build.rb' - 'app/models/namespace.rb' - 'app/presenters/project_presenter.rb' - 'app/services/system_notes/commit_service.rb' @@ -22,6 +18,7 @@ Style/IfInsideElse: - 'ee/app/controllers/ee/registrations/welcome_controller.rb' - 'ee/app/controllers/groups/omniauth_callbacks_controller.rb' - 'ee/app/models/ee/namespace.rb' + - 'ee/app/models/iterations/cadence.rb' - 'ee/app/models/protected_environments/authorizable.rb' - 'ee/app/policies/ee/group_policy.rb' - 'ee/app/services/app_sec/dast/site_profiles/audit/update_service.rb' @@ -30,12 +27,15 @@ Style/IfInsideElse: - 'ee/app/services/geo/repository_base_sync_service.rb' - 'ee/app/services/gitlab_subscriptions/fetch_subscription_plans_service.rb' - 'ee/app/services/vulnerability_external_issue_links/create_service.rb' + - 'ee/app/workers/elastic/project_transfer_worker.rb' + - 'ee/app/workers/project_import_schedule_worker.rb' - 'ee/lib/gitlab/geo/base_batcher.rb' - 'lib/api/projects.rb' - 'lib/gitlab/auth.rb' - 'lib/gitlab/conflict/file.rb' - 'lib/gitlab/sql/pattern.rb' - 'lib/gitlab/usage/service_ping/payload_keys_processor.rb' + - 'lib/service_ping/build_payload.rb' - 'lib/tasks/gitlab/cleanup.rake' - 'lib/tasks/gitlab/shell.rake' - 'qa/qa/resource/protected_branch.rb' -- GitLab From 1fb5666829f67697b7364d0953d7a6c2f97d381b Mon Sep 17 00:00:00 2001 From: Peter Leitzen Date: Wed, 10 Aug 2022 15:11:41 +0200 Subject: [PATCH 2/2] Disable RuboCop Style/IfInsideElse in HAML lint --- .haml-lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.haml-lint.yml b/.haml-lint.yml index 5e7b600097a329..338b7b062cc0d6 100644 --- a/.haml-lint.yml +++ b/.haml-lint.yml @@ -130,6 +130,7 @@ linters: - Style/ColonMethodCall - Style/ConditionalAssignment - Style/HashSyntax + - Style/IfInsideElse - Style/IdenticalConditionalBranches - Style/NegatedIf - Style/NestedTernaryOperator -- GitLab