diff --git a/.rubocop_todo/style/hash_each_methods.yml b/.rubocop_todo/style/hash_each_methods.yml index 648b6fbbe08de90e424f9503e94dc853d3fe120b..cebfe5c0c7d634b4c75dafe7fa17fccf46a10674 100644 --- a/.rubocop_todo/style/hash_each_methods.yml +++ b/.rubocop_todo/style/hash_each_methods.yml @@ -1,9 +1,6 @@ --- # Cop supports --auto-correct. Style/HashEachMethods: - # Offense count: 95 - # Temporarily disabled due to too many offenses - Enabled: false Exclude: - 'app/graphql/resolvers/concerns/caching_array_resolver.rb' - 'app/graphql/types/alert_management/severity_enum.rb' @@ -12,6 +9,7 @@ Style/HashEachMethods: - 'app/graphql/types/ci/job_artifact_file_type_enum.rb' - 'app/graphql/types/ci/pipeline_config_source_enum.rb' - 'app/graphql/types/ci/runner_access_level_enum.rb' + - 'app/graphql/types/ci/variable_type_enum.rb' - 'app/graphql/types/clusters/agent_token_status_enum.rb' - 'app/graphql/types/container_repository_status_enum.rb' - 'app/graphql/types/data_visualization_palette/color_enum.rb' @@ -34,6 +32,7 @@ Style/HashEachMethods: - 'config/initializers/8_gitaly.rb' - 'ee/app/graphql/types/compliance_management/merge_requests/compliance_violation_reason_enum.rb' - 'ee/app/graphql/types/compliance_management/merge_requests/compliance_violation_severity_enum.rb' + - 'ee/app/graphql/types/incident_management/issuable_resource_link_type_enum.rb' - 'ee/app/graphql/types/incident_management/oncall_rotation_length_unit_enum.rb' - 'ee/app/graphql/types/security_report_summary_type.rb' - 'ee/app/graphql/types/vulnerabilities_count_by_day_type.rb' @@ -69,7 +68,6 @@ Style/HashEachMethods: - 'spec/helpers/application_helper_spec.rb' - 'spec/lib/gitlab/ci/status/build/failed_spec.rb' - 'spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb' - - 'spec/lib/gitlab/template/gitlab_ci_yml_template_spec.rb' - 'spec/lib/gitlab/usage_data_spec.rb' - 'spec/models/ci/build_spec.rb' - 'spec/models/ci/job_artifact_spec.rb' @@ -77,6 +75,7 @@ Style/HashEachMethods: - 'spec/models/clusters/cluster_spec.rb' - 'spec/models/concerns/has_user_type_spec.rb' - 'spec/models/packages/package_spec.rb' + - 'spec/models/project_spec.rb' - 'spec/models/user_spec.rb' - 'spec/presenters/ci/pipeline_presenter_spec.rb' - 'spec/presenters/commit_status_presenter_spec.rb' diff --git a/app/views/admin/application_settings/_repository_storage.html.haml b/app/views/admin/application_settings/_repository_storage.html.haml index 5dc2d322bb30c042d91d81c1dcacb883fcbe0494..ff10e4a8f77ece0b74a0a41fa601face98e5572f 100644 --- a/app/views/admin/application_settings/_repository_storage.html.haml +++ b/app/views/admin/application_settings/_repository_storage.html.haml @@ -23,7 +23,7 @@ = link_to s_('Learn more.'), help_page_path('administration/repository_storage_paths.md'), target: '_blank', rel: 'noopener noreferrer' .form-check = f.fields_for :repository_storages_weighted, storage_weights do |storage_form| - - Gitlab.config.repositories.storages.keys.each do |storage| + - Gitlab.config.repositories.storages.each_key do |storage| = storage_form.text_field storage, class: 'form-text-input' = storage_form.label storage, storage, class: 'label-bold form-check-label' %br diff --git a/app/views/admin/application_settings/_whats_new.html.haml b/app/views/admin/application_settings/_whats_new.html.haml index 8ae912d24b709d9b28b167b0a0e26602a694f0bc..d82bb1c94e498ff5049f2905e26490adbd293462 100644 --- a/app/views/admin/application_settings/_whats_new.html.haml +++ b/app/views/admin/application_settings/_whats_new.html.haml @@ -1,7 +1,7 @@ = gitlab_ui_form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-whats-new-settings'), html: { class: 'fieldset-form whats-new-settings' } do |f| = form_errors(@application_setting, pajamas_alert: true) - - whats_new_variants.keys.each do |variant| + - whats_new_variants.each_key do |variant| .gl-mb-4 = f.gitlab_ui_radio_component :whats_new_variant, variant, whats_new_variants_label(variant), help_text: whats_new_variants_description(variant)