Fix auto-correctable `Style/EmptyElse` Cop
What does this MR do and why?
Fixes auto-correctable RuboCop offenses for Style/EmptyElse in excludes
Some files have been left in exclude for the following reasons:
Comments in else clause:
app/models/performance_monitoring/prometheus_dashboard.rbapp/models/resource_state_event.rbapp/models/resource_timebox_event.rbapp/services/award_emojis/add_service.rbapp/workers/post_receive.rbconfig/initializers/doorkeeper_openid_connect.rbee/app/helpers/ee/kerberos_helper.rbee/app/services/projects/update_mirror_service.rbee/lib/elastic/latest/note_instance_proxy.rbee/lib/gitlab/analytics/cycle_analytics/summary/change_failure_rate.rblib/gitlab/ci/variables/collection.rblib/gitlab/database/load_balancing/sidekiq_server_middleware.rblib/gitlab/sidekiq_daemon/monitor.rb
Causes other Cops to throw an error and fails commit hook:
app/controllers/concerns/sends_blob.rbapp/controllers/google_api/authorizations_controller.rbapp/finders/group_finder.rbapp/graphql/resolvers/group_milestones_resolver.rbapp/graphql/types/ci/detailed_status_type.rbapp/models/legacy_diff_discussion.rbee/app/services/gitlab_subscriptions/check_future_renewal_service.rblib/gitlab/auth/o_auth/provider.rblib/gitlab/database/sha256_attribute.rblib/gitlab/git.rblib/peek/views/external_http.rb
Screenshots or screen recordings
No visual changes
How to set up and validate locally
- Run
rubocop --only Style/EmptyElse
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #239356