diff --git a/.rubocop_todo/database/avoid_using_pluck_without_limit.yml b/.rubocop_todo/database/avoid_using_pluck_without_limit.yml index 690961890b9..3fd82482aba 100644 --- a/.rubocop_todo/database/avoid_using_pluck_without_limit.yml +++ b/.rubocop_todo/database/avoid_using_pluck_without_limit.yml @@ -139,7 +139,6 @@ Database/AvoidUsingPluckWithoutLimit: - 'ee/app/services/approval_rules/params_filtering_service.rb' - 'ee/app/services/click_house/data_ingestion/ci_finished_builds_sync_service.rb' - 'ee/app/services/ee/groups/destroy_service.rb' - - 'ee/app/services/ee/search/global_service.rb' - 'ee/app/services/epics/update_dates_service.rb' - 'ee/app/services/gitlab_subscriptions/preview_billable_user_change_service.rb' - 'ee/app/services/security/merge_request_security_report_generation_service.rb' diff --git a/.rubocop_todo/gemspec/add_runtime_dependency.yml b/.rubocop_todo/gemspec/add_runtime_dependency.yml index a70c8debc00..50bd80e5a6c 100644 --- a/.rubocop_todo/gemspec/add_runtime_dependency.yml +++ b/.rubocop_todo/gemspec/add_runtime_dependency.yml @@ -1,3 +1,4 @@ --- +# Cop supports --autocorrect. Gemspec/AddRuntimeDependency: Details: grace period diff --git a/.rubocop_todo/gitlab/documentation_links/link.yml b/.rubocop_todo/gitlab/documentation_links/link.yml index 17532e23e8d..8ebf9ec31ac 100644 --- a/.rubocop_todo/gitlab/documentation_links/link.yml +++ b/.rubocop_todo/gitlab/documentation_links/link.yml @@ -25,7 +25,6 @@ Gitlab/DocumentationLinks/Link: - 'ee/app/helpers/vulnerabilities_helper.rb' - 'ee/app/models/integrations/github.rb' - 'ee/app/presenters/ee/merge_request_presenter.rb' - - 'ee/app/presenters/gitlab_subscriptions/trials/duo_enterprise_status_widget_presenter.rb' - 'ee/lib/api/managed_licenses.rb' - 'ee/lib/ee/gitlab/namespace_storage_size_error_message.rb' - 'ee/lib/gitlab/checks/secrets_check.rb' diff --git a/.rubocop_todo/gitlab/namespaced_class.yml b/.rubocop_todo/gitlab/namespaced_class.yml index 20c7209f750..621ddb1b797 100644 --- a/.rubocop_todo/gitlab/namespaced_class.yml +++ b/.rubocop_todo/gitlab/namespaced_class.yml @@ -408,7 +408,6 @@ Gitlab/NamespacedClass: - 'app/presenters/group_clusterable_presenter.rb' - 'app/presenters/group_member_presenter.rb' - 'app/presenters/instance_clusterable_presenter.rb' - - 'app/presenters/issue_email_participant_presenter.rb' - 'app/presenters/issue_presenter.rb' - 'app/presenters/label_presenter.rb' - 'app/presenters/member_presenter.rb' diff --git a/.rubocop_todo/layout/extra_spacing.yml b/.rubocop_todo/layout/extra_spacing.yml index 76ca09f9f14..5f0e5e91bbf 100644 --- a/.rubocop_todo/layout/extra_spacing.yml +++ b/.rubocop_todo/layout/extra_spacing.yml @@ -14,5 +14,4 @@ Layout/ExtraSpacing: - 'ee/spec/services/app_sec/fuzzing/api/ci_configuration_create_service_spec.rb' - 'ee/spec/services/ci/create_pipeline_service/dast_configuration_spec.rb' - 'spec/lib/gitlab/database/background_migration/batch_optimizer_spec.rb' - - 'spec/lib/gitlab/database/no_new_tables_with_gitlab_main_schema_spec.rb' - 'spec/lib/gitlab/database/reindexing/index_selection_spec.rb' diff --git a/.rubocop_todo/layout/first_hash_element_indentation.yml b/.rubocop_todo/layout/first_hash_element_indentation.yml index b5b6af90ddf..7b70ce48fe7 100644 --- a/.rubocop_todo/layout/first_hash_element_indentation.yml +++ b/.rubocop_todo/layout/first_hash_element_indentation.yml @@ -70,7 +70,6 @@ Layout/FirstHashElementIndentation: - 'spec/lib/gitlab/import_export/members_mapper_spec.rb' - 'spec/lib/gitlab/instrumentation_helper_spec.rb' - 'spec/lib/gitlab/metrics/subscribers/action_cable_spec.rb' - - 'spec/lib/gitlab/sidekiq_migrate_jobs_spec.rb' - 'spec/lib/gitlab/workhorse_spec.rb' - 'spec/lib/mattermost/team_spec.rb' - 'spec/lib/peek/views/redis_detailed_spec.rb' diff --git a/.rubocop_todo/layout/line_break_after_final_mixin.yml b/.rubocop_todo/layout/line_break_after_final_mixin.yml index a79e0786598..0546ed82369 100644 --- a/.rubocop_todo/layout/line_break_after_final_mixin.yml +++ b/.rubocop_todo/layout/line_break_after_final_mixin.yml @@ -7,8 +7,6 @@ Layout/LineBreakAfterFinalMixin: - 'app/models/alert_management/metric_image.rb' - 'app/models/integrations/pushover.rb' - 'app/models/integrations/telegram.rb' - - 'app/models/plan_limits.rb' - - 'app/models/project_feature_usage.rb' - 'app/models/protected_branch/merge_access_level.rb' - 'app/models/protected_branch/push_access_level.rb' - 'app/policies/project_member_policy.rb' @@ -63,7 +61,6 @@ Layout/LineBreakAfterFinalMixin: - 'ee/app/models/approval_project_rules_protected_branch.rb' - 'ee/app/models/approval_rules/approval_group_rule.rb' - 'ee/app/models/approval_rules/approval_group_rules_protected_branch.rb' - - 'ee/app/models/namespace_limit.rb' - 'ee/app/models/vulnerabilities/scanner.rb' - 'ee/app/models/vulnerabilities/statistic.rb' - 'ee/app/services/ee/ip_restrictions/update_service.rb' diff --git a/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml b/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml index f59795126ad..20e04abc43c 100644 --- a/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml +++ b/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml @@ -402,7 +402,6 @@ Layout/LineEndStringConcatenationIndentation: - 'lib/gitlab/config_checker/external_database_checker.rb' - 'lib/gitlab/database/background_migration/batched_migration_runner.rb' - 'lib/gitlab/database/decomposition/migrate.rb' - - 'lib/gitlab/database/dictionary.rb' - 'lib/gitlab/database/gitlab_schema.rb' - 'lib/gitlab/database/migration_helpers/wraparound_vacuum_helpers.rb' - 'lib/gitlab/database/migrations/pg_backend_pid.rb' diff --git a/.rubocop_todo/layout/line_length.yml b/.rubocop_todo/layout/line_length.yml index ab0cecfcd75..2b6b80c5537 100644 --- a/.rubocop_todo/layout/line_length.yml +++ b/.rubocop_todo/layout/line_length.yml @@ -367,7 +367,6 @@ Layout/LineLength: - 'app/presenters/instance_clusterable_presenter.rb' - 'app/presenters/merge_request_presenter.rb' - 'app/presenters/packages/composer/packages_presenter.rb' - - 'app/presenters/packages/conan/package_presenter.rb' - 'app/presenters/project_clusterable_presenter.rb' - 'app/presenters/project_presenter.rb' - 'app/presenters/snippet_blob_presenter.rb' @@ -584,7 +583,6 @@ Layout/LineLength: - 'config/initializers/zz_metrics.rb' - 'config/routes.rb' - 'config/routes/admin.rb' - - 'config/routes/api.rb' - 'config/routes/group.rb' - 'config/routes/import.rb' - 'config/routes/project.rb' @@ -2610,7 +2608,6 @@ Layout/LineLength: - 'qa/qa/specs/features/browser_ui/4_verify/pipeline/merge_mr_when_pipline_is_blocked_spec.rb' - 'qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_matrix_spec.rb' - 'qa/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb' - - 'qa/qa/specs/features/ee/api/2_plan/epics_milestone_dates_spec.rb' - 'qa/qa/specs/features/ee/api/3_create/wiki/group_wiki_repository_storage_move_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/11_fulfillment/license/license_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/2_plan/burndown_chart/burndown_chart_spec.rb' @@ -2637,7 +2634,6 @@ Layout/LineLength: - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/merge_with_code_owner_in_subgroup_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_http_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_ssh_with_key_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/push_rules_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/4_verify/pipeline_subscription_with_group_owned_project_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/4_verify/transient/merge_trains_transient_bug_spec.rb' @@ -4498,7 +4494,6 @@ Layout/LineLength: - 'spec/workers/container_expiration_policies/cleanup_container_repository_worker_spec.rb' - 'spec/workers/container_expiration_policy_worker_spec.rb' - 'spec/workers/create_pipeline_worker_spec.rb' - - 'spec/workers/dependency_proxy/image_ttl_group_policy_worker_spec.rb' - 'spec/workers/deployments/update_environment_worker_spec.rb' - 'spec/workers/disallow_two_factor_for_subgroups_worker_spec.rb' - 'spec/workers/email_receiver_worker_spec.rb' diff --git a/.rubocop_todo/lint/constant_definition_in_block.yml b/.rubocop_todo/lint/constant_definition_in_block.yml index 32d4d57066d..6c044632588 100644 --- a/.rubocop_todo/lint/constant_definition_in_block.yml +++ b/.rubocop_todo/lint/constant_definition_in_block.yml @@ -31,7 +31,6 @@ Lint/ConstantDefinitionInBlock: - 'lib/tasks/gitlab/db.rake' - 'lib/tasks/gitlab/db/validate_config.rake' - 'lib/tasks/gitlab/docs/compile_deprecations.rake' - - 'lib/tasks/gitlab/docs/compile_windows.rake' - 'lib/tasks/gitlab/graphql.rake' - 'lib/tasks/gitlab/refresh_project_statistics_build_artifacts_size.rake' - 'lib/tasks/gitlab/snippets.rake' diff --git a/.rubocop_todo/lint/missing_cop_enable_directive.yml b/.rubocop_todo/lint/missing_cop_enable_directive.yml index 31c3334e27a..a923a114536 100644 --- a/.rubocop_todo/lint/missing_cop_enable_directive.yml +++ b/.rubocop_todo/lint/missing_cop_enable_directive.yml @@ -67,10 +67,8 @@ Lint/MissingCopEnableDirective: - 'ee/app/graphql/types/ci/code_coverage_activity_type.rb' - 'ee/app/graphql/types/ci/code_coverage_summary_type.rb' - 'ee/app/graphql/types/ci/code_quality_degradation_type.rb' - - 'ee/app/graphql/types/ci/minutes/namespace_monthly_usage_type.rb' - 'ee/app/graphql/types/ci/minutes/project_monthly_usage_type.rb' - 'ee/app/graphql/types/dast/profile_cadence_type.rb' - - 'ee/app/graphql/types/scan_type.rb' - 'ee/app/graphql/types/scanned_resource_type.rb' - 'ee/app/graphql/types/security_report_summary_section_type.rb' - 'ee/app/graphql/types/security_report_summary_type.rb' @@ -105,7 +103,6 @@ Lint/MissingCopEnableDirective: - 'ee/app/graphql/types/vulnerable_dependency_type.rb' - 'ee/app/graphql/types/vulnerable_kubernetes_resource_type.rb' - 'ee/app/graphql/types/vulnerable_package_type.rb' - - 'ee/app/services/ee/ci/queue/build_queue_service.rb' - 'ee/app/workers/ci/runners/stale_group_runners_prune_cron_worker.rb' - 'ee/lib/api/ldap_group_links.rb' - 'ee/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules.rb' @@ -131,5 +128,4 @@ Lint/MissingCopEnableDirective: - 'lib/unnested_in_filters/dsl.rb' - 'qa/qa/scenario/test/integration/registry_with_cdn.rb' - 'spec/benchmarks/banzai_benchmark.rb' - - 'spec/lib/gitlab/sidekiq_middleware/size_limiter/server_spec.rb' - 'spec/support/capybara.rb' diff --git a/.rubocop_todo/lint/redundant_cop_disable_directive.yml b/.rubocop_todo/lint/redundant_cop_disable_directive.yml index c1d724eb35a..8f7b0cafeef 100644 --- a/.rubocop_todo/lint/redundant_cop_disable_directive.yml +++ b/.rubocop_todo/lint/redundant_cop_disable_directive.yml @@ -1,108 +1,31 @@ --- # Cop supports --autocorrect. Lint/RedundantCopDisableDirective: - # Offense count: 573 + # Offense count: 230 # Temporarily disabled due to too many offenses Enabled: false Exclude: - 'app/controllers/concerns/enforces_two_factor_authentication.rb' - - 'app/controllers/concerns/issuable_actions.rb' - - 'app/controllers/concerns/preview_markdown.rb' - - 'app/controllers/concerns/renders_notes.rb' - - 'app/controllers/concerns/web_hooks/hook_log_actions.rb' - - 'app/controllers/groups/autocomplete_sources_controller.rb' - - 'app/controllers/groups/labels_controller.rb' - 'app/controllers/groups/milestones_controller.rb' - - 'app/controllers/profiles/notifications_controller.rb' - - 'app/controllers/projects/merge_requests/diffs_controller.rb' - - 'app/controllers/projects/tags_controller.rb' - 'app/finders/autocomplete/move_to_project_finder.rb' - 'app/finders/autocomplete/routes_finder.rb' - 'app/finders/autocomplete/users_finder.rb' - 'app/finders/ci/daily_build_group_report_results_finder.rb' - 'app/finders/ci/runner_jobs_finder.rb' - 'app/finders/users_finder.rb' - - 'app/graphql/gitlab_schema.rb' - 'app/graphql/resolvers/ci/pipeline_job_artifacts_resolver.rb' - - 'app/graphql/resolvers/concerns/caching_array_resolver.rb' - - 'app/graphql/resolvers/labels_resolver.rb' - - 'app/graphql/resolvers/work_item_references_resolver.rb' - - 'app/graphql/types/base_enum.rb' - - 'app/graphql/types/board_list_type.rb' - - 'app/graphql/types/ci/catalog/resources/components/input_type.rb' - - 'app/graphql/types/ci/catalog/resources/verification_level_enum.rb' - 'app/graphql/types/ci/runner_web_url_edge.rb' - - 'app/graphql/types/commit_signatures/verification_status_enum.rb' - - 'app/graphql/types/issuables/labels/search_field_list_enum.rb' - - 'app/graphql/types/packages/helm/dependency_type.rb' - - 'app/graphql/types/projects/service_type_enum.rb' - - 'app/helpers/diff_helper.rb' - - 'app/helpers/lazy_image_tag_helper.rb' - - 'app/helpers/search_helper.rb' - - 'app/helpers/sidebars_helper.rb' - - 'app/models/bulk_import.rb' - - 'app/models/clusters/cluster.rb' - - 'app/models/compare.rb' - - 'app/models/concerns/cascading_namespace_setting_attribute.rb' - - 'app/models/concerns/cascading_project_setting_attribute.rb' - - 'app/models/concerns/from_except.rb' - - 'app/models/concerns/from_intersect.rb' - - 'app/models/concerns/from_union.rb' - - 'app/models/concerns/issuable.rb' - - 'app/models/concerns/redis_cacheable.rb' - - 'app/models/merge_request_diff_commit.rb' - - 'app/models/ml/model_version.rb' - - 'app/models/user.rb' - - 'app/models/wiki_page/meta.rb' - 'app/models/work_items/type.rb' - 'app/policies/issue_policy.rb' - 'app/presenters/ci/build_runner_presenter.rb' - - 'app/presenters/dev_ops_report/metric_presenter.rb' - - 'app/serializers/diffs_entity.rb' - - 'app/serializers/fork_namespace_entity.rb' - - 'app/services/boards/base_items_list_service.rb' - - 'app/services/ci/job_artifacts/destroy_batch_service.rb' - 'app/services/ci/register_job_service.rb' - 'app/services/ci/retry_job_service.rb' - - 'app/services/ci/runners/bulk_delete_runners_service.rb' - - 'app/services/database/consistency_check_service.rb' - - 'app/services/design_management/copy_design_collection/copy_service.rb' - - 'app/services/groups/destroy_service.rb' - - 'app/services/groups/import_export/import_service.rb' - - 'app/services/import/placeholder_references/push_service.rb' - - 'app/services/issuable_base_service.rb' - - 'app/services/issues/export_csv_service.rb' - - 'app/services/issues/referenced_merge_requests_service.rb' - - 'app/services/labels/transfer_service.rb' - - 'app/services/members/projects/creator_service.rb' - - 'app/services/members/standard_member_builder.rb' - - 'app/services/packages/rpm/repository_metadata/build_xml_base_service.rb' - - 'app/services/projects/auto_devops/disable_service.rb' - - 'app/services/projects/open_issues_count_service.rb' - - 'app/services/releases/create_service.rb' - - 'app/services/releases/update_service.rb' - - 'app/services/users/activate_service.rb' - - 'app/services/web_hook_service.rb' - - 'app/uploaders/object_storage/cdn/google_ip_cache.rb' + - 'app/services/work_items/data_sync/clone_service.rb' + - 'app/services/work_items/data_sync/move_service.rb' - 'app/workers/authorized_project_update/user_refresh_over_user_range_worker.rb' - 'app/workers/ci/track_failed_build_worker.rb' - - 'app/workers/concerns/application_worker.rb' - - 'app/workers/create_note_diff_file_worker.rb' - - 'app/workers/database/batched_background_migration/execution_worker.rb' - - 'app/workers/import_issues_csv_worker.rb' - - 'app/workers/incident_management/process_alert_worker_v2.rb' - - 'app/workers/members/expiring_email_notification_worker.rb' - - 'app/workers/merge_worker.rb' - - 'app/workers/new_merge_request_worker.rb' - - 'app/workers/remove_unaccepted_member_invites_worker.rb' - 'app/workers/run_pipeline_schedule_worker.rb' - - 'config/initializers/fog_google_list_objects_match_glob_support.rb' - - 'config/initializers/grape_validators.rb' - - 'config/initializers/sprockets_patch.rb' - 'config/initializers/warden.rb' - - 'config/initializers/wikicloth_redos_patch.rb' - - 'config/initializers/wikicloth_ruby_3_patch.rb' - - 'config/routes/api.rb' - 'db/migrate/20240701145111_add_namespace_import_users_table.rb' - 'db/migrate/20240829163210_create_instance_integrations_table.rb' - 'db/post_migrate/20231017064317_swap_columns_for_ci_pipeline_variables_pipeline_id_bigint.rb' @@ -128,11 +51,7 @@ Lint/RedundantCopDisableDirective: - 'db/post_migrate/20240430015514_swap_columns_for_p_ci_builds_user_id.rb' - 'db/post_migrate/20240902014331_sync_fk_referencing_p_ci_pipelines.rb' - 'db/post_migrate/20240917143249_partition_ci_build_trace_metadata3.rb' - - 'ee/app/controllers/ee/admin/application_settings_controller.rb' - - 'ee/app/controllers/ee/groups/group_members_controller.rb' - 'ee/app/controllers/ee/projects/settings/ci_cd_controller.rb' - - 'ee/app/controllers/groups/analytics/productivity_analytics_controller.rb' - - 'ee/app/controllers/groups/todos_controller.rb' - 'ee/app/finders/epics/with_issues_finder.rb' - 'ee/app/finders/geo/registry_finder.rb' - 'ee/app/finders/groups/users_finder.rb' @@ -140,60 +59,10 @@ Lint/RedundantCopDisableDirective: - 'ee/app/finders/search/projects_finder.rb' - 'ee/app/finders/status_page/incident_comments_finder.rb' - 'ee/app/finders/status_page/incidents_finder.rb' - - 'ee/app/graphql/resolvers/analytics/contribution_analytics/contributions_resolver.rb' - - 'ee/app/graphql/types/boards/epic_list_type.rb' - - 'ee/app/graphql/types/ci/minutes/namespace_monthly_usage_type.rb' - - 'ee/app/graphql/types/incident_management/oncall_rotation_active_period_input_type.rb' - - 'ee/app/graphql/types/product_analytics/category_enum.rb' - - 'ee/app/graphql/types/product_analytics/state_enum.rb' - - 'ee/app/graphql/types/sbom/source_type_enum.rb' - - 'ee/app/graphql/types/scan_type.rb' - - 'ee/app/graphql/types/vulnerability_request_type.rb' - - 'ee/app/helpers/ee/boards_helper.rb' - - 'ee/app/helpers/projects/on_demand_scans_helper.rb' - - 'ee/app/models/ai/ai_resource/concerns/noteable.rb' - - 'ee/app/models/approver.rb' - - 'ee/app/models/approver_group.rb' - 'ee/app/models/ci/finished_build_ch_sync_event.rb' - - 'ee/app/models/dast/branch.rb' - - 'ee/app/models/ee/epic.rb' - - 'ee/app/models/ee/group.rb' - - 'ee/app/models/ee/merge_request.rb' - - 'ee/app/models/ee/project.rb' - - 'ee/app/models/ee/user.rb' - - 'ee/app/models/ee/vulnerability.rb' - - 'ee/app/models/geo_node.rb' - - 'ee/app/models/protected_environments/approval_rules/summarizable.rb' - - 'ee/app/models/requirements_management/requirement.rb' - - 'ee/app/models/vulnerabilities/finding.rb' - - 'ee/app/serializers/dashboard_environments_serializer.rb' - - 'ee/app/services/analytics/cycle_analytics/consistency_check_service.rb' - - 'ee/app/services/analytics/cycle_analytics/data_loader_service.rb' - - 'ee/app/services/approval_rules/user_rules_destroy_service.rb' - - 'ee/app/services/dora/aggregate_scores_service.rb' - - 'ee/app/services/ee/boards/issues/list_service.rb' - - 'ee/app/services/ee/ci/queue/build_queue_service.rb' - - 'ee/app/services/ee/notification_recipients/builder/base.rb' - - 'ee/app/services/security/ingestion/tasks/ingest_vulnerabilities/mark_resolved_as_detected.rb' - - 'ee/app/services/security/scan_result_policies/sync_any_merge_request_rules_service.rb' - - 'ee/app/services/security/security_orchestration_policies/process_scan_result_policy_service.rb' + - 'ee/app/services/search/zoekt/routing_service.rb' - 'ee/app/services/security/token_revocation_service.rb' - - 'ee/app/services/software_license_policies/bulk_create_scan_result_policy_service.rb' - - 'ee/app/workers/ee/issuable_export_csv_worker.rb' - - 'ee/app/workers/members_destroyer/clean_up_group_protected_branch_rules_worker.rb' - - 'ee/app/workers/scan_security_report_secrets_worker.rb' - - 'ee/app/workers/security/orchestration_policy_rule_schedule_worker.rb' - - 'ee/app/workers/security/scan_execution_policies/create_pipeline_worker.rb' - - 'ee/app/workers/vulnerabilities/mark_dropped_as_resolved_worker.rb' - - 'ee/db/fixtures/development/93_vsd_overview_counts.rb' - 'ee/db/geo/migrate/20210504143244_add_verification_to_merge_request_diff_registry.rb' - - 'ee/lib/analytics/merge_request_metrics_calculator.rb' - - 'ee/lib/api/admin/search/migrations.rb' - - 'ee/lib/api/audit_events.rb' - - 'ee/lib/api/dora/metrics.rb' - - 'ee/lib/ee/api/entities/analytics/code_review/merge_request.rb' - - 'ee/lib/ee/api/helpers.rb' - - 'ee/lib/ee/api/helpers/internal_helpers.rb' - 'ee/lib/ee/gitlab/background_migration/backfill_dismissal_reason_in_vulnerability_reads.rb' - 'ee/lib/ee/gitlab/background_migration/backfill_missing_vulnerability_dismissal_details.rb' - 'ee/lib/ee/gitlab/background_migration/backfill_zoekt_replicas.rb' @@ -202,62 +71,21 @@ Lint/RedundantCopDisableDirective: - 'ee/lib/ee/gitlab/background_migration/migrate_vulnerabilities_feedback_to_vulnerabilities_state_transition.rb' - 'ee/lib/ee/gitlab/background_migration/populate_denormalized_columns_for_sbom_occurrences.rb' - 'ee/lib/ee/gitlab/background_migration/purge_stale_security_scans.rb' - - 'ee/lib/ee/gitlab/event_store.rb' - - 'ee/lib/ee/gitlab/usage_data.rb' - - 'ee/lib/elastic/latest/git_class_proxy.rb' - - 'ee/lib/gitlab/analytics/type_of_work/tasks_by_type.rb' - - 'ee/lib/gitlab/duo/developments/feature_flag_enabler.rb' - - 'ee/lib/gitlab/status_page/storage/object.rb' - - 'ee/lib/langsmith/run_helpers.rb' - - 'ee/spec/controllers/concerns/gitlab_subscriptions/seat_count_alert_spec.rb' - - 'ee/spec/controllers/concerns/routable_actions_spec.rb' - - 'ee/spec/factories/package_metadata/pm_licenses.rb' - 'ee/spec/features/groups/settings/domain_verification_spec.rb' - 'ee/spec/features/projects/mirror_spec.rb' - - 'ee/spec/features/projects/pipelines/user_sees_security_tab_spec.rb' - - 'ee/spec/features/trials/lead_creation_form_validation_spec.rb' - - 'ee/spec/helpers/ee/releases_helper_spec.rb' - 'ee/spec/lib/banzai/filter/references/iterations_cadence_reference_filter_spec.rb' - - 'ee/spec/lib/cloud_connector/self_signed/access_data_reader_spec.rb' - - 'ee/spec/lib/code_suggestions/instructions_extractor_spec.rb' - 'ee/spec/lib/ee/gitlab/background_migration/backfill_missing_vulnerability_dismissal_details_spec.rb' - 'ee/spec/lib/ee/gitlab/background_migration/delete_orphaned_transferred_project_approval_rules_spec.rb' - 'ee/spec/lib/ee/gitlab/background_migration/populate_denormalized_columns_for_sbom_occurrences_spec.rb' - 'ee/spec/lib/ee/gitlab/background_migration/purge_security_scans_with_empty_finding_data_spec.rb' - - 'ee/spec/lib/ee/gitlab/issuable_metadata_spec.rb' - 'ee/spec/lib/gitlab/elastic/client_spec.rb' - - 'ee/spec/lib/gitlab/geo/log_helpers_spec.rb' - - 'ee/spec/lib/gitlab/llm/completions/chat_real_requests_spec.rb' - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/count_secure_pipelines_metric_spec.rb' - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/count_security_scans_metric_spec.rb' - - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/count_user_merge_requests_for_projects_with_applied_scan_result_policies_metric_spec.rb' - - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/protected_environment_approval_rules_required_approvals_average_metric_spec.rb' - - 'ee/spec/requests/api/vulnerability_findings_spec.rb' - - 'ee/spec/requests/git_http_geo_spec.rb' - - 'ee/spec/serializers/vulnerabilities/external_issue_link_entity_spec.rb' - - 'ee/spec/services/security/merge_reports_service_spec.rb' - 'ee/spec/support/shared_examples/features/dashboard_saml_reauth_banner_shared_examples.rb' - - 'ee/spec/support/shared_examples/models/elasticsearch_indexed_container_shared_examples.rb' - - 'ee/spec/support/shared_examples/models/geo_verifiable_registry_shared_examples.rb' - 'ee/spec/views/admin/users/show.html.haml_spec.rb' - - 'lib/api/api.rb' - 'lib/api/ci/variables.rb' - 'lib/api/commit_statuses.rb' - - 'lib/api/entities/issuable_time_stats.rb' - - 'lib/api/entities/tag.rb' - - 'lib/api/helpers.rb' - - 'lib/api/issue_links.rb' - 'lib/api/submodules.rb' - - 'lib/backup/options.rb' - - 'lib/bulk_imports/pipeline/runner.rb' - - 'lib/container_registry/tag.rb' - - 'lib/event_filter.rb' - - 'lib/feature.rb' - - 'lib/gitlab/analytics/cycle_analytics/aggregated/base_query_builder.rb' - - 'lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher.rb' - - 'lib/gitlab/analytics/cycle_analytics/base_query_builder.rb' - - 'lib/gitlab/analytics/cycle_analytics/records_fetcher.rb' - - 'lib/gitlab/application_context.rb' - 'lib/gitlab/auth/current_user_mode.rb' - 'lib/gitlab/background_migration/backfill_desired_sharding_key_partition_job.rb' - 'lib/gitlab/background_migration/backfill_epic_basic_fields_to_work_item_record.rb' @@ -297,7 +125,6 @@ Lint/RedundantCopDisableDirective: - 'lib/gitlab/background_migration/update_jira_tracker_data_deployment_type_based_on_url.rb' - 'lib/gitlab/background_migration/update_workspaces_config_version.rb' - 'lib/gitlab/background_migration/update_workspaces_config_version3.rb' - - 'lib/gitlab/cache/request_cache.rb' - 'lib/gitlab/ci/ansi2json/parser.rb' - 'lib/gitlab/ci/build/artifacts/metadata/entry.rb' - 'lib/gitlab/ci/config/external/mapper/verifier.rb' @@ -309,7 +136,6 @@ Lint/RedundantCopDisableDirective: - 'lib/gitlab/ci/reports/test_suite.rb' - 'lib/gitlab/ci/reports/test_suite_summary.rb' - 'lib/gitlab/cleanup/personal_access_tokens.rb' - - 'lib/gitlab/data_builder/pipeline.rb' - 'lib/gitlab/database/consistency_checker.rb' - 'lib/gitlab/database/gitlab_schema.rb' - 'lib/gitlab/database/migration.rb' @@ -318,63 +144,12 @@ Lint/RedundantCopDisableDirective: - 'lib/gitlab/database/migrations/observers/query_log.rb' - 'lib/gitlab/database/migrations/runner_backoff/migration_helpers.rb' - 'lib/gitlab/database/migrations/squasher.rb' - - 'lib/gitlab/diff/file.rb' - - 'lib/gitlab/diff/file_collection/paginated_diffs.rb' - - 'lib/gitlab/diff/pair_selector.rb' - - 'lib/gitlab/diff/parser.rb' - - 'lib/gitlab/diff/rendered/notebook/diff_file_helper.rb' - - 'lib/gitlab/encrypted_incoming_email_command.rb' - - 'lib/gitlab/encrypted_redis_command.rb' - - 'lib/gitlab/encrypted_service_desk_email_command.rb' - - 'lib/gitlab/encrypted_smtp_command.rb' - - 'lib/gitlab/error_tracking/processor/sidekiq_processor.rb' - - 'lib/gitlab/file_detector.rb' - - 'lib/gitlab/git/commit.rb' - - 'lib/gitlab/git/patches/collection.rb' - - 'lib/gitlab/github_import/markdown_text.rb' - - 'lib/gitlab/github_import/user_finder.rb' - - 'lib/gitlab/graphql/pagination/keyset/connection.rb' - - 'lib/gitlab/health_checks/metric.rb' - - 'lib/gitlab/health_checks/probes/status.rb' - - 'lib/gitlab/health_checks/result.rb' - 'lib/gitlab/lfs_token.rb' - - 'lib/gitlab/middleware/release_env.rb' - - 'lib/gitlab/object_hierarchy.rb' - - 'lib/gitlab/pagination/keyset/column_order_definition.rb' - - 'lib/gitlab/pagination/keyset/pager.rb' - - 'lib/gitlab/patch/old_redis_cache_store.rb' - - 'lib/gitlab/patch/redis_cache_store.rb' - - 'lib/gitlab/profiler.rb' - - 'lib/gitlab/project_search_results.rb' - - 'lib/gitlab/rack_attack/user_allowlist.rb' - - 'lib/gitlab/redis/hll.rb' - - 'lib/gitlab/search/sort_options.rb' + - 'lib/gitlab/popen/runner.rb' - 'lib/gitlab/seeders/ci/runner/runner_fleet_seeder.rb' - - 'lib/gitlab/sidekiq_config/cli_methods.rb' - - 'lib/gitlab/slash_commands/issue_search.rb' - - 'lib/gitlab/slash_commands/result.rb' - - 'lib/gitlab/tracking.rb' - - 'lib/gitlab/usage/metrics/instrumentations/count_imported_projects_metric.rb' - - 'lib/gitlab/usage/metrics/instrumentations/database_metric.rb' - - 'lib/gitlab/usage/metrics/instrumentations/numbers_metric.rb' - - 'lib/gitlab/usage_data.rb' - - 'lib/gitlab/usage_data_queries.rb' - - 'lib/gitlab/verify/ci_secure_files.rb' - - 'lib/gitlab/x509/signature.rb' - - 'lib/tasks/gitlab/cleanup.rake' - - 'lib/tasks/gitlab/seed/group_seed.rake' - 'qa/qa/resource/user_runners.rb' - 'qa/qa/service/docker_run/gitlab_runner.rb' - - 'qa/qa/specs/features/ee/browser_ui/10_govern/create_merge_request_with_secure_spec.rb' - 'qa/qa/vendor/one_password/cli.rb' - - 'rubocop/cop/gettext/static_identifier.rb' - - 'rubocop/cop/gitlab/feature_available_usage.rb' - - 'rubocop/cop/migration/add_reference.rb' - - 'rubocop/cop/rake/require.rb' - - 'rubocop/cop/rspec/factory_bot/inline_association.rb' - - 'rubocop/cop/static_translation_definition.rb' - - 'rubocop/feature_categories.rb' - - 'rubocop/formatter/todo_formatter.rb' - 'scripts/failed_tests.rb' - 'scripts/feature_flags/used-feature-flags' - 'scripts/generate_rspec_pipeline.rb' @@ -382,20 +157,9 @@ Lint/RedundantCopDisableDirective: - 'scripts/security-harness' - 'scripts/setup/generate-as-if-foss-env.rb' - 'scripts/verify-tff-mapping' - - 'sidekiq_cluster/cli.rb' - - 'sidekiq_cluster/sidekiq_cluster.rb' - 'spec/components/previews/pajamas/banner_component_preview.rb' - - 'spec/controllers/groups/milestones_controller_spec.rb' - - 'spec/controllers/profiles/two_factor_auths_controller_spec.rb' - - 'spec/controllers/projects/milestones_controller_spec.rb' - - 'spec/features/environments/environments_folder_spec.rb' - 'spec/features/groups/participants_autocomplete_spec.rb' - - 'spec/features/issues/discussion_lock_spec.rb' - - 'spec/features/issues/user_edits_issue_spec.rb' - 'spec/features/merge_request/user_edits_mr_spec.rb' - - 'spec/frontend/fixtures/merge_requests.rb' - - 'spec/lib/backup/manager_spec.rb' - - 'spec/lib/gitlab/avatar_cache_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_finding_id_in_vulnerabilities_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_missing_ci_cd_settings_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_root_storage_statistics_fork_storage_sizes_spec.rb' @@ -412,32 +176,13 @@ Lint/RedundantCopDisableDirective: - 'spec/lib/gitlab/database/health_status/indicators/wal_rate_spec.rb' - 'spec/lib/gitlab/database/load_balancing/transaction_leaking_spec.rb' - 'spec/lib/gitlab/database/migration_helpers/restrict_gitlab_schema_spec.rb' - - 'spec/lib/gitlab/diff/rendered/notebook/diff_file_helper_spec.rb' - 'spec/lib/gitlab/doorkeeper_secret_storing/secret/pbkdf2_sha512_spec.rb' - 'spec/lib/gitlab/doorkeeper_secret_storing/token/pbkdf2_sha512_spec.rb' - - 'spec/lib/gitlab/gfm/uploads_rewriter_spec.rb' - - 'spec/lib/gitlab/git/tree_spec.rb' - - 'spec/lib/gitlab/import_export/project/relation_saver_spec.rb' - - 'spec/lib/gitlab/memory/watchdog/configurator_spec.rb' - 'spec/lib/gitlab/merge_requests/message_generator_spec.rb' - - 'spec/lib/gitlab/metrics/exporter/base_exporter_spec.rb' - - 'spec/lib/gitlab/namespaced_session_store_spec.rb' - - 'spec/lib/gitlab/pagination/keyset/iterator_spec.rb' - - 'spec/lib/gitlab/quick_actions/dsl_spec.rb' - - 'spec/lib/gitlab/redis/multi_store_spec.rb' - 'spec/lib/gitlab/search/abuse_detection_spec.rb' - - 'spec/lib/gitlab/shard_health_cache_spec.rb' - - 'spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb' - - 'spec/lib/gitlab/sidekiq_middleware/size_limiter/server_spec.rb' - - 'spec/lib/omni_auth/strategies/jwt_spec.rb' - 'spec/migrations/db/post_migrate/20240319005754_swap_columns_for_upstream_pipeline_id_between_ci_builds_and_ci_pipelines_spec.rb' - - 'spec/models/ci/build_trace_chunk_spec.rb' - 'spec/models/concerns/encrypted_user_password_spec.rb' - - 'spec/models/concerns/triggerable_hooks_spec.rb' - - 'spec/presenters/packages/pypi/simple_index_presenter_spec.rb' - - 'spec/presenters/packages/pypi/simple_package_versions_presenter_spec.rb' - 'spec/requests/api/alert_management_alerts_spec.rb' - - 'spec/requests/api/graphql/ci/config_spec.rb' - 'spec/requests/projects/releases_controller_spec.rb' - 'spec/scripts/duo_chat/reporter_spec.rb' - 'spec/services/alert_management/metric_images/upload_service_spec.rb' @@ -447,17 +192,9 @@ Lint/RedundantCopDisableDirective: - 'spec/support/helpers/database/multiple_databases_helpers.rb' - 'spec/support/helpers/graphql_helpers.rb' - 'spec/support/helpers/migrations_helpers/vulnerabilities_findings_helper.rb' - - 'spec/support/helpers/snowplow_helpers.rb' - 'spec/support/helpers/wait_for_requests.rb' - - 'spec/support/shared_examples/features/editable_merge_request_shared_examples.rb' - 'spec/support/shared_examples/features/milestone_editing_shared_examples.rb' - - 'spec/support/shared_examples/lib/gitlab/regex_shared_examples.rb' - - 'spec/support/shared_examples/models/boards/listable_shared_examples.rb' - - 'spec/support/shared_examples/models/concerns/incident_management/escalatable_shared_examples.rb' - 'spec/support/shared_examples/models/concerns/protected_ref_access_shared_examples.rb' - - 'spec/support/shared_examples/models/cycle_analytics_stage_shared_examples.rb' - - 'spec/support/shared_examples/models/packages/debian/distribution_key_shared_examples.rb' - - 'spec/support/shared_examples/requests/api/rubygems_packages_shared_examples.rb' - 'tooling/danger/ignored_model_columns.rb' - 'tooling/danger/sidekiq_queues.rb' - 'tooling/danger/stable_branch.rb' diff --git a/.rubocop_todo/lint/to_enum_arguments.yml b/.rubocop_todo/lint/to_enum_arguments.yml deleted file mode 100644 index 22b5d1f3a9d..00000000000 --- a/.rubocop_todo/lint/to_enum_arguments.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -Lint/ToEnumArguments: - Exclude: - - 'lib/gitlab/ci/trace/stream.rb' - - 'spec/lib/gitlab/ci/trace/section_parser_spec.rb' diff --git a/.rubocop_todo/lint/unused_method_argument.yml b/.rubocop_todo/lint/unused_method_argument.yml index 8079fb22247..c4800ac7be7 100644 --- a/.rubocop_todo/lint/unused_method_argument.yml +++ b/.rubocop_todo/lint/unused_method_argument.yml @@ -183,7 +183,6 @@ Lint/UnusedMethodArgument: - 'app/workers/gitlab/jira_import/import_issue_worker.rb' - 'app/workers/issues/rebalancing_worker.rb' - 'app/workers/personal_access_tokens/expired_notification_worker.rb' - - 'app/workers/personal_access_tokens/expiring_worker.rb' - 'app/workers/process_commit_worker.rb' - 'app/workers/projects/inactive_projects_deletion_cron_worker.rb' - 'app/workers/projects/refresh_build_artifacts_size_statistics_worker.rb' diff --git a/.rubocop_todo/naming/heredoc_delimiter_naming.yml b/.rubocop_todo/naming/heredoc_delimiter_naming.yml index 67127331c37..1aa22c71f94 100644 --- a/.rubocop_todo/naming/heredoc_delimiter_naming.yml +++ b/.rubocop_todo/naming/heredoc_delimiter_naming.yml @@ -32,7 +32,6 @@ Naming/HeredocDelimiterNaming: - 'lib/gitlab/sql/set_operator.rb' - 'lib/gitlab/utils/delegator_override/validator.rb' - 'lib/tasks/gitlab/docs/compile_deprecations.rake' - - 'lib/tasks/gitlab/docs/compile_windows.rake' - 'lib/tasks/gitlab/password.rake' - 'rubocop/cop/database/multiple_databases.rb' - 'rubocop/cop/database/rescue_query_canceled.rb' diff --git a/.rubocop_todo/performance/string_identifier_argument.yml b/.rubocop_todo/performance/string_identifier_argument.yml index 0443461e5ec..d6bd4455991 100644 --- a/.rubocop_todo/performance/string_identifier_argument.yml +++ b/.rubocop_todo/performance/string_identifier_argument.yml @@ -21,7 +21,6 @@ Performance/StringIdentifierArgument: - 'app/models/concerns/sanitizable.rb' - 'app/models/concerns/signature_type.rb' - 'app/models/concerns/token_authenticatable.rb' - - 'app/models/concerns/token_authenticatable_strategies/base.rb' - 'app/models/integrations/base_third_party_wiki.rb' - 'app/models/integrations/field.rb' - 'app/models/namespace_statistics.rb' diff --git a/.rubocop_todo/rails/date.yml b/.rubocop_todo/rails/date.yml index a63f7f19665..52d4b501570 100644 --- a/.rubocop_todo/rails/date.yml +++ b/.rubocop_todo/rails/date.yml @@ -138,7 +138,6 @@ Rails/Date: - 'qa/qa/page/profile/ssh_keys.rb' - 'qa/qa/resource/ssh_key.rb' - 'qa/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb' - - 'qa/qa/specs/features/ee/api/2_plan/epics_milestone_dates_spec.rb' - 'qa/qa/specs/features/ee/api/2_plan/epics_to_work_items_sync_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/12_systems/geo/ssh_push_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/12_systems/geo/ssh_push_to_secondary_spec.rb' diff --git a/.rubocop_todo/rails/strong_params.yml b/.rubocop_todo/rails/strong_params.yml index c6895b06c73..e18182ea70b 100644 --- a/.rubocop_todo/rails/strong_params.yml +++ b/.rubocop_todo/rails/strong_params.yml @@ -222,7 +222,6 @@ Rails/StrongParams: - 'app/controllers/users/terms_controller.rb' - 'app/controllers/users/unsubscribes_controller.rb' - 'app/controllers/users_controller.rb' - - 'ee/app/controllers/admin/ai/feature_settings_controller.rb' - 'ee/app/controllers/admin/ai/self_hosted_models_controller.rb' - 'ee/app/controllers/admin/elasticsearch_controller.rb' - 'ee/app/controllers/admin/emails_controller.rb' diff --git a/.rubocop_todo/rspec/any_instance_of.yml b/.rubocop_todo/rspec/any_instance_of.yml index 6e96bb88360..ac22761ac47 100644 --- a/.rubocop_todo/rspec/any_instance_of.yml +++ b/.rubocop_todo/rspec/any_instance_of.yml @@ -300,7 +300,6 @@ RSpec/AnyInstanceOf: - 'spec/support/shared_examples/services/boards/issues_move_service_shared_examples.rb' - 'spec/support/shared_examples/services/issuable_shared_examples.rb' - 'spec/support/shared_examples/uploaders/object_storage_shared_examples.rb' - - 'spec/support/shared_examples/workers/authorized_projects_worker_shared_example.rb' - 'spec/support/shared_examples/workers/reactive_cacheable_shared_examples.rb' - 'spec/tasks/gitlab/cleanup_rake_spec.rb' - 'spec/tasks/gitlab/container_registry_rake_spec.rb' diff --git a/.rubocop_todo/rspec/be_eq.yml b/.rubocop_todo/rspec/be_eq.yml index 6e77bfbd854..5cc541b2851 100644 --- a/.rubocop_todo/rspec/be_eq.yml +++ b/.rubocop_todo/rspec/be_eq.yml @@ -27,8 +27,6 @@ RSpec/BeEq: - 'ee/spec/controllers/projects_controller_spec.rb' - 'ee/spec/controllers/registrations/groups_controller_spec.rb' - 'ee/spec/controllers/subscriptions_controller_spec.rb' - - 'ee/spec/elastic/migrate/20240123181031_reindex_issue_to_update_analyzer_for_title_spec.rb' - - 'ee/spec/elastic/migrate/20240130144625_reindex_epics_to_update_analyzer_spec.rb' - 'ee/spec/elastic/migrate/20240814231502_remove_work_item_access_level_from_work_item_spec.rb' - 'ee/spec/elastic/migrate/20241002103536_reindex_merge_requests_for_title_completion_spec.rb' - 'ee/spec/elastic/migrate/20241017094601_add_embedding_to_work_items_opensearch_spec.rb' @@ -893,7 +891,6 @@ RSpec/BeEq: - 'spec/lib/gitlab/file_markdown_link_builder_spec.rb' - 'spec/lib/gitlab/file_type_detection_spec.rb' - 'spec/lib/gitlab/fogbugz_import/project_creator_spec.rb' - - 'spec/lib/gitlab/fp/result_spec.rb' - 'spec/lib/gitlab/gfm/uploads_rewriter_spec.rb' - 'spec/lib/gitlab/git/attributes_parser_spec.rb' - 'spec/lib/gitlab/git/blob_spec.rb' @@ -1288,7 +1285,6 @@ RSpec/BeEq: - 'spec/requests/api/graphql/project/container_repositories_spec.rb' - 'spec/requests/api/graphql/project/environments_spec.rb' - 'spec/requests/api/graphql/project/error_tracking/sentry_detailed_error_request_spec.rb' - - 'spec/requests/api/graphql/project/packages_spec.rb' - 'spec/requests/api/graphql/project/release_spec.rb' - 'spec/requests/api/group_clusters_spec.rb' - 'spec/requests/api/group_export_spec.rb' diff --git a/.rubocop_todo/rspec/be_nil.yml b/.rubocop_todo/rspec/be_nil.yml index 110cc975f84..0388003940d 100644 --- a/.rubocop_todo/rspec/be_nil.yml +++ b/.rubocop_todo/rspec/be_nil.yml @@ -25,7 +25,6 @@ RSpec/BeNil: - 'ee/spec/models/work_items/widgets/progress_spec.rb' - 'ee/spec/presenters/subscription_presenter_spec.rb' - 'ee/spec/presenters/vulnerability_presenter_spec.rb' - - 'ee/spec/requests/api/ai/duo_workflows/workflows_spec.rb' - 'ee/spec/requests/api/graphql/ai/self_hosted_models/create_spec.rb' - 'ee/spec/requests/api/graphql/audit_events/group/namespace_filters/create_spec.rb' - 'ee/spec/requests/api/graphql/audit_events/group/namespace_filters/delete_spec.rb' @@ -41,9 +40,7 @@ RSpec/BeNil: - 'ee/spec/requests/api/graphql/project/runner_google_cloud_provisioning_spec.rb' - 'ee/spec/requests/api/group_push_rule_spec.rb' - 'ee/spec/requests/api/namespaces_spec.rb' - - 'ee/spec/services/ai/duo_workflows/start_workflow_service_spec.rb' - 'ee/spec/services/app_sec/dast/profiles/update_service_spec.rb' - - 'ee/spec/services/ee/members/destroy_service_spec.rb' - 'ee/spec/services/gitlab_subscriptions/reconciliations/calculate_seat_count_data_service_spec.rb' - 'ee/spec/services/search/group_service_spec.rb' - 'ee/spec/services/search/zoekt/callback_service_spec.rb' diff --git a/.rubocop_todo/rspec/context_wording.yml b/.rubocop_todo/rspec/context_wording.yml index ecbbe370f0f..34b066b8351 100644 --- a/.rubocop_todo/rspec/context_wording.yml +++ b/.rubocop_todo/rspec/context_wording.yml @@ -841,7 +841,6 @@ RSpec/ContextWording: - 'qa/qa/specs/features/ee/browser_ui/13_secure/enable_scanning_from_configuration_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/2_plan/epic/epics_management_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/project_issue_boards_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/push_rules_spec.rb' - 'qa/spec/git/repository_spec.rb' - 'qa/spec/page/element_spec.rb' - 'qa/spec/service/docker_run/gitlab_runner_spec.rb' @@ -1079,7 +1078,6 @@ RSpec/ContextWording: - 'spec/features/merge_request/user_sees_merge_widget_spec.rb' - 'spec/features/merge_request/user_suggests_changes_on_diff_spec.rb' - 'spec/features/merge_request/user_uses_quick_actions_spec.rb' - - 'spec/features/merge_requests/filters_generic_behavior_spec.rb' - 'spec/features/merge_requests/user_exports_as_csv_spec.rb' - 'spec/features/merge_requests/user_filters_by_approvals_spec.rb' - 'spec/features/merge_requests/user_filters_by_assignees_spec.rb' diff --git a/.rubocop_todo/rspec/duplicated_metadata.yml b/.rubocop_todo/rspec/duplicated_metadata.yml index 971762ec6cf..32d62eb23c6 100644 --- a/.rubocop_todo/rspec/duplicated_metadata.yml +++ b/.rubocop_todo/rspec/duplicated_metadata.yml @@ -1,3 +1,4 @@ --- +# Cop supports --autocorrect. RSpec/DuplicatedMetadata: Details: grace period diff --git a/.rubocop_todo/rspec/empty_metadata.yml b/.rubocop_todo/rspec/empty_metadata.yml index 7afc28a9a21..a344b3d6e51 100644 --- a/.rubocop_todo/rspec/empty_metadata.yml +++ b/.rubocop_todo/rspec/empty_metadata.yml @@ -1,3 +1,4 @@ --- +# Cop supports --autocorrect. RSpec/EmptyMetadata: Details: grace period diff --git a/.rubocop_todo/rspec/empty_output.yml b/.rubocop_todo/rspec/empty_output.yml index 2ef5ef15b0f..07c212b3220 100644 --- a/.rubocop_todo/rspec/empty_output.yml +++ b/.rubocop_todo/rspec/empty_output.yml @@ -1,3 +1,4 @@ --- +# Cop supports --autocorrect. RSpec/EmptyOutput: Details: grace period diff --git a/.rubocop_todo/rspec/example_without_description.yml b/.rubocop_todo/rspec/example_without_description.yml index 6c83be12f03..fe5ea52ec22 100644 --- a/.rubocop_todo/rspec/example_without_description.yml +++ b/.rubocop_todo/rspec/example_without_description.yml @@ -459,9 +459,7 @@ RSpec/ExampleWithoutDescription: - 'spec/models/operations/feature_flags/strategy_spec.rb' - 'spec/models/packages/cleanup/policy_spec.rb' - 'spec/models/packages/conan/package_reference_spec.rb' - - 'spec/models/packages/conan/package_revision_spec.rb' - 'spec/models/packages/conan/package_spec.rb' - - 'spec/models/packages/conan/recipe_revision_spec.rb' - 'spec/models/packages/debian/package_spec.rb' - 'spec/models/packages/npm/metadatum_spec.rb' - 'spec/models/packages/protection/rule_spec.rb' diff --git a/.rubocop_todo/rspec/expect_in_hook.yml b/.rubocop_todo/rspec/expect_in_hook.yml index 9f0539ab639..ba4a22691ba 100644 --- a/.rubocop_todo/rspec/expect_in_hook.yml +++ b/.rubocop_todo/rspec/expect_in_hook.yml @@ -59,7 +59,6 @@ RSpec/ExpectInHook: - 'ee/spec/services/gitlab_subscriptions/reconciliations/calculate_seat_count_data_service_spec.rb' - 'ee/spec/services/groups/update_repository_storage_service_spec.rb' - 'ee/spec/services/members/await_service_spec.rb' - - 'ee/spec/services/merge_requests/mergeability/check_approved_service_spec.rb' - 'ee/spec/services/merge_requests/mergeability/check_blocked_by_other_mrs_service_spec.rb' - 'ee/spec/services/projects/create_from_template_service_spec.rb' - 'ee/spec/services/projects/mark_for_deletion_service_spec.rb' diff --git a/.rubocop_todo/rspec/feature_category.yml b/.rubocop_todo/rspec/feature_category.yml index 981edd276b4..7721a1987be 100644 --- a/.rubocop_todo/rspec/feature_category.yml +++ b/.rubocop_todo/rspec/feature_category.yml @@ -1467,7 +1467,6 @@ RSpec/FeatureCategory: - 'spec/graphql/mutations/terraform/state/unlock_spec.rb' - 'spec/graphql/mutations/timelogs/delete_spec.rb' - 'spec/graphql/mutations/todos/create_spec.rb' - - 'spec/graphql/mutations/todos/mark_all_done_spec.rb' - 'spec/graphql/mutations/todos/mark_done_spec.rb' - 'spec/graphql/mutations/todos/restore_many_spec.rb' - 'spec/graphql/mutations/todos/restore_spec.rb' @@ -3380,7 +3379,6 @@ RSpec/FeatureCategory: - 'spec/models/concerns/milestoneish_spec.rb' - 'spec/models/concerns/nullify_if_blank_spec.rb' - 'spec/models/concerns/optionally_search_spec.rb' - - 'spec/models/concerns/partitioned_table_spec.rb' - 'spec/models/concerns/presentable_spec.rb' - 'spec/models/concerns/project_api_compatibility_spec.rb' - 'spec/models/concerns/project_features_compatibility_spec.rb' @@ -3624,7 +3622,6 @@ RSpec/FeatureCategory: - 'spec/policies/blob_policy_spec.rb' - 'spec/policies/board_policy_spec.rb' - 'spec/policies/ci/bridge_policy_spec.rb' - - 'spec/policies/ci/trigger_policy_spec.rb' - 'spec/policies/clusters/agent_policy_spec.rb' - 'spec/policies/clusters/agent_token_policy_spec.rb' - 'spec/policies/clusters/agents/activity_event_policy_spec.rb' diff --git a/.rubocop_todo/rspec/identical_equality_assertion.yml b/.rubocop_todo/rspec/identical_equality_assertion.yml index 6cfdb5e544c..263cf93a21f 100644 --- a/.rubocop_todo/rspec/identical_equality_assertion.yml +++ b/.rubocop_todo/rspec/identical_equality_assertion.yml @@ -12,8 +12,6 @@ RSpec/IdenticalEqualityAssertion: - 'spec/lib/gitlab/ci/ansi2json/state_spec.rb' - 'spec/lib/gitlab/color_spec.rb' - 'spec/lib/gitlab/daemon_spec.rb' - - 'spec/lib/gitlab/fp/message_spec.rb' - - 'spec/lib/gitlab/fp/result_spec.rb' - 'spec/lib/gitlab/global_anonymous_id_spec.rb' - 'spec/lib/gitlab/graphql/lazy_spec.rb' - 'spec/lib/gitlab/render_timeout_spec.rb' diff --git a/.rubocop_todo/rspec/instance_variable.yml b/.rubocop_todo/rspec/instance_variable.yml index 666e81d23ab..e2498d289b1 100644 --- a/.rubocop_todo/rspec/instance_variable.yml +++ b/.rubocop_todo/rspec/instance_variable.yml @@ -33,7 +33,6 @@ RSpec/InstanceVariable: - 'qa/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/project_issue_boards_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/2_plan/multiple_assignees_for_issues/more_than_four_assignees_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/push_rules_spec.rb' - 'spec/commands/metrics_server/metrics_server_spec.rb' - 'spec/controllers/admin/topics/avatars_controller_spec.rb' - 'spec/controllers/concerns/renders_commits_spec.rb' diff --git a/.rubocop_todo/rspec/metadata_style.yml b/.rubocop_todo/rspec/metadata_style.yml index 80f55ad43de..c3dfa7f5206 100644 --- a/.rubocop_todo/rspec/metadata_style.yml +++ b/.rubocop_todo/rspec/metadata_style.yml @@ -34,8 +34,6 @@ RSpec/MetadataStyle: - 'spec/lib/gitlab/ssh_public_key_spec.rb' - 'spec/lib/gitlab/tab_width_spec.rb' - 'spec/lib/gitlab/themes_spec.rb' - - 'spec/migrations/20230804053643_add_ticket_work_item_type_spec.rb' - - 'spec/migrations/20230815160428_rename_plans_titles_with_legacy_plan_names_spec.rb' - 'spec/models/ci/build_need_spec.rb' - 'spec/models/ci/build_runner_session_spec.rb' - 'spec/models/ci/runner_manager_build_spec.rb' diff --git a/.rubocop_todo/rspec/named_subject.yml b/.rubocop_todo/rspec/named_subject.yml index d525fd028d4..f7d93335743 100644 --- a/.rubocop_todo/rspec/named_subject.yml +++ b/.rubocop_todo/rspec/named_subject.yml @@ -1036,7 +1036,6 @@ RSpec/NamedSubject: - 'ee/spec/services/security/security_orchestration_policies/process_scan_result_policy_service_spec.rb' - 'ee/spec/services/security/security_orchestration_policies/scan_pipeline_service_spec.rb' - 'ee/spec/services/security/security_orchestration_policies/sync_opened_merge_requests_service_spec.rb' - - 'ee/spec/services/security/security_orchestration_policies/sync_scan_result_policies_service_spec.rb' - 'ee/spec/services/security/token_revocation_service_spec.rb' - 'ee/spec/services/security/track_scan_service_spec.rb' - 'ee/spec/services/security/training_providers/base_url_service_spec.rb' diff --git a/.rubocop_todo/rspec/receive_messages.yml b/.rubocop_todo/rspec/receive_messages.yml index ac20728e844..31190e70f8d 100644 --- a/.rubocop_todo/rspec/receive_messages.yml +++ b/.rubocop_todo/rspec/receive_messages.yml @@ -12,7 +12,6 @@ RSpec/ReceiveMessages: - 'ee/spec/controllers/ee/search_controller_spec.rb' - 'ee/spec/controllers/oauth/geo_auth_controller_spec.rb' - 'ee/spec/controllers/projects_controller_spec.rb' - - 'ee/spec/elastic/migrate/20240130215043_reindex_wikis_to_fix_id_spec.rb' - 'ee/spec/features/admin/admin_audit_logs_spec.rb' - 'ee/spec/features/admin/groups/admin_subscription_alerts_spec.rb' - 'ee/spec/features/groups/iterations/user_edits_iteration_cadence_spec.rb' @@ -78,9 +77,6 @@ RSpec/ReceiveMessages: - 'ee/spec/lib/gitlab/geo/log_cursor/daemon_spec.rb' - 'ee/spec/lib/gitlab/geo/log_cursor/lease_spec.rb' - 'ee/spec/lib/gitlab/git_access_spec.rb' - - 'ee/spec/lib/gitlab/llm/ai_gateway/client_spec.rb' - - 'ee/spec/lib/gitlab/llm/ai_gateway/code_suggestions_client_spec.rb' - - 'ee/spec/lib/gitlab/llm/ai_gateway/docs_client_spec.rb' - 'ee/spec/lib/gitlab/llm/chain/tools/epic_reader/executor_spec.rb' - 'ee/spec/lib/gitlab/llm/vertex_ai/client_spec.rb' - 'ee/spec/lib/gitlab/mirror_spec.rb' diff --git a/.rubocop_todo/rspec/spec_file_path_format.yml b/.rubocop_todo/rspec/spec_file_path_format.yml index 1e24211c53e..dccd529167e 100644 --- a/.rubocop_todo/rspec/spec_file_path_format.yml +++ b/.rubocop_todo/rspec/spec_file_path_format.yml @@ -31,7 +31,6 @@ RSpec/SpecFilePathFormat: - 'spec/requests/api/issues/post_projects_issues_spec.rb' - 'spec/requests/api/issues/put_projects_issues_spec.rb' - 'spec/requests/api/pages/pages_spec.rb' - - 'spec/rubocop/cop/rspec/httparty_basic_auth_spec.rb' - 'spec/services/ci/create_pipeline_service/artifacts_spec.rb' - 'spec/services/ci/create_pipeline_service/cache_spec.rb' - 'spec/services/ci/create_pipeline_service/creation_errors_and_warnings_spec.rb' diff --git a/.rubocop_todo/rspec/verified_double_reference.yml b/.rubocop_todo/rspec/verified_double_reference.yml index 807149b0928..c19302b9a45 100644 --- a/.rubocop_todo/rspec/verified_double_reference.yml +++ b/.rubocop_todo/rspec/verified_double_reference.yml @@ -60,7 +60,6 @@ RSpec/VerifiedDoubleReference: - 'ee/spec/requests/projects/security/policies_controller_spec.rb' - 'ee/spec/serializers/dashboard_environments_project_entity_spec.rb' - 'ee/spec/serializers/vulnerabilities/finding_entity_spec.rb' - - 'ee/spec/services/ai/duo_workflows/start_workflow_service_spec.rb' - 'ee/spec/services/analytics/cycle_analytics/consistency_check_service_spec.rb' - 'ee/spec/services/analytics/forecasting/build_forecast_service_spec.rb' - 'ee/spec/services/app_sec/dast/scans/run_service_spec.rb' diff --git a/.rubocop_todo/rspec/verified_doubles.yml b/.rubocop_todo/rspec/verified_doubles.yml index 381cceaa90e..f74e54a2123 100644 --- a/.rubocop_todo/rspec/verified_doubles.yml +++ b/.rubocop_todo/rspec/verified_doubles.yml @@ -75,7 +75,6 @@ RSpec/VerifiedDoubles: - 'ee/spec/models/ee/user_spec.rb' - 'ee/spec/models/elastic/index_setting_spec.rb' - 'ee/spec/models/geo/secondary_usage_data_spec.rb' - - 'ee/spec/models/geo_node_status_spec.rb' - 'ee/spec/models/integrations/github/status_message_spec.rb' - 'ee/spec/models/integrations/github_spec.rb' - 'ee/spec/models/push_rule_spec.rb' @@ -670,7 +669,6 @@ RSpec/VerifiedDoubles: - 'spec/models/concerns/atomic_internal_id_spec.rb' - 'spec/models/concerns/legacy_bulk_insert_spec.rb' - 'spec/models/concerns/prometheus_adapter_spec.rb' - - 'spec/models/concerns/token_authenticatable_strategies/base_spec.rb' - 'spec/models/concerns/token_authenticatable_strategies/encrypted_spec.rb' - 'spec/models/concerns/triggerable_hooks_spec.rb' - 'spec/models/concerns/x509_serial_number_attribute_spec.rb' diff --git a/.rubocop_todo/style/arguments_forwarding.yml b/.rubocop_todo/style/arguments_forwarding.yml index 602e78df06f..d327bb6d2ee 100644 --- a/.rubocop_todo/style/arguments_forwarding.yml +++ b/.rubocop_todo/style/arguments_forwarding.yml @@ -40,10 +40,8 @@ Style/ArgumentsForwarding: - 'app/workers/concerns/limited_capacity/job_tracker.rb' - 'app/workers/container_expiration_policies/cleanup_container_repository_worker.rb' - 'app/workers/container_expiration_policy_worker.rb' - - 'app/workers/dependency_proxy/image_ttl_group_policy_worker.rb' - 'app/workers/gitlab_performance_bar_stats_worker.rb' - 'app/workers/packages/cleanup/delete_orphaned_dependencies_worker.rb' - - 'app/workers/packages/cleanup_package_registry_worker.rb' - 'app/workers/projects/inactive_projects_deletion_cron_worker.rb' - 'config/initializers/6_labkit_middleware.rb' - 'config/initializers/mail_starttls_patch.rb' diff --git a/.rubocop_todo/style/empty_literal.yml b/.rubocop_todo/style/empty_literal.yml index f33618f0f91..1da4e31a992 100644 --- a/.rubocop_todo/style/empty_literal.yml +++ b/.rubocop_todo/style/empty_literal.yml @@ -2,5 +2,3 @@ # Cop supports --autocorrect. Style/EmptyLiteral: Details: grace period - Exclude: - - 'lib/gitlab/api_authentication/builder.rb' diff --git a/.rubocop_todo/style/hash_each_methods.yml b/.rubocop_todo/style/hash_each_methods.yml index 99614e9a601..175c26c2132 100644 --- a/.rubocop_todo/style/hash_each_methods.yml +++ b/.rubocop_todo/style/hash_each_methods.yml @@ -26,7 +26,6 @@ Style/HashEachMethods: - 'app/graphql/types/packages/package_type_enum.rb' - 'app/graphql/types/release_asset_link_type_enum.rb' - 'app/graphql/types/user_callout_feature_name_enum.rb' - - 'app/helpers/routing/pseudonymization_helper.rb' - 'app/models/application_setting.rb' - 'app/models/ci/pipeline.rb' - 'app/models/concerns/bulk_insertable_associations.rb' @@ -123,7 +122,6 @@ Style/HashEachMethods: - 'spec/requests/api/project_templates_spec.rb' - 'spec/services/system_notes/incident_service_spec.rb' - 'spec/support/helpers/database/multiple_databases_helpers.rb' - - 'spec/support/helpers/multipart_helpers.rb' - 'spec/support/helpers/reactive_caching_helpers.rb' - 'spec/support/helpers/repo_helpers.rb' - 'spec/support/import_export/project_tree_expectations.rb' diff --git a/.rubocop_todo/style/inline_disable_annotation.yml b/.rubocop_todo/style/inline_disable_annotation.yml index 0483063ac87..744c45a1546 100644 --- a/.rubocop_todo/style/inline_disable_annotation.yml +++ b/.rubocop_todo/style/inline_disable_annotation.yml @@ -42,7 +42,6 @@ Style/InlineDisableAnnotation: - 'app/controllers/concerns/milestone_actions.rb' - 'app/controllers/concerns/notes_actions.rb' - 'app/controllers/concerns/preferred_language_switcher.rb' - - 'app/controllers/concerns/preview_markdown.rb' - 'app/controllers/concerns/registry/connection_errors_handler.rb' - 'app/controllers/concerns/renders_commits.rb' - 'app/controllers/concerns/renders_member_access.rb' @@ -52,13 +51,10 @@ Style/InlineDisableAnnotation: - 'app/controllers/concerns/snippets_actions.rb' - 'app/controllers/concerns/uploads_actions.rb' - 'app/controllers/concerns/verifies_with_email.rb' - - 'app/controllers/concerns/web_hooks/hook_log_actions.rb' - 'app/controllers/concerns/wiki_actions.rb' - 'app/controllers/dashboard/projects_controller.rb' - 'app/controllers/explore/projects_controller.rb' - 'app/controllers/graphql_controller.rb' - - 'app/controllers/groups/autocomplete_sources_controller.rb' - - 'app/controllers/groups/labels_controller.rb' - 'app/controllers/groups/milestones_controller.rb' - 'app/controllers/groups_controller.rb' - 'app/controllers/help_controller.rb' @@ -71,7 +67,6 @@ Style/InlineDisableAnnotation: - 'app/controllers/oauth/authorizations_controller.rb' - 'app/controllers/passwords_controller.rb' - 'app/controllers/profiles/accounts_controller.rb' - - 'app/controllers/profiles/notifications_controller.rb' - 'app/controllers/projects/analytics/cycle_analytics/stages_controller.rb' - 'app/controllers/projects/blob_controller.rb' - 'app/controllers/projects/branches_controller.rb' @@ -161,7 +156,6 @@ Style/InlineDisableAnnotation: - 'app/finders/user_groups_counter.rb' - 'app/finders/user_recent_events_finder.rb' - 'app/finders/users_finder.rb' - - 'app/graphql/gitlab_schema.rb' - 'app/graphql/graphql_triggers.rb' - 'app/graphql/mutations/issues/update.rb' - 'app/graphql/mutations/projects/sync_fork.rb' @@ -248,7 +242,6 @@ Style/InlineDisableAnnotation: - 'app/graphql/types/clusters/agents/authorizations/ci_access_type.rb' - 'app/graphql/types/clusters/agents/authorizations/user_access_type.rb' - 'app/graphql/types/commit_references_type.rb' - - 'app/graphql/types/commit_signatures/verification_status_enum.rb' - 'app/graphql/types/countable_connection_type.rb' - 'app/graphql/types/customer_relations/organization_state_counts_type.rb' - 'app/graphql/types/deployment_tag_type.rb' @@ -289,7 +282,6 @@ Style/InlineDisableAnnotation: - 'app/graphql/types/projects/commit_parent_names_type.rb' - 'app/graphql/types/projects/fork_details_type.rb' - 'app/graphql/types/projects/repository_language_type.rb' - - 'app/graphql/types/projects/service_type_enum.rb' - 'app/graphql/types/projects/services/jira_project_type.rb' - 'app/graphql/types/projects/topic_type.rb' - 'app/graphql/types/query_complexity_type.rb' @@ -322,16 +314,13 @@ Style/InlineDisableAnnotation: - 'app/helpers/auth_helper.rb' - 'app/helpers/ci/status_helper.rb' - 'app/helpers/commits_helper.rb' - - 'app/helpers/diff_helper.rb' - 'app/helpers/dropdowns_helper.rb' - 'app/helpers/integrations_helper.rb' - 'app/helpers/issuables_helper.rb' - - 'app/helpers/lazy_image_tag_helper.rb' - 'app/helpers/namespaces_helper.rb' - 'app/helpers/page_layout_helper.rb' - 'app/helpers/routing/projects_helper.rb' - 'app/helpers/routing/pseudonymization_helper.rb' - - 'app/helpers/search_helper.rb' - 'app/helpers/sidebars_helper.rb' - 'app/helpers/sorting_helper.rb' - 'app/helpers/users_helper.rb' @@ -351,7 +340,6 @@ Style/InlineDisableAnnotation: - 'app/models/award_emoji.rb' - 'app/models/badge.rb' - 'app/models/board.rb' - - 'app/models/bulk_import.rb' - 'app/models/bulk_imports/entity.rb' - 'app/models/ci/bridge.rb' - 'app/models/ci/build.rb' @@ -385,10 +373,7 @@ Style/InlineDisableAnnotation: - 'app/models/concerns/fast_destroy_all.rb' - 'app/models/concerns/featurable.rb' - 'app/models/concerns/file_store_mounter.rb' - - 'app/models/concerns/from_except.rb' - - 'app/models/concerns/from_intersect.rb' - 'app/models/concerns/from_set_operator.rb' - - 'app/models/concerns/from_union.rb' - 'app/models/concerns/has_repository.rb' - 'app/models/concerns/ignorable_columns.rb' - 'app/models/concerns/integrations/reset_secret_fields.rb' @@ -403,7 +388,6 @@ Style/InlineDisableAnnotation: - 'app/models/concerns/participable.rb' - 'app/models/concerns/project_features_compatibility.rb' - 'app/models/concerns/redactable.rb' - - 'app/models/concerns/redis_cacheable.rb' - 'app/models/concerns/resolvable_discussion.rb' - 'app/models/concerns/routable.rb' - 'app/models/concerns/sanitizable.rb' @@ -500,7 +484,6 @@ Style/InlineDisableAnnotation: - 'app/policies/upload_policy.rb' - 'app/presenters/ci/build_runner_presenter.rb' - 'app/presenters/deploy_key_presenter.rb' - - 'app/presenters/dev_ops_report/metric_presenter.rb' - 'app/presenters/key_presenter.rb' - 'app/presenters/label_presenter.rb' - 'app/presenters/merge_request_presenter.rb' @@ -517,10 +500,8 @@ Style/InlineDisableAnnotation: - 'app/serializers/ci/dag_pipeline_entity.rb' - 'app/serializers/ci/job_entity.rb' - 'app/serializers/cluster_entity.rb' - - 'app/serializers/diffs_entity.rb' - 'app/serializers/diffs_metadata_entity.rb' - 'app/serializers/environment_serializer.rb' - - 'app/serializers/fork_namespace_entity.rb' - 'app/serializers/group_access_token_entity.rb' - 'app/serializers/group_access_token_serializer.rb' - 'app/serializers/group_child_entity.rb' @@ -568,10 +549,8 @@ Style/InlineDisableAnnotation: - 'app/services/ci/delete_unit_tests_service.rb' - 'app/services/ci/expire_pipeline_cache_service.rb' - 'app/services/ci/job_artifacts/bulk_delete_by_project_service.rb' - - 'app/services/ci/job_artifacts/destroy_batch_service.rb' - 'app/services/ci/job_artifacts/expire_project_build_artifacts_service.rb' - 'app/services/ci/pipeline_artifacts/create_code_quality_mr_diff_report_service.rb' - - 'app/services/ci/pipeline_creation/cancel_redundant_pipelines_service.rb' - 'app/services/ci/pipeline_processing/atomic_processing_service.rb' - 'app/services/ci/pipeline_processing/atomic_processing_service/status_collection.rb' - 'app/services/ci/queue/build_queue_service.rb' @@ -595,7 +574,6 @@ Style/InlineDisableAnnotation: - 'app/services/concerns/issues/resolve_discussions.rb' - 'app/services/concerns/rate_limited_service.rb' - 'app/services/concerns/work_items/widgetable_service.rb' - - 'app/services/database/consistency_check_service.rb' - 'app/services/database/consistency_fix_service.rb' - 'app/services/database/mark_migration_service.rb' - 'app/services/deployments/create_for_job_service.rb' @@ -615,7 +593,6 @@ Style/InlineDisableAnnotation: - 'app/services/issuable_base_service.rb' - 'app/services/issuable_links/create_service.rb' - 'app/services/issues/build_service.rb' - - 'app/services/issues/export_csv_service.rb' - 'app/services/issues/referenced_merge_requests_service.rb' - 'app/services/issues/relative_position_rebalancing_service.rb' - 'app/services/issues/set_crm_contacts_service.rb' @@ -629,8 +606,6 @@ Style/InlineDisableAnnotation: - 'app/services/lfs/locks_finder_service.rb' - 'app/services/lfs/unlock_file_service.rb' - 'app/services/loose_foreign_keys/cleaner_service.rb' - - 'app/services/members/projects/creator_service.rb' - - 'app/services/members/standard_member_builder.rb' - 'app/services/merge_requests/base_service.rb' - 'app/services/merge_requests/create_from_issue_service.rb' - 'app/services/merge_requests/delete_non_latest_diffs_service.rb' @@ -654,12 +629,10 @@ Style/InlineDisableAnnotation: - 'app/services/packages/nuget/extract_remote_metadata_file_service.rb' - 'app/services/packages/nuget/process_package_file_service.rb' - 'app/services/packages/nuget/search_service.rb' - - 'app/services/packages/rpm/repository_metadata/build_xml_base_service.rb' - 'app/services/packages/rubygems/metadata_extraction_service.rb' - 'app/services/packages/update_tags_service.rb' - 'app/services/pages/destroy_deployments_service.rb' - 'app/services/personal_access_tokens/revoke_token_family_service.rb' - - 'app/services/projects/auto_devops/disable_service.rb' - 'app/services/projects/autocomplete_service.rb' - 'app/services/projects/batch_forks_count_service.rb' - 'app/services/projects/batch_open_issues_count_service.rb' @@ -691,8 +664,6 @@ Style/InlineDisableAnnotation: - 'app/services/quick_actions/interpret_service.rb' - 'app/services/quick_actions/target_service.rb' - 'app/services/releases/create_evidence_service.rb' - - 'app/services/releases/create_service.rb' - - 'app/services/releases/update_service.rb' - 'app/services/repositories/changelog_service.rb' - 'app/services/resource_events/change_labels_service.rb' - 'app/services/resource_events/synthetic_label_notes_builder_service.rb' @@ -714,7 +685,6 @@ Style/InlineDisableAnnotation: - 'app/services/todos/destroy/unauthorized_features_service.rb' - 'app/services/topics/merge_service.rb' - 'app/services/user_project_access_changed_service.rb' - - 'app/services/users/activate_service.rb' - 'app/services/users/assigned_issues_count_service.rb' - 'app/services/users/batch_status_cleaner_service.rb' - 'app/services/users/destroy_service.rb' @@ -724,14 +694,12 @@ Style/InlineDisableAnnotation: - 'app/services/users/set_namespace_commit_email_service.rb' - 'app/services/users/update_service.rb' - 'app/services/verify_pages_domain_service.rb' - - 'app/services/web_hook_service.rb' - 'app/services/wiki_pages/update_service.rb' - 'app/uploaders/gitlab_uploader.rb' - 'app/uploaders/metric_image_uploader.rb' - 'app/uploaders/object_storage.rb' - 'app/uploaders/object_storage/cdn.rb' - 'app/uploaders/object_storage/cdn/google_cdn.rb' - - 'app/uploaders/object_storage/cdn/google_ip_cache.rb' - 'app/uploaders/records_uploads.rb' - 'app/validators/addressable_url_validator.rb' - 'app/validators/cron_validator.rb' @@ -817,7 +785,6 @@ Style/InlineDisableAnnotation: - 'app/workers/create_pipeline_worker.rb' - 'app/workers/database/batched_background_migration/ci_database_worker.rb' - 'app/workers/database/batched_background_migration/ci_execution_worker.rb' - - 'app/workers/database/batched_background_migration/execution_worker.rb' - 'app/workers/database/batched_background_migration/main_execution_worker.rb' - 'app/workers/database/batched_background_migration/single_database_worker.rb' - 'app/workers/database/batched_background_migration_worker.rb' @@ -920,10 +887,8 @@ Style/InlineDisableAnnotation: - 'app/workers/group_export_worker.rb' - 'app/workers/group_import_worker.rb' - 'app/workers/import_export_project_cleanup_worker.rb' - - 'app/workers/import_issues_csv_worker.rb' - 'app/workers/incident_management/add_severity_system_note_worker.rb' - 'app/workers/incident_management/pager_duty/process_incident_worker.rb' - - 'app/workers/incident_management/process_alert_worker_v2.rb' - 'app/workers/integrations/execute_worker.rb' - 'app/workers/integrations/irker_worker.rb' - 'app/workers/invalid_gpg_signature_update_worker.rb' @@ -944,12 +909,10 @@ Style/InlineDisableAnnotation: - 'app/workers/member_invitation_reminder_emails_worker.rb' - 'app/workers/members/expiring_email_notification_worker.rb' - 'app/workers/members/expiring_worker.rb' - - 'app/workers/merge_worker.rb' - 'app/workers/metrics/global_metrics_update_worker.rb' - 'app/workers/migrate_external_diffs_worker.rb' - 'app/workers/namespaces/prune_aggregation_schedules_worker.rb' - 'app/workers/new_issue_worker.rb' - - 'app/workers/new_merge_request_worker.rb' - 'app/workers/new_note_worker.rb' - 'app/workers/object_pool/create_worker.rb' - 'app/workers/object_pool/destroy_worker.rb' @@ -1049,7 +1012,6 @@ Style/InlineDisableAnnotation: - 'config/initializers/enumerator_next_patch.rb' - 'config/initializers/fix_local_cache_middleware.rb' - 'config/initializers/fog_core_patch.rb' - - 'config/initializers/grape_validators.rb' - 'config/initializers/kaminari_active_record_relation_methods_with_limit.rb' - 'config/initializers/mail_starttls_patch.rb' - 'config/initializers/postgres_cte_as_materialized.rb' @@ -1059,7 +1021,6 @@ Style/InlineDisableAnnotation: - 'config/initializers/warden.rb' - 'config/initializers/wikicloth_redos_patch.rb' - 'config/initializers/wikicloth_ruby_3_patch.rb' - - 'config/routes/api.rb' - 'config/routes/group.rb' - 'config/routes/project.rb' - 'danger/ce_ee_vue_templates/Dangerfile' @@ -1110,13 +1071,11 @@ Style/InlineDisableAnnotation: - 'ee/app/controllers/ee/search_controller.rb' - 'ee/app/controllers/ee/sessions_controller.rb' - 'ee/app/controllers/ee/users_controller.rb' - - 'ee/app/controllers/groups/analytics/productivity_analytics_controller.rb' - 'ee/app/controllers/groups/epics/notes_controller.rb' - 'ee/app/controllers/groups/epics_controller.rb' - 'ee/app/controllers/groups/ldap_group_links_controller.rb' - 'ee/app/controllers/groups/ldaps_controller.rb' - 'ee/app/controllers/groups/scim_oauth_controller.rb' - - 'ee/app/controllers/groups/todos_controller.rb' - 'ee/app/controllers/projects/approver_groups_controller.rb' - 'ee/app/controllers/projects/approvers_controller.rb' - 'ee/app/controllers/projects/path_locks_controller.rb' @@ -1165,7 +1124,6 @@ Style/InlineDisableAnnotation: - 'ee/app/graphql/mutations/iterations/update.rb' - 'ee/app/graphql/mutations/projects/set_locked.rb' - 'ee/app/graphql/mutations/requirements_management/export_requirements.rb' - - 'ee/app/graphql/resolvers/analytics/contribution_analytics/contributions_resolver.rb' - 'ee/app/graphql/resolvers/board_groupings/epics_resolver.rb' - 'ee/app/graphql/resolvers/ci/runners_jobs_statistics_resolver.rb' - 'ee/app/graphql/resolvers/iterations_resolver.rb' @@ -1185,7 +1143,6 @@ Style/InlineDisableAnnotation: - 'ee/app/graphql/types/applied_ml/suggested_reviewers_type.rb' - 'ee/app/graphql/types/boards/board_epic_type.rb' - 'ee/app/graphql/types/boards/epic_list_metadata_type.rb' - - 'ee/app/graphql/types/boards/epic_list_type.rb' - 'ee/app/graphql/types/boards/epic_user_preferences_type.rb' - 'ee/app/graphql/types/branch_protections/unprotect_access_level_type.rb' - 'ee/app/graphql/types/burnup_chart_daily_totals_type.rb' @@ -1193,7 +1150,6 @@ Style/InlineDisableAnnotation: - 'ee/app/graphql/types/ci/code_coverage_summary_type.rb' - 'ee/app/graphql/types/ci/code_quality_degradation_type.rb' - 'ee/app/graphql/types/ci/jobs_statistics_type.rb' - - 'ee/app/graphql/types/ci/minutes/namespace_monthly_usage_type.rb' - 'ee/app/graphql/types/ci/minutes/project_monthly_usage_type.rb' - 'ee/app/graphql/types/ci/queueing_history_time_series_type.rb' - 'ee/app/graphql/types/dast/profile_cadence_type.rb' @@ -1215,15 +1171,12 @@ Style/InlineDisableAnnotation: - 'ee/app/graphql/types/incident_management/escalation_rule_input_type.rb' - 'ee/app/graphql/types/incident_management/escalation_rule_type.rb' - 'ee/app/graphql/types/incident_management/oncall_participant_type.rb' - - 'ee/app/graphql/types/incident_management/oncall_rotation_active_period_input_type.rb' - 'ee/app/graphql/types/incident_management/oncall_rotation_active_period_type.rb' - 'ee/app/graphql/types/incident_management/oncall_shift_type.rb' - 'ee/app/graphql/types/member_roles/customizable_permission_type.rb' - 'ee/app/graphql/types/namespaces/namespace_ban_type.rb' - 'ee/app/graphql/types/path_lock_type.rb' - - 'ee/app/graphql/types/product_analytics/category_enum.rb' - 'ee/app/graphql/types/product_analytics/panel_type.rb' - - 'ee/app/graphql/types/product_analytics/state_enum.rb' - 'ee/app/graphql/types/product_analytics/visualization_type.rb' - 'ee/app/graphql/types/protected_environment_type.rb' - 'ee/app/graphql/types/protected_environments/approval_rule_for_summary_type.rb' @@ -1233,7 +1186,6 @@ Style/InlineDisableAnnotation: - 'ee/app/graphql/types/requirements_management/requirement_states_count_type.rb' - 'ee/app/graphql/types/sbom/license_type.rb' - 'ee/app/graphql/types/sbom/location_type.rb' - - 'ee/app/graphql/types/scan_type.rb' - 'ee/app/graphql/types/scanned_resource_type.rb' - 'ee/app/graphql/types/security/training_type.rb' - 'ee/app/graphql/types/security_orchestration/approval_group_type.rb' @@ -1299,30 +1251,22 @@ Style/InlineDisableAnnotation: - 'ee/app/graphql/types/work_items/widgets/weight_type.rb' - 'ee/app/helpers/admin/application_settings_helper.rb' - 'ee/app/helpers/ee/application_helper.rb' - - 'ee/app/helpers/ee/boards_helper.rb' - 'ee/app/helpers/ee/gitlab_routing_helper.rb' - 'ee/app/helpers/ee/kerberos_helper.rb' - - 'ee/app/helpers/projects/on_demand_scans_helper.rb' - 'ee/app/helpers/push_rules_helper.rb' - - 'ee/app/models/ai/ai_resource/concerns/noteable.rb' - 'ee/app/models/ai/ai_resource/epic.rb' - 'ee/app/models/ai/ai_resource/issue.rb' - 'ee/app/models/approval_project_rules_user.rb' - - 'ee/app/models/approver.rb' - 'ee/app/models/approver_group.rb' - 'ee/app/models/ci/minutes/namespace_monthly_usage.rb' - 'ee/app/models/concerns/elastic/application_versioned_search.rb' - 'ee/app/models/concerns/epics/metadata_cache_update.rb' - 'ee/app/models/concerns/geo/blob_replicator_strategy.rb' - - 'ee/app/models/dast/branch.rb' - 'ee/app/models/ee/analytics/cycle_analytics/issue_stage_event.rb' - - 'ee/app/models/ee/epic.rb' - 'ee/app/models/ee/group.rb' - 'ee/app/models/ee/member.rb' - - 'ee/app/models/ee/merge_request.rb' - 'ee/app/models/ee/namespace.rb' - 'ee/app/models/ee/namespace_setting.rb' - - 'ee/app/models/ee/project.rb' - 'ee/app/models/ee/project_group_link.rb' - 'ee/app/models/ee/project_member.rb' - 'ee/app/models/ee/user.rb' @@ -1332,7 +1276,6 @@ Style/InlineDisableAnnotation: - 'ee/app/models/elasticsearch_indexed_project.rb' - 'ee/app/models/geo/container_repository_registry.rb' - 'ee/app/models/geo/upload_registry.rb' - - 'ee/app/models/geo_node.rb' - 'ee/app/models/geo_node_status.rb' - 'ee/app/models/incident_management/oncall_rotation.rb' - 'ee/app/models/iteration.rb' @@ -1344,13 +1287,10 @@ Style/InlineDisableAnnotation: - 'ee/app/models/package_metadata/package.rb' - 'ee/app/models/protected_environments/approval_rules/summarizable.rb' - 'ee/app/models/protected_environments/authorizable.rb' - - 'ee/app/models/requirements_management/requirement.rb' - 'ee/app/models/security/training.rb' - - 'ee/app/models/vulnerabilities/finding.rb' - 'ee/app/policies/merge_request_diff_policy.rb' - 'ee/app/policies/path_lock_policy.rb' - 'ee/app/replicators/geo/container_repository_replicator.rb' - - 'ee/app/serializers/dashboard_environments_serializer.rb' - 'ee/app/serializers/ee/discussion_serializer.rb' - 'ee/app/serializers/epic_ai_entity.rb' - 'ee/app/services/analytics/cycle_analytics/consistency_check_service.rb' @@ -1373,14 +1313,12 @@ Style/InlineDisableAnnotation: - 'ee/app/services/compliance_management/violations/export_service.rb' - 'ee/app/services/dependencies/export_serializers/group_dependencies_service.rb' - 'ee/app/services/deployments/approval_service.rb' - - 'ee/app/services/dora/aggregate_scores_service.rb' - 'ee/app/services/ee/audit_event_service.rb' - 'ee/app/services/ee/audit_events/build_service.rb' - 'ee/app/services/ee/auth/container_registry_authentication_service.rb' - 'ee/app/services/ee/boards/base_service.rb' - 'ee/app/services/ee/boards/issues/list_service.rb' - 'ee/app/services/ee/boards/lists/create_service.rb' - - 'ee/app/services/ee/ci/queue/build_queue_service.rb' - 'ee/app/services/ee/groups/autocomplete_service.rb' - 'ee/app/services/ee/groups/destroy_service.rb' - 'ee/app/services/ee/groups/update_service.rb' @@ -1392,7 +1330,6 @@ Style/InlineDisableAnnotation: - 'ee/app/services/ee/merge_requests/merge_base_service.rb' - 'ee/app/services/ee/merge_requests/refresh_service.rb' - 'ee/app/services/ee/milestones/promote_service.rb' - - 'ee/app/services/ee/notification_recipients/builder/base.rb' - 'ee/app/services/ee/projects/create_from_template_service.rb' - 'ee/app/services/ee/projects/create_service.rb' - 'ee/app/services/ee/projects/destroy_service.rb' @@ -1402,7 +1339,6 @@ Style/InlineDisableAnnotation: - 'ee/app/services/ee/quick_actions/target_service.rb' - 'ee/app/services/ee/resource_events/synthetic_iteration_notes_builder_service.rb' - 'ee/app/services/ee/resource_events/synthetic_weight_notes_builder_service.rb' - - 'ee/app/services/ee/search/global_service.rb' - 'ee/app/services/ee/search_service.rb' - 'ee/app/services/ee/system_note_service.rb' - 'ee/app/services/ee/users/build_service.rb' @@ -1436,7 +1372,6 @@ Style/InlineDisableAnnotation: - 'ee/app/services/security/ingestion/schedule_mark_dropped_as_resolved_service.rb' - 'ee/app/services/security/ingestion/tasks/ingest_vulnerability_flags.rb' - 'ee/app/services/security/merge_request_security_report_generation_service.rb' - - 'ee/app/services/security/scan_result_policies/sync_any_merge_request_rules_service.rb' - 'ee/app/services/security/security_orchestration_policies/fetch_policy_approvers_service.rb' - 'ee/app/services/security/security_orchestration_policies/policy_branches_service.rb' - 'ee/app/services/security/security_orchestration_policies/process_scan_result_policy_service.rb' @@ -1477,7 +1412,6 @@ Style/InlineDisableAnnotation: - 'ee/app/workers/concerns/elastic/indexing_control.rb' - 'ee/app/workers/concerns/geo/base_registry_sync_worker.rb' - 'ee/app/workers/create_github_webhook_worker.rb' - - 'ee/app/workers/ee/issuable_export_csv_worker.rb' - 'ee/app/workers/ee/post_receive.rb' - 'ee/app/workers/elastic/migration_worker.rb' - 'ee/app/workers/elastic/namespace_update_worker.rb' @@ -1532,7 +1466,6 @@ Style/InlineDisableAnnotation: - 'ee/app/workers/projects/disable_legacy_open_source_license_for_inactive_projects_worker.rb' - 'ee/app/workers/pull_mirrors/reenable_configuration_worker.rb' - 'ee/app/workers/refresh_license_compliance_checks_worker.rb' - - 'ee/app/workers/scan_security_report_secrets_worker.rb' - 'ee/app/workers/search/index_curation_worker.rb' - 'ee/app/workers/search/zoekt/namespace_indexer_worker.rb' - 'ee/app/workers/security/create_orchestration_policy_worker.rb' @@ -1589,9 +1522,6 @@ Style/InlineDisableAnnotation: - 'ee/lib/analytics/merge_request_metrics_calculator.rb' - 'ee/lib/analytics/refresh_approvals_data.rb' - 'ee/lib/analytics/refresh_reassign_data.rb' - - 'ee/lib/api/admin/search/migrations.rb' - - 'ee/lib/api/audit_events.rb' - - 'ee/lib/api/dora/metrics.rb' - 'ee/lib/api/elasticsearch_indexed_namespaces.rb' - 'ee/lib/api/entities/search/migration.rb' - 'ee/lib/api/epic_issues.rb' @@ -1601,7 +1531,6 @@ Style/InlineDisableAnnotation: - 'ee/lib/api/saml_group_links.rb' - 'ee/lib/audit/changes.rb' - 'ee/lib/banzai/filter/references/iteration_reference_filter.rb' - - 'ee/lib/ee/api/entities/analytics/code_review/merge_request.rb' - 'ee/lib/ee/api/entities/experiment.rb' - 'ee/lib/ee/api/group_boards.rb' - 'ee/lib/ee/api/group_milestones.rb' @@ -1609,7 +1538,6 @@ Style/InlineDisableAnnotation: - 'ee/lib/ee/api/helpers.rb' - 'ee/lib/ee/api/helpers/award_emoji.rb' - 'ee/lib/ee/api/helpers/common_helpers.rb' - - 'ee/lib/ee/api/helpers/internal_helpers.rb' - 'ee/lib/ee/api/helpers/members_helpers.rb' - 'ee/lib/ee/api/internal/base.rb' - 'ee/lib/ee/api/project_milestones.rb' @@ -1695,7 +1623,6 @@ Style/InlineDisableAnnotation: - 'ee/lib/gitlab/path_locks_finder.rb' - 'ee/lib/gitlab/root_excess_size_error_message.rb' - 'ee/lib/gitlab/search/zoekt/client.rb' - - 'ee/lib/gitlab/status_page/storage/object.rb' - 'ee/lib/gitlab/status_page/storage/s3_multipart_upload.rb' - 'ee/lib/gitlab/usage/metrics/instrumentations/license_metric.rb' - 'ee/lib/gitlab/vulnerability_scanning/advisory.rb' @@ -1704,10 +1631,7 @@ Style/InlineDisableAnnotation: - 'ee/lib/system_check/geo/authorized_keys_check.rb' - 'ee/lib/tasks/geo.rake' - 'ee/locale/unfound_translations.rb' - - 'ee/spec/controllers/concerns/gitlab_subscriptions/seat_count_alert_spec.rb' - - 'ee/spec/controllers/concerns/routable_actions_spec.rb' - 'ee/spec/controllers/projects/settings/merge_requests_controller_spec.rb' - - 'ee/spec/factories/package_metadata/pm_licenses.rb' - 'ee/spec/factories/security_scans.rb' - 'ee/spec/features/dependency_proxy/packages/maven_spec.rb' - 'ee/spec/features/groups/group_settings_spec.rb' @@ -1717,16 +1641,13 @@ Style/InlineDisableAnnotation: - 'ee/spec/features/registrations/combined_registration_spec.rb' - 'ee/spec/features/registrations/saas/standard_flow_with_2fa_spec.rb' - 'ee/spec/features/subscriptions/subscription_flow_for_existing_user_with_eligible_group_spec.rb' - - 'ee/spec/features/trials/lead_creation_form_validation_spec.rb' - 'ee/spec/finders/audit_event_finder_spec.rb' - 'ee/spec/finders/ee/group_members_finder_spec.rb' - 'ee/spec/helpers/analytics/analytics_dashboards_helper_spec.rb' - 'ee/spec/helpers/ee/dashboard_helper_spec.rb' - - 'ee/spec/helpers/ee/releases_helper_spec.rb' - 'ee/spec/initializers/fog_google_https_private_urls_spec.rb' - 'ee/spec/lib/audit/push_rules/group_push_rules_changes_auditor_spec.rb' - 'ee/spec/lib/audit/push_rules/project_push_rules_changes_auditor_spec.rb' - - 'ee/spec/lib/code_suggestions/instructions_extractor_spec.rb' - 'ee/spec/lib/ee/gitlab/background_migration/backfill_iteration_cadence_id_for_boards_spec.rb' - 'ee/spec/lib/ee/gitlab/background_migration/backfill_missing_vulnerability_dismissal_details_spec.rb' - 'ee/spec/lib/ee/gitlab/background_migration/delete_invalid_epic_issues_spec.rb' @@ -1736,7 +1657,6 @@ Style/InlineDisableAnnotation: - 'ee/spec/lib/ee/gitlab/background_migration/populate_denormalized_columns_for_sbom_occurrences_spec.rb' - 'ee/spec/lib/ee/gitlab/database/docs/docs_spec.rb' - 'ee/spec/lib/ee/gitlab/import_export/repo_restorer_spec.rb' - - 'ee/spec/lib/ee/gitlab/issuable_metadata_spec.rb' - 'ee/spec/lib/ee/gitlab/saas_spec.rb' - 'ee/spec/lib/gitlab/analytics/value_stream_dashboard/namespace_cursor_spec.rb' - 'ee/spec/lib/gitlab/auth/o_auth/user_spec.rb' @@ -1746,7 +1666,6 @@ Style/InlineDisableAnnotation: - 'ee/spec/lib/gitlab/email/handler/create_note_handler_spec.rb' - 'ee/spec/lib/gitlab/geo/cron_manager_spec.rb' - 'ee/spec/lib/gitlab/geo/every_repository_type_replicated_spec.rb' - - 'ee/spec/lib/gitlab/geo/log_helpers_spec.rb' - 'ee/spec/lib/gitlab/import_export/group/relation_factory_spec.rb' - 'ee/spec/lib/gitlab/import_export/project/relation_factory_spec.rb' - 'ee/spec/lib/gitlab/mirror_spec.rb' @@ -1755,7 +1674,6 @@ Style/InlineDisableAnnotation: - 'ee/spec/lib/gitlab/timebox/snapshot_builder_spec.rb' - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/count_secure_pipelines_metric_spec.rb' - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/count_security_scans_metric_spec.rb' - - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/count_user_merge_requests_for_projects_with_applied_scan_result_policies_metric_spec.rb' - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/protected_environment_approval_rules_required_approvals_average_metric_spec.rb' - 'ee/spec/mailers/emails/enterprise_users_spec.rb' - 'ee/spec/mailers/emails/merge_requests_spec.rb' @@ -1794,8 +1712,6 @@ Style/InlineDisableAnnotation: - 'ee/spec/requests/api/group_service_accounts_spec.rb' - 'ee/spec/requests/api/groups_spec.rb' - 'ee/spec/requests/api/internal/base_spec.rb' - - 'ee/spec/requests/api/vulnerability_findings_spec.rb' - - 'ee/spec/requests/git_http_geo_spec.rb' - 'ee/spec/requests/groups/issues_controller_spec.rb' - 'ee/spec/serializers/vulnerabilities/issue_link_entity_spec.rb' - 'ee/spec/serializers/vulnerabilities/merge_request_link_entity_spec.rb' @@ -1808,7 +1724,6 @@ Style/InlineDisableAnnotation: - 'ee/spec/services/gitlab_subscriptions/preview_billable_user_change_service_spec.rb' - 'ee/spec/services/merge_requests/update_blocks_service_spec.rb' - 'ee/spec/services/package_metadata/sync_service_spec.rb' - - 'ee/spec/services/security/merge_reports_service_spec.rb' - 'ee/spec/services/security/security_orchestration_policies/policy_branches_service_spec.rb' - 'ee/spec/services/security/token_revocation_service_spec.rb' - 'ee/spec/spec_helper.rb' @@ -1824,10 +1739,8 @@ Style/InlineDisableAnnotation: - 'ee/spec/support/shared_examples/models/concerns/blob_replicator_strategy_shared_examples.rb' - 'ee/spec/support/shared_examples/models/concerns/linkable_items_shared_examples.rb' - 'ee/spec/support/shared_examples/models/concerns/replicator_shared_examples.rb' - - 'ee/spec/support/shared_examples/models/elasticsearch_indexed_container_shared_examples.rb' - 'ee/spec/support/shared_examples/models/geo_framework_registry_shared_examples.rb' - 'ee/spec/support/shared_examples/models/geo_searchable_registry_shared_examples.rb' - - 'ee/spec/support/shared_examples/models/geo_verifiable_registry_shared_examples.rb' - 'ee/spec/support/shared_examples/requests/api/graphql/geo/registries_shared_examples.rb' - 'ee/spec/support/shared_examples/services/boards/base_service_shared_examples.rb' - 'ee/spec/support/shared_examples/workers/geo/framework_registry_sync_worker_shared_examples.rb' @@ -1848,7 +1761,6 @@ Style/InlineDisableAnnotation: - 'lib/api/access_requests.rb' - 'lib/api/admin/plan_limits.rb' - 'lib/api/admin/sidekiq.rb' - - 'lib/api/api.rb' - 'lib/api/api_guard.rb' - 'lib/api/appearance.rb' - 'lib/api/base.rb' @@ -1870,13 +1782,11 @@ Style/InlineDisableAnnotation: - 'lib/api/entities/basic_project_details.rb' - 'lib/api/entities/ci/runner_details.rb' - 'lib/api/entities/feature.rb' - - 'lib/api/entities/issuable_time_stats.rb' - 'lib/api/entities/ml/mlflow/search_runs.rb' - 'lib/api/entities/project.rb' - 'lib/api/entities/project_details.rb' - 'lib/api/entities/project_integration.rb' - 'lib/api/entities/project_with_access.rb' - - 'lib/api/entities/tag.rb' - 'lib/api/features.rb' - 'lib/api/group_boards.rb' - 'lib/api/groups.rb' @@ -1897,7 +1807,6 @@ Style/InlineDisableAnnotation: - 'lib/api/hooks/url_variables.rb' - 'lib/api/internal/base.rb' - 'lib/api/internal/workhorse.rb' - - 'lib/api/issue_links.rb' - 'lib/api/issues.rb' - 'lib/api/members.rb' - 'lib/api/merge_requests.rb' @@ -1932,13 +1841,11 @@ Style/InlineDisableAnnotation: - 'lib/bulk_imports/common/pipelines/lfs_objects_pipeline.rb' - 'lib/bulk_imports/file_downloads/filename_fetch.rb' - 'lib/bulk_imports/groups/transformers/group_attributes_transformer.rb' - - 'lib/bulk_imports/pipeline/runner.rb' - 'lib/bulk_imports/uniquify.rb' - 'lib/click_house/models/base_model.rb' - 'lib/click_house/query_builder.rb' - 'lib/click_house/redactor.rb' - 'lib/container_registry/path.rb' - - 'lib/container_registry/tag.rb' - 'lib/declarative_enum.rb' - 'lib/event_filter.rb' - 'lib/extracts_path.rb' @@ -1949,13 +1856,11 @@ Style/InlineDisableAnnotation: - 'lib/gem_extensions/active_record/delegate_cache.rb' - 'lib/gem_extensions/active_record/disable_joins/associations/association_scope.rb' - 'lib/gem_extensions/active_record/disable_joins/relation.rb' - - 'lib/gitlab/analytics/cycle_analytics/aggregated/base_query_builder.rb' - 'lib/gitlab/analytics/cycle_analytics/aggregated/median.rb' - 'lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher.rb' - 'lib/gitlab/analytics/cycle_analytics/average.rb' - 'lib/gitlab/analytics/cycle_analytics/base_query_builder.rb' - 'lib/gitlab/analytics/cycle_analytics/median.rb' - - 'lib/gitlab/analytics/cycle_analytics/records_fetcher.rb' - 'lib/gitlab/analytics/cycle_analytics/sorting.rb' - 'lib/gitlab/analytics/cycle_analytics/stage_events/code_stage_start.rb' - 'lib/gitlab/analytics/cycle_analytics/stage_events/issue_deployed_to_production.rb' @@ -2077,7 +1982,6 @@ Style/InlineDisableAnnotation: - 'lib/gitlab/container_repository/tags/cache.rb' - 'lib/gitlab/content_security_policy/config_loader.rb' - 'lib/gitlab/daemon.rb' - - 'lib/gitlab/data_builder/pipeline.rb' - 'lib/gitlab/data_builder/push.rb' - 'lib/gitlab/database.rb' - 'lib/gitlab/database/background_migration/batched_migration.rb' @@ -2117,14 +2021,11 @@ Style/InlineDisableAnnotation: - 'lib/gitlab/database_importers/work_items/related_links_restrictions_importer.rb' - 'lib/gitlab/dependency_linker/go_mod_linker.rb' - 'lib/gitlab/dependency_linker/go_sum_linker.rb' - - 'lib/gitlab/diff/file.rb' - 'lib/gitlab/diff/file_collection/merge_request_diff_batch.rb' - - 'lib/gitlab/diff/file_collection/paginated_diffs.rb' - 'lib/gitlab/diff/highlight_cache.rb' - 'lib/gitlab/diff/line.rb' - 'lib/gitlab/diff/line_mapper.rb' - 'lib/gitlab/diff/pair_selector.rb' - - 'lib/gitlab/diff/parser.rb' - 'lib/gitlab/discussions_diff/highlight_cache.rb' - 'lib/gitlab/doctor/reset_tokens.rb' - 'lib/gitlab/doctor/secrets.rb' @@ -2134,10 +2035,6 @@ Style/InlineDisableAnnotation: - 'lib/gitlab/email/handler/reply_processing.rb' - 'lib/gitlab/encoding_helper.rb' - 'lib/gitlab/encrypted_command_base.rb' - - 'lib/gitlab/encrypted_incoming_email_command.rb' - - 'lib/gitlab/encrypted_redis_command.rb' - - 'lib/gitlab/encrypted_service_desk_email_command.rb' - - 'lib/gitlab/encrypted_smtp_command.rb' - 'lib/gitlab/error_tracking/processor/context_payload_processor.rb' - 'lib/gitlab/error_tracking/processor/sanitizer_processor.rb' - 'lib/gitlab/etag_caching/store.rb' @@ -2151,7 +2048,6 @@ Style/InlineDisableAnnotation: - 'lib/gitlab/git/blob.rb' - 'lib/gitlab/git/commit.rb' - 'lib/gitlab/git/diff.rb' - - 'lib/gitlab/git/patches/collection.rb' - 'lib/gitlab/git/repository.rb' - 'lib/gitlab/git/tag.rb' - 'lib/gitlab/git/tree.rb' @@ -2172,10 +2068,8 @@ Style/InlineDisableAnnotation: - 'lib/gitlab/github_import/importer/single_endpoint_diff_notes_importer.rb' - 'lib/gitlab/github_import/importer/single_endpoint_issue_events_importer.rb' - 'lib/gitlab/github_import/label_finder.rb' - - 'lib/gitlab/github_import/markdown_text.rb' - 'lib/gitlab/github_import/milestone_finder.rb' - 'lib/gitlab/github_import/representation/pull_requests/review_requests.rb' - - 'lib/gitlab/github_import/user_finder.rb' - 'lib/gitlab/gon_helper.rb' - 'lib/gitlab/gpg/invalid_gpg_signature_updater.rb' - 'lib/gitlab/graphql/authorize/authorize_resource.rb' @@ -2190,10 +2084,7 @@ Style/InlineDisableAnnotation: - 'lib/gitlab/graphql/present.rb' - 'lib/gitlab/graphql/standard_graphql_error.rb' - 'lib/gitlab/group_search_results.rb' - - 'lib/gitlab/health_checks/metric.rb' - - 'lib/gitlab/health_checks/probes/status.rb' - 'lib/gitlab/health_checks/redis/redis_abstract_check.rb' - - 'lib/gitlab/health_checks/result.rb' - 'lib/gitlab/identifier.rb' - 'lib/gitlab/import/database_helpers.rb' - 'lib/gitlab/import/errors.rb' @@ -2231,16 +2122,13 @@ Style/InlineDisableAnnotation: - 'lib/gitlab/metrics/subscribers/action_cable.rb' - 'lib/gitlab/metrics/subscribers/rack_attack.rb' - 'lib/gitlab/middleware/basic_health_check.rb' - - 'lib/gitlab/middleware/release_env.rb' - 'lib/gitlab/monitor/demo_projects.rb' - 'lib/gitlab/nav/top_nav_menu_item.rb' - 'lib/gitlab/object_hierarchy.rb' - 'lib/gitlab/otp_key_rotator.rb' - - 'lib/gitlab/pagination/keyset/column_order_definition.rb' - 'lib/gitlab/pagination/keyset/in_operator_optimization/query_builder.rb' - 'lib/gitlab/pagination/keyset/iterator.rb' - 'lib/gitlab/pagination/keyset/order.rb' - - 'lib/gitlab/pagination/keyset/pager.rb' - 'lib/gitlab/pagination/offset_pagination.rb' - 'lib/gitlab/pagination_delegate.rb' - 'lib/gitlab/patch/action_cable_subscription_adapter_identifier.rb' @@ -2259,7 +2147,6 @@ Style/InlineDisableAnnotation: - 'lib/gitlab/rack_attack.rb' - 'lib/gitlab/rack_attack/request.rb' - 'lib/gitlab/rack_attack/store.rb' - - 'lib/gitlab/redis/hll.rb' - 'lib/gitlab/redis/multi_store.rb' - 'lib/gitlab/reference_extractor.rb' - 'lib/gitlab/relative_positioning/item_context.rb' @@ -2271,7 +2158,6 @@ Style/InlineDisableAnnotation: - 'lib/gitlab/sanitizers/exif.rb' - 'lib/gitlab/search/params.rb' - 'lib/gitlab/search/recent_items.rb' - - 'lib/gitlab/search/sort_options.rb' - 'lib/gitlab/search_context.rb' - 'lib/gitlab/search_results.rb' - 'lib/gitlab/seeders/ci/runner/runner_fleet_pipeline_seeder.rb' @@ -2286,9 +2172,7 @@ Style/InlineDisableAnnotation: - 'lib/gitlab/slash_commands/base_command.rb' - 'lib/gitlab/slash_commands/deploy.rb' - 'lib/gitlab/slash_commands/global_slack_handler.rb' - - 'lib/gitlab/slash_commands/issue_search.rb' - 'lib/gitlab/slash_commands/presenters/run.rb' - - 'lib/gitlab/slash_commands/result.rb' - 'lib/gitlab/snippet_search_results.rb' - 'lib/gitlab/source.rb' - 'lib/gitlab/sourcegraph.rb' @@ -2303,9 +2187,6 @@ Style/InlineDisableAnnotation: - 'lib/gitlab/tracking.rb' - 'lib/gitlab/uploads/migration_helper.rb' - 'lib/gitlab/url_builder.rb' - - 'lib/gitlab/usage/metrics/instrumentations/count_imported_projects_metric.rb' - - 'lib/gitlab/usage/metrics/instrumentations/database_metric.rb' - - 'lib/gitlab/usage/metrics/instrumentations/numbers_metric.rb' - 'lib/gitlab/usage/metrics/query.rb' - 'lib/gitlab/usage_data.rb' - 'lib/gitlab/usage_data_counters/merge_request_activity_unique_counter.rb' @@ -2313,12 +2194,10 @@ Style/InlineDisableAnnotation: - 'lib/gitlab/usage_data_queries.rb' - 'lib/gitlab/utils/usage_data.rb' - 'lib/gitlab/verify/batch_verifier.rb' - - 'lib/gitlab/verify/ci_secure_files.rb' - 'lib/gitlab/verify/rake_task.rb' - 'lib/gitlab/verify/uploads.rb' - 'lib/gitlab/webpack/file_loader.rb' - 'lib/gitlab/workhorse.rb' - - 'lib/gitlab/x509/signature.rb' - 'lib/gitlab_edition.rb' - 'lib/gitlab_settings/options.rb' - 'lib/gitlab_settings/settings.rb' @@ -2396,12 +2275,6 @@ Style/InlineDisableAnnotation: - 'qa/spec/resource/project_web_hook_spec.rb' - 'qa/spec/scenario/template_spec.rb' - 'qa/spec/support/formatters/allure_metadata_formatter_spec.rb' - - 'rubocop/cop/gettext/static_identifier.rb' - - 'rubocop/cop/gitlab/feature_available_usage.rb' - - 'rubocop/cop/migration/add_reference.rb' - - 'rubocop/cop/rspec/factory_bot/inline_association.rb' - - 'rubocop/cop/static_translation_definition.rb' - - 'rubocop/feature_categories.rb' - 'rubocop/migration_helpers.rb' - 'rubocop/rubocop.rb' - 'scripts/api/get_job_id.rb' @@ -2416,8 +2289,6 @@ Style/InlineDisableAnnotation: - 'scripts/rubocop-parse' - 'scripts/security-harness' - 'scripts/trigger-build.rb' - - 'sidekiq_cluster/cli.rb' - - 'sidekiq_cluster/sidekiq_cluster.rb' - 'spec/benchmarks/banzai_benchmark.rb' - 'spec/commands/diagnostic_reports/uploader_smoke_spec.rb' - 'spec/commands/sidekiq_cluster/cli_spec.rb' @@ -2426,10 +2297,8 @@ Style/InlineDisableAnnotation: - 'spec/config/application_spec.rb' - 'spec/controllers/concerns/content_security_policy_patch_spec.rb' - 'spec/controllers/concerns/continue_params_spec.rb' - - 'spec/controllers/groups/milestones_controller_spec.rb' - 'spec/controllers/omniauth_callbacks_controller_spec.rb' - 'spec/controllers/profiles/two_factor_auths_controller_spec.rb' - - 'spec/controllers/projects/milestones_controller_spec.rb' - 'spec/controllers/projects/releases_controller_spec.rb' - 'spec/controllers/projects/runners_controller_spec.rb' - 'spec/db/docs_spec.rb' @@ -2441,7 +2310,6 @@ Style/InlineDisableAnnotation: - 'spec/factories/projects.rb' - 'spec/factories/projects/ci_feature_usages.rb' - 'spec/factories/wiki_pages.rb' - - 'spec/features/issues/user_edits_issue_spec.rb' - 'spec/features/markdown/math_spec.rb' - 'spec/features/merge_request/user_edits_mr_spec.rb' - 'spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb' @@ -2453,7 +2321,6 @@ Style/InlineDisableAnnotation: - 'spec/finders/groups/projects_requiring_authorizations_refresh/on_transfer_finder_spec.rb' - 'spec/finders/packages/build_infos_finder_spec.rb' - 'spec/fixtures/packages/rubygems/package.gemspec' - - 'spec/frontend/fixtures/merge_requests.rb' - 'spec/graphql/mutations/design_management/delete_spec.rb' - 'spec/graphql/resolvers/board_resolver_spec.rb' - 'spec/graphql/resolvers/boards_resolver_spec.rb' @@ -2488,7 +2355,6 @@ Style/InlineDisableAnnotation: - 'spec/lib/gitlab/auth/o_auth/user_spec.rb' - 'spec/lib/gitlab/auth/saml/user_spec.rb' - 'spec/lib/gitlab/authorized_keys_spec.rb' - - 'spec/lib/gitlab/avatar_cache_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_finding_id_in_vulnerabilities_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_missing_ci_cd_settings_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_project_repositories_spec.rb' @@ -2527,10 +2393,8 @@ Style/InlineDisableAnnotation: - 'spec/lib/gitlab/doorkeeper_secret_storing/secret/pbkdf2_sha512_spec.rb' - 'spec/lib/gitlab/doorkeeper_secret_storing/token/pbkdf2_sha512_spec.rb' - 'spec/lib/gitlab/encoding_helper_spec.rb' - - 'spec/lib/gitlab/gfm/uploads_rewriter_spec.rb' - 'spec/lib/gitlab/git/object_pool_spec.rb' - 'spec/lib/gitlab/git/remote_mirror_spec.rb' - - 'spec/lib/gitlab/git/tree_spec.rb' - 'spec/lib/gitlab/grape_logging/loggers/urgency_logger_spec.rb' - 'spec/lib/gitlab/health_checks/master_check_spec.rb' - 'spec/lib/gitlab/i18n/po_linter_spec.rb' @@ -2561,18 +2425,13 @@ Style/InlineDisableAnnotation: - 'spec/lib/gitlab/memory/diagnostic_reports_logger_spec.rb' - 'spec/lib/gitlab/memory/reports_daemon_spec.rb' - 'spec/lib/gitlab/memory/reports_uploader_spec.rb' - - 'spec/lib/gitlab/memory/watchdog/configurator_spec.rb' - 'spec/lib/gitlab/memory/watchdog/handlers/puma_handler_spec.rb' - 'spec/lib/gitlab/merge_requests/message_generator_spec.rb' - 'spec/lib/gitlab/pagination/keyset/iterator_spec.rb' - 'spec/lib/gitlab/pagination/keyset/order_spec.rb' - 'spec/lib/gitlab/patch/database_config_spec.rb' - - 'spec/lib/gitlab/quick_actions/dsl_spec.rb' - - 'spec/lib/gitlab/redis/multi_store_spec.rb' - 'spec/lib/gitlab/search/abuse_detection_spec.rb' - 'spec/lib/gitlab/shard_health_cache_spec.rb' - - 'spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb' - - 'spec/lib/gitlab/sidekiq_middleware/size_limiter/server_spec.rb' - 'spec/lib/gitlab/usage/metrics/instrumentations/count_deployments_metric_spec.rb' - 'spec/lib/gitlab/usage/metrics/instrumentations/gitaly_apdex_metric_spec.rb' - 'spec/lib/gitlab/usage/service_ping/legacy_metric_metadata_decorator_spec.rb' @@ -2585,7 +2444,6 @@ Style/InlineDisableAnnotation: - 'spec/lib/mattermost/command_spec.rb' - 'spec/lib/mattermost/team_spec.rb' - 'spec/lib/object_storage/pending_direct_upload_spec.rb' - - 'spec/lib/omni_auth/strategies/jwt_spec.rb' - 'spec/mailers/notify_spec.rb' - 'spec/migrations/20231016001000_fix_design_user_mentions_design_id_note_id_index_for_self_managed_spec.rb' - 'spec/models/board_spec.rb' @@ -2598,7 +2456,6 @@ Style/InlineDisableAnnotation: - 'spec/models/concerns/legacy_bulk_insert_spec.rb' - 'spec/models/concerns/manual_inverse_association_spec.rb' - 'spec/models/concerns/noteable_spec.rb' - - 'spec/models/concerns/triggerable_hooks_spec.rb' - 'spec/models/environment_spec.rb' - 'spec/models/fork_network_member_spec.rb' - 'spec/models/hooks/system_hook_spec.rb' @@ -2616,11 +2473,8 @@ Style/InlineDisableAnnotation: - 'spec/presenters/member_presenter_spec.rb' - 'spec/presenters/ml/candidates_csv_presenter_spec.rb' - 'spec/presenters/packages/nuget/search_results_presenter_spec.rb' - - 'spec/presenters/packages/pypi/simple_index_presenter_spec.rb' - - 'spec/presenters/packages/pypi/simple_package_versions_presenter_spec.rb' - 'spec/requests/api/alert_management_alerts_spec.rb' - 'spec/requests/api/ci/runner/jobs_artifacts_spec.rb' - - 'spec/requests/api/graphql/ci/config_spec.rb' - 'spec/requests/api/graphql/groups_query_spec.rb' - 'spec/requests/api/graphql/issues_spec.rb' - 'spec/requests/api/graphql/mutations/issues/bulk_update_spec.rb' @@ -2647,11 +2501,9 @@ Style/InlineDisableAnnotation: - 'spec/serializers/admin/abuse_report_serializer_spec.rb' - 'spec/serializers/profile/event_entity_spec.rb' - 'spec/services/admin/set_feature_flag_service_spec.rb' - - 'spec/services/alert_management/metric_images/upload_service_spec.rb' - 'spec/services/auto_merge/base_service_spec.rb' - 'spec/services/auto_merge_service_spec.rb' - 'spec/services/batched_git_ref_updates/cleanup_scheduler_service_spec.rb' - - 'spec/services/boards/lists/list_service_spec.rb' - 'spec/services/ci/create_pipeline_service/environment_spec.rb' - 'spec/services/ci/create_pipeline_service/logger_spec.rb' - 'spec/services/ci/create_pipeline_service_spec.rb' @@ -2687,7 +2539,6 @@ Style/InlineDisableAnnotation: - 'spec/support/database/click_house/hooks.rb' - 'spec/support/db_cleaner.rb' - 'spec/support/fips.rb' - - 'spec/support/forgery_protection.rb' - 'spec/support/frontend_fixtures.rb' - 'spec/support/helpers/batch_destroy_dependent_associations_helper.rb' - 'spec/support/helpers/database/multiple_databases_helpers.rb' @@ -2698,14 +2549,12 @@ Style/InlineDisableAnnotation: - 'spec/support/helpers/gitaly_setup.rb' - 'spec/support/helpers/google_api/cloud_platform_helpers.rb' - 'spec/support/helpers/graphql/subscriptions/action_cable/mock_action_cable.rb' - - 'spec/support/helpers/graphql_helpers.rb' - 'spec/support/helpers/javascript_fixtures_helpers.rb' - 'spec/support/helpers/jira_integration_helpers.rb' - 'spec/support/helpers/login_helpers.rb' - 'spec/support/helpers/migrations_helpers/vulnerabilities_findings_helper.rb' - 'spec/support/helpers/migrations_helpers/vulnerabilities_helper.rb' - 'spec/support/helpers/rendered_helpers.rb' - - 'spec/support/helpers/snowplow_helpers.rb' - 'spec/support/helpers/stub_feature_flags.rb' - 'spec/support/helpers/stub_object_storage.rb' - 'spec/support/helpers/stub_snowplow.rb' @@ -2719,7 +2568,6 @@ Style/InlineDisableAnnotation: - 'spec/support/shared_examples/db/seeds/data_seeder_shared_examples.rb' - 'spec/support/shared_examples/deployments/create_for_job_shared_examples.rb' - 'spec/support/shared_examples/environments/create_for_job_shared_examples.rb' - - 'spec/support/shared_examples/features/editable_merge_request_shared_examples.rb' - 'spec/support/shared_examples/features/milestone_editing_shared_examples.rb' - 'spec/support/shared_examples/features/wiki/user_previews_wiki_changes_shared_examples.rb' - 'spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb' @@ -2738,7 +2586,6 @@ Style/InlineDisableAnnotation: - 'spec/support/shared_examples/models/issuable_link_shared_examples.rb' - 'spec/support/shared_examples/models/member_shared_examples.rb' - 'spec/support/shared_examples/models/packages/debian/component_file_shared_example.rb' - - 'spec/support/shared_examples/models/packages/debian/distribution_key_shared_examples.rb' - 'spec/support/shared_examples/requests/api/award_emoji_todo_shared_examples.rb' - 'spec/support/shared_examples/requests/api/conan_packages_shared_examples.rb' - 'spec/support/shared_examples/requests/api/graphql/group_and_project_boards_query_shared_examples.rb' diff --git a/.rubocop_todo/style/redundant_interpolation_unfreeze.yml b/.rubocop_todo/style/redundant_interpolation_unfreeze.yml index e815ebd29dd..8b6bdf95a10 100644 --- a/.rubocop_todo/style/redundant_interpolation_unfreeze.yml +++ b/.rubocop_todo/style/redundant_interpolation_unfreeze.yml @@ -2,4 +2,3 @@ # Cop supports --autocorrect. Style/RedundantInterpolationUnfreeze: Details: grace period - Exclude: diff --git a/.rubocop_todo/style/symbol_proc.yml b/.rubocop_todo/style/symbol_proc.yml index dea1a9d9cd5..1ac76598c3c 100644 --- a/.rubocop_todo/style/symbol_proc.yml +++ b/.rubocop_todo/style/symbol_proc.yml @@ -131,7 +131,6 @@ Style/SymbolProc: - 'qa/qa/page/profile/two_factor_auth.rb' - 'qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/3_create/merge_request/approval_rules_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/4_verify/pipeline_subscription_with_group_owned_project_spec.rb' - 'rubocop/cop/gitlab/mark_used_feature_flags.rb' - 'rubocop/cop/gitlab/namespaced_class.rb' - 'scripts/qa/testcases-check' diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 8939b43bfdd..03cd518996f 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -052c8f3e6471dc2acba91db014d522880f2c3042 +0449fac4772470bb53aec66a54cf671b2116d4f3 diff --git a/GITLAB_KAS_VERSION b/GITLAB_KAS_VERSION index 3dcccc3ee59..36a6e353b3c 100644 --- a/GITLAB_KAS_VERSION +++ b/GITLAB_KAS_VERSION @@ -1 +1 @@ -f5b045d8694528efbe2e08984ac5867bdfe41aee +b595a368555ce8d92856d0bccbc3b73638cce63d diff --git a/app/assets/javascripts/boards/components/issue_due_date.vue b/app/assets/javascripts/boards/components/issue_due_date.vue index 6e0378623aa..e0d9d94ac7e 100644 --- a/app/assets/javascripts/boards/components/issue_due_date.vue +++ b/app/assets/javascripts/boards/components/issue_due_date.vue @@ -65,6 +65,9 @@ export default { return standardDateFormat; }, + iconName() { + return this.isOverdue ? 'calendar-overdue' : 'calendar'; + }, issueDueDate() { return newDate(this.date); }, @@ -72,7 +75,7 @@ export default { const today = new Date(); return getDayDifference(today, this.issueDueDate); }, - isPastDue() { + isOverdue() { if (this.timeDifference >= 0 || this.closed) return false; return true; }, @@ -94,21 +97,17 @@ export default { class="board-card-info gl-mr-3 gl-cursor-help gl-text-secondary" > - + {{ __('Due date') }}
- {{ title }} + {{ title }} +
({{ __('overdue') }})
diff --git a/app/assets/javascripts/ci/catalog/components/details/ci_resource_readme.vue b/app/assets/javascripts/ci/catalog/components/details/ci_resource_readme.vue index b1e9b0dafd5..b32fcd39d6c 100644 --- a/app/assets/javascripts/ci/catalog/components/details/ci_resource_readme.vue +++ b/app/assets/javascripts/ci/catalog/components/details/ci_resource_readme.vue @@ -3,6 +3,7 @@ import { GlLoadingIcon } from '@gitlab/ui'; import { createAlert } from '~/alert'; import { __ } from '~/locale'; import SafeHtml from '~/vue_shared/directives/safe_html'; +import { renderGFM } from '~/behaviors/markdown/render_gfm'; import getCiCatalogResourceReadme from '../../graphql/queries/get_ci_catalog_resource_readme.query.graphql'; export default { @@ -47,6 +48,15 @@ export default { return this.$apollo?.queries.readmeHtml.loading; }, }, + watch: { + readmeHtml(newVal) { + if (newVal) { + this.$nextTick(() => { + renderGFM(this.$refs.readme); + }); + } + }, + }, i18n: { loadingError: __("There was a problem loading this project's readme content."), }, @@ -55,6 +65,6 @@ export default { diff --git a/app/assets/javascripts/issues/list/components/issue_card_time_info.vue b/app/assets/javascripts/issues/list/components/issue_card_time_info.vue index 935410c7f28..992f9518706 100644 --- a/app/assets/javascripts/issues/list/components/issue_card_time_info.vue +++ b/app/assets/javascripts/issues/list/components/issue_card_time_info.vue @@ -2,6 +2,7 @@ import { GlIcon, GlTooltipDirective } from '@gitlab/ui'; import { STATUS_CLOSED } from '~/issues/constants'; import { humanTimeframe, isInPast, localeDateFormat, newDate } from '~/lib/utils/datetime_utility'; +import { __ } from '~/locale'; import { STATE_CLOSED } from '~/work_items/constants'; import { isMilestoneWidget, isStartAndDueDateWidget } from '~/work_items/utils'; import IssuableMilestone from '~/vue_shared/issuable/list/components/issuable_milestone.vue'; @@ -39,12 +40,18 @@ export default { isClosed() { return this.issue.state === STATUS_CLOSED || this.issue.state === STATE_CLOSED; }, - showDueDateInRed() { + isOverdue() { if (!this.dueDate) { return false; } return isInPast(newDate(this.dueDate)) && !this.isClosed; }, + dueDateTitle() { + return this.isOverdue ? `${__('Due date')} (${__('overdue')})` : __('Due date'); + }, + dateIcon() { + return this.isOverdue ? 'calendar-overdue' : 'calendar'; + }, startDate() { return this.issue.widgets?.find(isStartAndDueDateWidget)?.startDate; }, @@ -62,11 +69,10 @@ export default { v-if="dueDateText" v-gl-tooltip class="issuable-due-date gl-mr-3" - :class="{ 'gl-text-red-500': showDueDateInRed }" - :title="__('Due date')" + :title="dueDateTitle" data-testid="issuable-due-date" > - + {{ dueDateText }} VersionType class InputType < BaseObject graphql_name 'CiCatalogResourceComponentInput' @@ -21,7 +20,6 @@ module Types field :type, Types::Ci::Catalog::Resources::Components::InputTypeEnum, null: true, description: 'Type of the input.' end - # rubocop: enable Graphql/AuthorizeTypes end end end diff --git a/app/graphql/types/ci/catalog/resources/verification_level_enum.rb b/app/graphql/types/ci/catalog/resources/verification_level_enum.rb index b7d29e18e47..a4d464787fb 100644 --- a/app/graphql/types/ci/catalog/resources/verification_level_enum.rb +++ b/app/graphql/types/ci/catalog/resources/verification_level_enum.rb @@ -4,7 +4,6 @@ module Types module Ci module Catalog module Resources - # rubocop: disable Graphql/AuthorizeTypes -- Authorization handled by ResourceType class VerificationLevelEnum < BaseEnum graphql_name 'CiCatalogResourceVerificationLevel' @@ -12,7 +11,6 @@ module Types value level.upcase, value: level.to_s, description: "The resource is #{level.to_s.titleize}" end end - # rubocop: enable Graphql/AuthorizeTypes end end end diff --git a/app/graphql/types/commit_signatures/verification_status_enum.rb b/app/graphql/types/commit_signatures/verification_status_enum.rb index d0d8f6670c3..930b902d2d7 100644 --- a/app/graphql/types/commit_signatures/verification_status_enum.rb +++ b/app/graphql/types/commit_signatures/verification_status_enum.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -# rubocop:disable Graphql/AuthorizeTypes - module Types module CommitSignatures class VerificationStatusEnum < BaseEnum @@ -14,5 +12,3 @@ module Types end end end - -# rubocop:enable Graphql/AuthorizeTypes diff --git a/app/graphql/types/issuables/labels/search_field_list_enum.rb b/app/graphql/types/issuables/labels/search_field_list_enum.rb index 4a11dd5da34..4530bc7c3f7 100644 --- a/app/graphql/types/issuables/labels/search_field_list_enum.rb +++ b/app/graphql/types/issuables/labels/search_field_list_enum.rb @@ -3,7 +3,6 @@ module Types module Issuables module Labels - # rubocop: disable Search/NamespacedClass -- not search related class SearchFieldListEnum < BaseEnum graphql_name 'LabelSearchFieldList' description 'List of fields where the provided searchTerm should be looked up' @@ -11,7 +10,6 @@ module Types value 'TITLE', 'Search in the label title.', value: :title value 'DESCRIPTION', 'Search in the label description.', value: :description end - # rubocop: enable Search/NamespacedClass end end end diff --git a/app/graphql/types/packages/helm/dependency_type.rb b/app/graphql/types/packages/helm/dependency_type.rb index 6ba14145fb5..9bf12d92004 100644 --- a/app/graphql/types/packages/helm/dependency_type.rb +++ b/app/graphql/types/packages/helm/dependency_type.rb @@ -12,7 +12,7 @@ module Types field :alias, GraphQL::Types::String, null: true, description: 'Alias of the dependency.', resolver_method: :resolve_alias field :condition, GraphQL::Types::String, null: true, description: 'Condition of the dependency.' field :enabled, GraphQL::Types::Boolean, null: true, description: 'Indicates the dependency is enabled.' - field :import_values, [GraphQL::Types::JSON], null: true, description: 'Import-values of the dependency.', hash_key: :'import-values' # rubocop:disable Graphql/JSONType + field :import_values, [GraphQL::Types::JSON], null: true, description: 'Import-values of the dependency.', hash_key: :'import-values' field :name, GraphQL::Types::String, null: true, description: 'Name of the dependency.' field :repository, GraphQL::Types::String, null: true, description: 'Repository of the dependency.' field :tags, [GraphQL::Types::String], null: true, description: 'Tags of the dependency.' diff --git a/app/graphql/types/projects/service_type_enum.rb b/app/graphql/types/projects/service_type_enum.rb index 6c576b3ddcd..1d5f60c2aee 100644 --- a/app/graphql/types/projects/service_type_enum.rb +++ b/app/graphql/types/projects/service_type_enum.rb @@ -15,7 +15,7 @@ module Types end # This prepend must stay here because the dynamic block below depends on it. - prepend_mod # rubocop: disable Cop/InjectEnterpriseEditionModule + prepend_mod ::Integration.available_integration_names( include_instance_specific: false, include_dev: false, include_disabled: true diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index cec74d41bf5..003ac985619 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -248,7 +248,7 @@ module DiffHelper def conflicts(allow_tree_conflicts: false) return unless merge_request.cannot_be_merged? && merge_request.source_branch_exists? && merge_request.target_branch_exists? - conflicts_service = MergeRequests::Conflicts::ListService.new(merge_request, allow_tree_conflicts: allow_tree_conflicts) # rubocop:disable CodeReuse/ServiceClass + conflicts_service = MergeRequests::Conflicts::ListService.new(merge_request, allow_tree_conflicts: allow_tree_conflicts) return unless allow_tree_conflicts || conflicts_service.can_be_resolved_in_ui? @@ -267,7 +267,7 @@ module DiffHelper cached_conflicts_with_types do # We set skip_content to true since we don't really need the content to list the conflicts and their types - conflicts_service = MergeRequests::Conflicts::ListService.new( # rubocop:disable CodeReuse/ServiceClass + conflicts_service = MergeRequests::Conflicts::ListService.new( merge_request, allow_tree_conflicts: true, skip_content: true diff --git a/app/helpers/lazy_image_tag_helper.rb b/app/helpers/lazy_image_tag_helper.rb index 10d603ef5d3..7fd6d22f19c 100644 --- a/app/helpers/lazy_image_tag_helper.rb +++ b/app/helpers/lazy_image_tag_helper.rb @@ -31,7 +31,7 @@ module LazyImageTagHelper end # Required for Banzai::Filter::ImageLazyLoadFilter - module_function :placeholder_image # rubocop: disable Style/AccessModifierDeclarations + module_function :placeholder_image private diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index 75362adbc83..14e6d868f37 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -335,7 +335,6 @@ module SearchHelper end # Autocomplete results for the current user's groups - # rubocop: disable CodeReuse/ActiveRecord def groups_autocomplete(term, limit = 5) current_user.authorized_groups.order_id_desc.search(term, use_minimum_char_limit: false).limit(limit).map do |group| { @@ -348,7 +347,6 @@ module SearchHelper } end end - # rubocop: enable CodeReuse/ActiveRecord def issue_autocomplete(term) return [] unless @project.present? && current_user && term =~ /\A#{Issue.reference_prefix}\d+\z/ diff --git a/app/helpers/sidebars_helper.rb b/app/helpers/sidebars_helper.rb index 39ab64a6031..f9bf8cf25d9 100644 --- a/app/helpers/sidebars_helper.rb +++ b/app/helpers/sidebars_helper.rb @@ -36,13 +36,13 @@ module SidebarsHelper Sidebars::Context.new(**context_data, **args) end - def super_sidebar_context(user, group:, project:, panel:, panel_type:) # rubocop:disable Metrics/AbcSize + def super_sidebar_context(user, group:, project:, panel:, panel_type:) return super_sidebar_logged_out_context(panel: panel, panel_type: panel_type) unless user super_sidebar_logged_in_context(user, group: group, project: project, panel: panel, panel_type: panel_type) end - def super_sidebar_logged_out_context(panel:, panel_type:) # rubocop:disable Metrics/AbcSize + def super_sidebar_logged_out_context(panel:, panel_type:) super_sidebar_instance_version_data.merge(super_sidebar_whats_new_data).merge({ is_logged_in: false, context_switcher_links: context_switcher_links, @@ -59,7 +59,7 @@ module SidebarsHelper }) end - def super_sidebar_logged_in_context(user, group:, project:, panel:, panel_type:) # rubocop:disable Metrics/AbcSize + def super_sidebar_logged_in_context(user, group:, project:, panel:, panel_type:) super_sidebar_logged_out_context(panel: panel, panel_type: panel_type).merge({ is_logged_in: true, is_admin: user.can_admin_all_resources?, diff --git a/app/models/bulk_import.rb b/app/models/bulk_import.rb index 7920328bd09..af493c4e49e 100644 --- a/app/models/bulk_import.rb +++ b/app/models/bulk_import.rb @@ -52,13 +52,10 @@ class BulkImport < ApplicationRecord transition any => :canceled end - # rubocop:disable Style/SymbolProc after_transition any => [:finished, :failed, :timeout] do |bulk_import| bulk_import.update_has_failures bulk_import.send_completion_notification end - # rubocop:enable Style/SymbolProc - after_transition any => [:canceled] do |bulk_import| bulk_import.run_after_commit do bulk_import.propagate_cancel diff --git a/app/models/clusters/cluster.rb b/app/models/clusters/cluster.rb index df606db98a0..6b6f9fbeebd 100644 --- a/app/models/clusters/cluster.rb +++ b/app/models/clusters/cluster.rb @@ -40,7 +40,7 @@ module Clusters def self.has_one_cluster_application(name) # rubocop:disable Naming/PredicateName application = APPLICATIONS[name.to_s] - has_one application.association_name, class_name: application.to_s, inverse_of: :cluster # rubocop:disable Rails/ReflectionClassName + has_one application.association_name, class_name: application.to_s, inverse_of: :cluster end has_many :kubernetes_namespaces diff --git a/app/models/compare.rb b/app/models/compare.rb index d80f3f72ca7..350149c08bf 100644 --- a/app/models/compare.rb +++ b/app/models/compare.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'set' # rubocop:disable Lint/RedundantRequireStatement -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. +require 'set' # Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. class Compare include Gitlab::Utils::StrongMemoize diff --git a/app/models/concerns/cascading_namespace_setting_attribute.rb b/app/models/concerns/cascading_namespace_setting_attribute.rb index c3a45c06176..0085b155612 100644 --- a/app/models/concerns/cascading_namespace_setting_attribute.rb +++ b/app/models/concerns/cascading_namespace_setting_attribute.rb @@ -229,14 +229,12 @@ module CascadingNamespaceSettingAttribute def cascaded_ancestor_value(attribute) return unless namespace.has_parent? - # rubocop:disable GitlabSecurity/SqlInjection self.class - .select(attribute) - .joins("join unnest(ARRAY[#{namespace_ancestor_ids.join(',')}]) with ordinality t(namespace_id, ord) USING (namespace_id)") - .where("#{attribute} IS NOT NULL") - .order('t.ord') - .limit(1).first&.read_attribute(attribute) - # rubocop:enable GitlabSecurity/SqlInjection + .select(attribute) + .joins("join unnest(ARRAY[#{namespace_ancestor_ids.join(',')}]) with ordinality t(namespace_id, ord) USING (namespace_id)") + .where("#{attribute} IS NOT NULL") + .order('t.ord') + .limit(1).first&.read_attribute(attribute) end def application_setting_value(attribute) diff --git a/app/models/concerns/cascading_project_setting_attribute.rb b/app/models/concerns/cascading_project_setting_attribute.rb index 9dde6e034e7..10034d91dca 100644 --- a/app/models/concerns/cascading_project_setting_attribute.rb +++ b/app/models/concerns/cascading_project_setting_attribute.rb @@ -139,7 +139,6 @@ module CascadingProjectSettingAttribute def cascaded_ancestor_value(attribute) return unless direct_ancestor_present? - # rubocop:disable GitlabSecurity/SqlInjection -- model attribute, not user input NamespaceSetting .select(attribute) .joins( @@ -148,7 +147,6 @@ module CascadingProjectSettingAttribute .where("#{attribute} IS NOT NULL") .order('t.ord') .limit(1).first&.read_attribute(attribute) - # rubocop:enable GitlabSecurity/SqlInjection end def application_setting_value(attribute) diff --git a/app/models/concerns/from_except.rb b/app/models/concerns/from_except.rb index b9ca9dda4b0..ff511018a3c 100644 --- a/app/models/concerns/from_except.rb +++ b/app/models/concerns/from_except.rb @@ -29,9 +29,7 @@ module FromExcept # # alias_as - The alias to use for the sub query. Defaults to the name of the # table of the current model. - # rubocop: disable Gitlab/Except extend FromSetOperator define_set_operator Gitlab::SQL::Except - # rubocop: enable Gitlab/Except end end diff --git a/app/models/concerns/from_intersect.rb b/app/models/concerns/from_intersect.rb index 428e63eb45e..080c60ec8ea 100644 --- a/app/models/concerns/from_intersect.rb +++ b/app/models/concerns/from_intersect.rb @@ -29,9 +29,7 @@ module FromIntersect # # alias_as - The alias to use for the sub query. Defaults to the name of the # table of the current model. - # rubocop: disable Gitlab/Intersect extend FromSetOperator define_set_operator Gitlab::SQL::Intersect - # rubocop: enable Gitlab/Intersect end end diff --git a/app/models/concerns/from_union.rb b/app/models/concerns/from_union.rb index e816608265b..447efc33dc5 100644 --- a/app/models/concerns/from_union.rb +++ b/app/models/concerns/from_union.rb @@ -37,9 +37,7 @@ module FromUnion # # alias_as - The alias to use for the sub query. Defaults to the name of the # table of the current model. - # rubocop: disable Gitlab/Union extend FromSetOperator define_set_operator Gitlab::SQL::Union - # rubocop: enable Gitlab/Union end end diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb index d41f2a44845..1812204470b 100644 --- a/app/models/concerns/issuable.rb +++ b/app/models/concerns/issuable.rb @@ -710,15 +710,15 @@ module Issuable end def old_escalation_status(assoc) - @_old_escalation_status ||= assoc.fetch(:escalation_status, escalation_status.status_name) # rubocop:disable Gitlab/ModuleWithInstanceVariables -- This is only used here + @_old_escalation_status ||= assoc.fetch(:escalation_status, escalation_status.status_name) end def old_total_time_spent(assoc) - @_old_total_time_spent ||= assoc.fetch(:total_time_spent, total_time_spent) # rubocop:disable Gitlab/ModuleWithInstanceVariables -- This is only used here + @_old_total_time_spent ||= assoc.fetch(:total_time_spent, total_time_spent) end def old_time_change(assoc) - @_old_time_change ||= assoc.fetch(:time_change, time_change) # rubocop:disable Gitlab/ModuleWithInstanceVariables -- This is only used here + @_old_time_change ||= assoc.fetch(:time_change, time_change) end end diff --git a/app/models/concerns/redis_cacheable.rb b/app/models/concerns/redis_cacheable.rb index 460cb529715..a0727b53159 100644 --- a/app/models/concerns/redis_cacheable.rb +++ b/app/models/concerns/redis_cacheable.rb @@ -57,7 +57,7 @@ module RedisCacheable end def with_redis(&block) - Gitlab::Redis::Cache.with(&block) # rubocop:disable CodeReuse/ActiveRecord + Gitlab::Redis::Cache.with(&block) end def cast_value_from_cache(attribute, value) diff --git a/app/models/merge_request_diff_commit.rb b/app/models/merge_request_diff_commit.rb index b923110e6b0..287e9d2cf02 100644 --- a/app/models/merge_request_diff_commit.rb +++ b/app/models/merge_request_diff_commit.rb @@ -64,7 +64,7 @@ class MergeRequestDiffCommit < ApplicationRecord committer_id: committer.id, merge_request_diff_id: merge_request_diff_id, relative_order: index, - sha: Gitlab::Database::ShaAttribute.serialize(sha), # rubocop:disable Cop/ActiveRecordSerialize + sha: Gitlab::Database::ShaAttribute.serialize(sha), authored_date: Gitlab::Database.sanitize_timestamp(commit_hash[:authored_date]), committed_date: Gitlab::Database.sanitize_timestamp(commit_hash[:committed_date]), trailers: Gitlab::Json.dump(commit_hash.fetch(:trailers, {})) diff --git a/app/models/ml/model_version.rb b/app/models/ml/model_version.rb index df31133de95..1669ae5743c 100644 --- a/app/models/ml/model_version.rb +++ b/app/models/ml/model_version.rb @@ -33,7 +33,7 @@ module Ml order(model_id: :desc, semver_major: :desc, semver_minor: :desc, semver_patch: :desc) .select('DISTINCT ON (model_id) *') } - scope :by_version, ->(version) { where("version LIKE ?", "#{sanitize_sql_like(version)}%") } # rubocop:disable GitlabSecurity/SqlInjection -- we are sanitizing + scope :by_version, ->(version) { where("version LIKE ?", "#{sanitize_sql_like(version)}%") } scope :for_model, ->(model) { where(project: model.project, model: model) } scope :including_relations, -> { includes(:project, :model, :candidate) } scope :order_by_version, ->(order) { reorder(version: order) } diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 55de4fac24b..4bbb5100b15 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -173,6 +173,7 @@ class Namespace < ApplicationRecord to: :namespace_settings delegate :emails_enabled, :emails_enabled=, to: :namespace_settings, allow_nil: true + delegate :token_expiry_notify_inherited, :token_expiry_notify_inherited=, to: :namespace_settings delegate :allow_runner_registration_token, :allow_runner_registration_token=, to: :namespace_settings @@ -618,6 +619,14 @@ class Namespace < ApplicationRecord .try(name) end + def can_modify_token_expiry_notify_inherited? + ancestors.all?(&:token_expiry_notify_inherited) + end + + def token_expiry_notify_inherited? + self_and_ancestors.all?(&:token_expiry_notify_inherited) + end + def actual_plan Plan.default end diff --git a/app/models/user.rb b/app/models/user.rb index 55ba72ce096..0499b6954d4 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -159,7 +159,7 @@ class User < ApplicationRecord dependent: :destroy, # rubocop:disable Cop/ActiveRecordDependent foreign_key: :owner_id, inverse_of: :owner, - autosave: true # rubocop:disable Cop/ActiveRecordDependent + autosave: true # Profile has_many :keys, -> { regular_keys }, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent @@ -1476,11 +1476,9 @@ class User < ApplicationRecord several_namespaces? || admin end - # rubocop: disable Style/ArgumentsForwarding -- https://gitlab.com/gitlab-org/gitlab/-/issues/433045 def can?(action, subject = :global, **opts) Ability.allowed?(self, action, subject, **opts) end - # rubocop: enable Style/ArgumentsForwarding def confirm_deletion_with_password? !password_automatically_set? && allow_password_authentication? diff --git a/app/models/wiki_page/meta.rb b/app/models/wiki_page/meta.rb index bcfd9499299..f743ab4bd35 100644 --- a/app/models/wiki_page/meta.rb +++ b/app/models/wiki_page/meta.rb @@ -124,7 +124,6 @@ class WikiPage end strong_memoize_attr :canonical_slug - # rubocop:disable Gitlab/ModuleWithInstanceVariables -- Technical debt def canonical_slug=(slug) return if @canonical_slug == slug @@ -140,7 +139,6 @@ class WikiPage @canonical_slug = slug end - # rubocop:enable Gitlab/ModuleWithInstanceVariables def update_state(created, known_slugs, wiki_page, updates) update_wiki_page_attributes(updates) @@ -173,7 +171,7 @@ class WikiPage end slugs.insert_all(slug_attrs) unless !is_new && slug_attrs.size == 1 - @canonical_slug = canonical_slug if is_new || strings.size == 1 # rubocop:disable Gitlab/ModuleWithInstanceVariables -- Technical debt + @canonical_slug = canonical_slug if is_new || strings.size == 1 end def slug_attributes(slug, canonical_slug, is_new, creation) diff --git a/app/presenters/dev_ops_report/metric_presenter.rb b/app/presenters/dev_ops_report/metric_presenter.rb index 30d2013ce72..8b73173f080 100644 --- a/app/presenters/dev_ops_report/metric_presenter.rb +++ b/app/presenters/dev_ops_report/metric_presenter.rb @@ -143,10 +143,8 @@ module DevOpsReport ] end - # rubocop: disable CodeReuse/ActiveRecord def average_percentage_score cards.sum(&:percentage_score) / cards.size.to_f end - # rubocop: enable CodeReuse/ActiveRecord end end diff --git a/app/serializers/diffs_entity.rb b/app/serializers/diffs_entity.rb index 883875122a9..72c06e991e5 100644 --- a/app/serializers/diffs_entity.rb +++ b/app/serializers/diffs_entity.rb @@ -43,18 +43,12 @@ class DiffsEntity < Grape::Entity diffs_project_merge_request_path(merge_request&.project, merge_request) end - # rubocop: disable CodeReuse/ActiveRecord expose :added_lines do |diffs| diffs.raw_diff_files.sum(&:added_lines) end - # rubocop: enable CodeReuse/ActiveRecord - - # rubocop: disable CodeReuse/ActiveRecord expose :removed_lines do |diffs| diffs.raw_diff_files.sum(&:removed_lines) end - # rubocop: enable CodeReuse/ActiveRecord - expose :render_overflow_warning do |diffs| render_overflow_warning?(diffs) end diff --git a/app/serializers/fork_namespace_entity.rb b/app/serializers/fork_namespace_entity.rb index c305e53eacf..71ea74a5ed1 100644 --- a/app/serializers/fork_namespace_entity.rb +++ b/app/serializers/fork_namespace_entity.rb @@ -32,13 +32,11 @@ class ForkNamespaceEntity < Grape::Entity private - # rubocop: disable CodeReuse/ActiveRecord def membership(user, object, memberships) return unless user memberships[object.id] end - # rubocop: enable CodeReuse/ActiveRecord def markdown_description(namespace) markdown_field(namespace, :description) diff --git a/app/services/boards/base_items_list_service.rb b/app/services/boards/base_items_list_service.rb index 0b8e4b95c76..03ad942c325 100644 --- a/app/services/boards/base_items_list_service.rb +++ b/app/services/boards/base_items_list_service.rb @@ -136,11 +136,9 @@ module Boards end # rubocop: enable CodeReuse/ActiveRecord - # rubocop: disable CodeReuse/ActiveRecord def label_links(items, label_ids) labels_filter.label_link_query(items, label_ids: label_ids) end - # rubocop: enable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord def with_list_label(items) diff --git a/app/services/ci/job_artifacts/destroy_batch_service.rb b/app/services/ci/job_artifacts/destroy_batch_service.rb index 0622272d9aa..f853ce97b60 100644 --- a/app/services/ci/job_artifacts/destroy_batch_service.rb +++ b/app/services/ci/job_artifacts/destroy_batch_service.rb @@ -24,7 +24,6 @@ module Ci @destroyed_ids = [] end - # rubocop: disable CodeReuse/ActiveRecord def execute(update_stats: true) if @skip_projects_on_refresh exclude_artifacts_undergoing_stats_refresh @@ -60,7 +59,6 @@ module Ci statistics_updates: statistics_updates_per_project ) end - # rubocop: enable CodeReuse/ActiveRecord private diff --git a/app/services/ci/runners/bulk_delete_runners_service.rb b/app/services/ci/runners/bulk_delete_runners_service.rb index b6b07746e61..dfaa0dfba91 100644 --- a/app/services/ci/runners/bulk_delete_runners_service.rb +++ b/app/services/ci/runners/bulk_delete_runners_service.rb @@ -45,13 +45,10 @@ module Ci end def compute_authorized_runners - # rubocop:disable CodeReuse/ActiveRecord @current_user.ci_owned_runners.load # preload the owned runners to avoid an N+1 authorized_runners, unauthorized_runners = @runners.limit(RUNNER_LIMIT) .partition { |runner| Ability.allowed?(@current_user, :delete_runner, runner) } - # rubocop:enable CodeReuse/ActiveRecord - [authorized_runners.map(&:id), unauthorized_runners.map(&:id)] end diff --git a/app/services/database/consistency_check_service.rb b/app/services/database/consistency_check_service.rb index 63648810615..564ddb84908 100644 --- a/app/services/database/consistency_check_service.rb +++ b/app/services/database/consistency_check_service.rb @@ -74,7 +74,6 @@ module Database fetch_next_start_id || random_start_id end - # rubocop: disable CodeReuse/ActiveRecord def min_id @min_id ||= source_model.minimum(source_sort_column) end @@ -82,7 +81,6 @@ module Database def max_id @max_id ||= source_model.maximum(source_sort_column) end - # rubocop: enable CodeReuse/ActiveRecord def fetch_next_start_id Gitlab::Redis::SharedState.with { |redis| redis.get(cursor_redis_shared_state_key)&.to_i } diff --git a/app/services/design_management/copy_design_collection/copy_service.rb b/app/services/design_management/copy_design_collection/copy_service.rb index f1ec99a063b..486cb360b47 100644 --- a/app/services/design_management/copy_design_collection/copy_service.rb +++ b/app/services/design_management/copy_design_collection/copy_service.rb @@ -267,7 +267,6 @@ module DesignManagement end # rubocop: enable CodeReuse/ActiveRecord - # rubocop: disable CodeReuse/ActiveRecord def link_lfs_files! oids = blobs.values.flat_map(&:values).map(&:lfs_oid) repository_type = LfsObjectsProject.repository_types[:design] @@ -292,7 +291,6 @@ module DesignManagement on_conflict: :do_nothing # Upsert ) end - # rubocop: enable CodeReuse/ActiveRecord # Blob data is used to find the oids for LfsObjects and to copy to Git. # Blobs are reasonably small in memory, as their data are LFS Pointer files. diff --git a/app/services/groups/destroy_service.rb b/app/services/groups/destroy_service.rb index d961effb669..fbf1ac051a1 100644 --- a/app/services/groups/destroy_service.rb +++ b/app/services/groups/destroy_service.rb @@ -94,7 +94,6 @@ module Groups group.users_ids_of_direct_members end - # rubocop:disable CodeReuse/ActiveRecord def destroy_associated_users current_user_id = current_user.id bot_ids = users_to_destroy @@ -105,7 +104,6 @@ module Groups end end end - # rubocop:enable CodeReuse/ActiveRecord # rubocop:disable CodeReuse/ActiveRecord def users_to_destroy diff --git a/app/services/groups/import_export/import_service.rb b/app/services/groups/import_export/import_service.rb index 8bf5a6ed5cd..1969c29121f 100644 --- a/app/services/groups/import_export/import_service.rb +++ b/app/services/groups/import_export/import_service.rb @@ -53,12 +53,12 @@ module Groups private def user_role - # rubocop:disable CodeReuse/ActiveRecord, Style/MultilineTernaryOperator + # rubocop:disable Style/MultilineTernaryOperator access_level = group.parent ? current_user&.group_members&.find_by(source_id: group.parent&.id)&.access_level : Gitlab::Access::OWNER Gitlab::Access.human_access(access_level) - # rubocop:enable CodeReuse/ActiveRecord, Style/MultilineTernaryOperator + # rubocop:enable Style/MultilineTernaryOperator end def import_file diff --git a/app/services/import/placeholder_references/push_service.rb b/app/services/import/placeholder_references/push_service.rb index 419d8d242ed..a5fbcfd3567 100644 --- a/app/services/import/placeholder_references/push_service.rb +++ b/app/services/import/placeholder_references/push_service.rb @@ -26,7 +26,9 @@ module Import end end - def initialize(import_source:, import_uid:, source_user_id:, source_user_namespace_id:, model:, user_reference_column:, numeric_key: nil, composite_key: nil) # rubocop:disable Layout/LineLength -- Its easier to read being on one line + def initialize( + import_source:, import_uid:, source_user_id:, source_user_namespace_id:, model:, + user_reference_column:, numeric_key: nil, composite_key: nil) super(import_source: import_source, import_uid: import_uid) @reference = Import::SourceUserPlaceholderReference.new( diff --git a/app/services/issuable_base_service.rb b/app/services/issuable_base_service.rb index 6a1adfa50c7..20c34d96a8a 100644 --- a/app/services/issuable_base_service.rb +++ b/app/services/issuable_base_service.rb @@ -272,7 +272,6 @@ class IssuableBaseService < ::BaseContainerService GraphqlTriggers.issuable_description_updated(issuable) end - # rubocop:disable Metrics/AbcSize -- Method is only slightly over the limit due to decomposition method def update(issuable) ::Gitlab::Database::LoadBalancing::SessionMap.current(issuable.load_balancer).use_primary! @@ -352,7 +351,6 @@ class IssuableBaseService < ::BaseContainerService issuable end - # rubocop:enable Metrics/AbcSize # Overriden in child class def trigger_update_subscriptions(issuable, old_associations); end diff --git a/app/services/issues/export_csv_service.rb b/app/services/issues/export_csv_service.rb index 4e1a713c496..538208ce29b 100644 --- a/app/services/issues/export_csv_service.rb +++ b/app/services/issues/export_csv_service.rb @@ -50,11 +50,9 @@ module Issues @labels[issue.id] end - # rubocop: disable CodeReuse/ActiveRecord def issue_time_spent(issue) issue.timelogs.sum(&:time_spent) end - # rubocop: enable CodeReuse/ActiveRecord def preload_associations_in_batches? Feature.enabled?(:export_csv_preload_in_batches, resource_parent) diff --git a/app/services/issues/referenced_merge_requests_service.rb b/app/services/issues/referenced_merge_requests_service.rb index d8767f9a0b4..f3544550c38 100644 --- a/app/services/issues/referenced_merge_requests_service.rb +++ b/app/services/issues/referenced_merge_requests_service.rb @@ -2,7 +2,6 @@ module Issues class ReferencedMergeRequestsService < Issues::BaseService - # rubocop: disable CodeReuse/ActiveRecord def execute(issue) referenced = referenced_merge_requests(issue) closed_by = closed_by_merge_requests(issue) @@ -14,7 +13,6 @@ module Issues [sort_by_iid(referenced), sort_by_iid(closed_by)] end - # rubocop: enable CodeReuse/ActiveRecord def referenced_merge_requests(issue) merge_requests = extract_merge_requests(issue) diff --git a/app/services/labels/transfer_service.rb b/app/services/labels/transfer_service.rb index 993e565645a..e9895641022 100644 --- a/app/services/labels/transfer_service.rb +++ b/app/services/labels/transfer_service.rb @@ -18,7 +18,6 @@ module Labels # rubocop: disable CodeReuse/ActiveRecord link_ids = group_labels_applied_to_issues.pluck("label_links.id") + group_labels_applied_to_merge_requests.pluck("label_links.id") - # rubocop: disable CodeReuse/ActiveRecord Label.transaction do labels_to_transfer.find_each do |label| @@ -36,7 +35,6 @@ module Labels attr_reader :current_user, :old_group, :project - # rubocop: disable CodeReuse/ActiveRecord def labels_to_transfer Label .from_union([ diff --git a/app/services/members/projects/creator_service.rb b/app/services/members/projects/creator_service.rb index f45132749f9..fa3e0f968eb 100644 --- a/app/services/members/projects/creator_service.rb +++ b/app/services/members/projects/creator_service.rb @@ -23,10 +23,8 @@ module Members end def can_update_existing_member? - # rubocop:disable Layout/EmptyLineAfterGuardClause raise ::Gitlab::Access::AccessDeniedError if assigning_project_member_with_owner_access_level? && cannot_assign_owner_responsibilities_to_member_in_project? - # rubocop:enable Layout/EmptyLineAfterGuardClause current_user.can?(:update_project_member, member) end diff --git a/app/services/members/standard_member_builder.rb b/app/services/members/standard_member_builder.rb index 24e71f80d7e..7a1698d0134 100644 --- a/app/services/members/standard_member_builder.rb +++ b/app/services/members/standard_member_builder.rb @@ -17,7 +17,7 @@ module Members attr_reader :source, :invitee, :existing_members def find_or_initialize_member_by_user(user_id) - existing_members[user_id] || source.members_and_requesters.build(user_id: user_id) # rubocop:disable CodeReuse/ActiveRecord + existing_members[user_id] || source.members_and_requesters.build(user_id: user_id) end end end diff --git a/app/services/packages/rpm/repository_metadata/build_xml_base_service.rb b/app/services/packages/rpm/repository_metadata/build_xml_base_service.rb index 4dfb4087f1b..746dd49afff 100644 --- a/app/services/packages/rpm/repository_metadata/build_xml_base_service.rb +++ b/app/services/packages/rpm/repository_metadata/build_xml_base_service.rb @@ -8,7 +8,7 @@ module Packages end def execute - builder = Nokogiri::XML::Builder.new { |xml| yield xml } # rubocop:disable Style/ExplicitBlockArgument + builder = Nokogiri::XML::Builder.new { |xml| yield xml } Nokogiri::XML(builder.to_xml).at('package') end diff --git a/app/services/projects/auto_devops/disable_service.rb b/app/services/projects/auto_devops/disable_service.rb index e10668ac9bd..5fdba06b49f 100644 --- a/app/services/projects/auto_devops/disable_service.rb +++ b/app/services/projects/auto_devops/disable_service.rb @@ -21,12 +21,10 @@ module Projects # is an expensive operation. See # https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/21172#note_99037378 # for more context. - # rubocop: disable CodeReuse/ActiveRecord def first_pipeline_failure? auto_devops_pipelines.success.limit(1).count == 0 && auto_devops_pipelines.failed.limit(1).count.nonzero? end - # rubocop: enable CodeReuse/ActiveRecord def disable_auto_devops project.auto_devops_attributes = { enabled: false } diff --git a/app/services/projects/open_issues_count_service.rb b/app/services/projects/open_issues_count_service.rb index d31f4596fa5..55ffbbbb8c9 100644 --- a/app/services/projects/open_issues_count_service.rb +++ b/app/services/projects/open_issues_count_service.rb @@ -61,7 +61,6 @@ module Projects # This will still show a discrepancy on issues number but should be less than before. # Check https://gitlab.com/gitlab-org/gitlab-foss/issues/38418 description. - # rubocop: disable CodeReuse/ActiveRecord def self.query(projects, public_only: true) open_issues = Issue.opened diff --git a/app/services/releases/create_service.rb b/app/services/releases/create_service.rb index 7063fa8447b..815a640983b 100644 --- a/app/services/releases/create_service.rb +++ b/app/services/releases/create_service.rb @@ -6,8 +6,18 @@ module Releases return error(_('Access Denied'), 403) unless allowed? return error(_('You are not allowed to create this tag as it is protected.'), 403) unless can_create_tag? return error(_('Release already exists'), 409) if release - return error(format(_("Milestone(s) not found: %{milestones}"), milestones: inexistent_milestone_titles.join(', ')), 400) if inexistent_milestone_titles.any? # rubocop:disable Layout/LineLength - return error(format(_("Milestone id(s) not found: %{milestones}"), milestones: inexistent_milestone_ids.join(', ')), 400) if inexistent_milestone_ids.any? # rubocop:disable Layout/LineLength + + if inexistent_milestone_titles.any? + return error( + format(_("Milestone(s) not found: %{milestones}"), + milestones: inexistent_milestone_titles.join(', ')), 400) + end + + if inexistent_milestone_ids.any? + return error( + format(_("Milestone id(s) not found: %{milestones}"), + milestones: inexistent_milestone_ids.join(', ')), 400) + end # should be found before the creation of new tag # because tag creation can spawn new pipeline diff --git a/app/services/releases/update_service.rb b/app/services/releases/update_service.rb index 13ece1c10c8..ed1706a26de 100644 --- a/app/services/releases/update_service.rb +++ b/app/services/releases/update_service.rb @@ -37,8 +37,18 @@ module Releases return error(_('Release does not exist'), 404) unless release return error(_('Access Denied'), 403) unless allowed? return error(_('params is empty'), 400) if empty_params? - return error(format(_("Milestone(s) not found: %{milestones}"), milestones: inexistent_milestone_titles.join(', ')), 400) if inexistent_milestone_titles.any? # rubocop:disable Layout/LineLength - return error(format(_("Milestone id(s) not found: %{milestones}"), milestones: inexistent_milestone_ids.join(', ')), 400) if inexistent_milestone_ids.any? # rubocop:disable Layout/LineLength + + if inexistent_milestone_titles.any? + return error( + format(_("Milestone(s) not found: %{milestones}"), + milestones: inexistent_milestone_titles.join(', ')), 400) + end + + return unless inexistent_milestone_ids.any? + + return error( + format(_("Milestone id(s) not found: %{milestones}"), + milestones: inexistent_milestone_ids.join(', ')), 400) end def allowed? diff --git a/app/services/users/activate_service.rb b/app/services/users/activate_service.rb index 9453760ea10..05603d270c9 100644 --- a/app/services/users/activate_service.rb +++ b/app/services/users/activate_service.rb @@ -55,4 +55,4 @@ module Users end end -Users::ActivateService.prepend_mod_with('Users::ActivateService') # rubocop: disable Cop/InjectEnterpriseEditionModule +Users::ActivateService.prepend_mod_with('Users::ActivateService') diff --git a/app/services/web_hook_service.rb b/app/services/web_hook_service.rb index 9659a871c7f..73c27d32a0e 100644 --- a/app/services/web_hook_service.rb +++ b/app/services/web_hook_service.rb @@ -234,13 +234,11 @@ class WebHookService # Make response headers more stylish # Net::HTTPHeader has downcased hash with arrays: { 'content-type' => ['text/html; charset=utf-8'] } # This method format response to capitalized hash with strings: { 'Content-Type' => 'text/html; charset=utf-8' } - # rubocop:disable Style/HashTransformValues def safe_response_headers(response) response.headers.each_capitalized.first(RESPONSE_HEADERS_COUNT_LIMIT).to_h do |header_key, header_value| [enforce_utf8(header_key), string_size_limit(enforce_utf8(header_value), RESPONSE_HEADERS_SIZE_LIMIT)] end end - # rubocop:enable Style/HashTransformValues def safe_response_body(response) return '' unless response.body diff --git a/app/uploaders/object_storage/cdn/google_ip_cache.rb b/app/uploaders/object_storage/cdn/google_ip_cache.rb index 35ec7ce0c6e..eda799b0d03 100644 --- a/app/uploaders/object_storage/cdn/google_ip_cache.rb +++ b/app/uploaders/object_storage/cdn/google_ip_cache.rb @@ -1,4 +1,3 @@ -# rubocop:disable Naming/FileName # frozen_string_literal: true module ObjectStorage @@ -56,5 +55,3 @@ module ObjectStorage end end end - -# rubocop:enable Naming/FileName diff --git a/app/views/groups/settings/_email_settings.html.haml b/app/views/groups/settings/_email_settings.html.haml index bed7709bba7..aa4e7f4e3d0 100644 --- a/app/views/groups/settings/_email_settings.html.haml +++ b/app/views/groups/settings/_email_settings.html.haml @@ -11,3 +11,12 @@ checkbox_options: { checked: @group.show_diff_preview_in_email? & @group.emails_enabled?, disabled: !@group.emails_enabled? || !can_set_group_diff_preview_in_email?(@group) }, help_text: s_('GroupSettings|Emails are not encrypted. Concerned administrators may want to disable diff previews.') + +- if Feature.enabled?(:pat_expiry_inherited_members_notification, @group.root_ancestor) + - controlled_by_parent_group = !@group.can_modify_token_expiry_notify_inherited? + .form-group + = f.label :token_expiry_notify_inherited, _('Expiry notification emails about group and project access tokens within this group should be sent to:') + = f.gitlab_ui_radio_component :token_expiry_notify_inherited, true, _('All direct and inherited members of the group or project'), radio_options: { disabled: controlled_by_parent_group } + = f.gitlab_ui_radio_component :token_expiry_notify_inherited, false, _('Only direct members of the group or project'), radio_options: { disabled: controlled_by_parent_group } + - if controlled_by_parent_group + .form-text= _('A parent group has selected "Only direct members." It cannot be overridden by this group.') diff --git a/app/workers/concerns/application_worker.rb b/app/workers/concerns/application_worker.rb index 7fddd0fe77a..3fce1b18d6d 100644 --- a/app/workers/concerns/application_worker.rb +++ b/app/workers/concerns/application_worker.rb @@ -2,7 +2,7 @@ require 'sidekiq/api' -Sidekiq::Worker.extend ActiveSupport::Concern # rubocop:disable Cop/SidekiqApiUsage +Sidekiq::Worker.extend ActiveSupport::Concern module ApplicationWorker extend ActiveSupport::Concern @@ -125,7 +125,7 @@ module ApplicationWorker sidekiq_options queue: queue_name # rubocop:disable Cop/SidekiqOptionsQueue store_name = ::Gitlab::SidekiqConfig::WorkerRouter.global.store(self) - sidekiq_options store: store_name # rubocop:disable Cop/SidekiqOptionsQueue + sidekiq_options store: store_name end def queue_namespace(new_namespace = nil) diff --git a/app/workers/create_note_diff_file_worker.rb b/app/workers/create_note_diff_file_worker.rb index c5b5e1cef41..a9b654a30ff 100644 --- a/app/workers/create_note_diff_file_worker.rb +++ b/app/workers/create_note_diff_file_worker.rb @@ -12,7 +12,7 @@ class CreateNoteDiffFileWorker # rubocop:disable Scalability/IdempotentWorker def perform(diff_note_id) return unless diff_note_id.present? - diff_note = DiffNote.find_by_id(diff_note_id) # rubocop: disable CodeReuse/ActiveRecord + diff_note = DiffNote.find_by_id(diff_note_id) diff_note&.create_diff_file end diff --git a/app/workers/database/batched_background_migration/execution_worker.rb b/app/workers/database/batched_background_migration/execution_worker.rb index 75798f0ab73..b4849c58a41 100644 --- a/app/workers/database/batched_background_migration/execution_worker.rb +++ b/app/workers/database/batched_background_migration/execution_worker.rb @@ -30,7 +30,7 @@ module Database worker = new worker.remove_failed_jobs - bulk_perform_async(args) # rubocop:disable Scalability/BulkPerformWithContext + bulk_perform_async(args) end end diff --git a/app/workers/import_issues_csv_worker.rb b/app/workers/import_issues_csv_worker.rb index fe5b1c13d56..ac3c736a88f 100644 --- a/app/workers/import_issues_csv_worker.rb +++ b/app/workers/import_issues_csv_worker.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class ImportIssuesCsvWorker # rubocop:disable Scalability/IdempotentWorker +class ImportIssuesCsvWorker include ApplicationWorker data_consistency :always diff --git a/app/workers/incident_management/process_alert_worker_v2.rb b/app/workers/incident_management/process_alert_worker_v2.rb index 12434671527..f29fae31c50 100644 --- a/app/workers/incident_management/process_alert_worker_v2.rb +++ b/app/workers/incident_management/process_alert_worker_v2.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module IncidentManagement - class ProcessAlertWorkerV2 # rubocop:disable Scalability/IdempotentWorker + class ProcessAlertWorkerV2 include ApplicationWorker data_consistency :always diff --git a/app/workers/members/expiring_email_notification_worker.rb b/app/workers/members/expiring_email_notification_worker.rb index 7edb68c525c..198e4727576 100644 --- a/app/workers/members/expiring_email_notification_worker.rb +++ b/app/workers/members/expiring_email_notification_worker.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Members - class ExpiringEmailNotificationWorker # rubocop:disable Scalability/CronWorkerContext + class ExpiringEmailNotificationWorker include ApplicationWorker data_consistency :always diff --git a/app/workers/merge_worker.rb b/app/workers/merge_worker.rb index 8fc9b14aab3..6eecb908f0f 100644 --- a/app/workers/merge_worker.rb +++ b/app/workers/merge_worker.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class MergeWorker # rubocop:disable Scalability/IdempotentWorker +class MergeWorker include ApplicationWorker data_consistency :always diff --git a/app/workers/new_merge_request_worker.rb b/app/workers/new_merge_request_worker.rb index a11f26088b3..e15292bd866 100644 --- a/app/workers/new_merge_request_worker.rb +++ b/app/workers/new_merge_request_worker.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class NewMergeRequestWorker # rubocop:disable Scalability/IdempotentWorker +class NewMergeRequestWorker include ApplicationWorker include NewIssuable diff --git a/app/workers/remove_unaccepted_member_invites_worker.rb b/app/workers/remove_unaccepted_member_invites_worker.rb index 96f60b5fa12..8697006d99e 100644 --- a/app/workers/remove_unaccepted_member_invites_worker.rb +++ b/app/workers/remove_unaccepted_member_invites_worker.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class RemoveUnacceptedMemberInvitesWorker # rubocop:disable Scalability/IdempotentWorker +class RemoveUnacceptedMemberInvitesWorker include ApplicationWorker data_consistency :always diff --git a/config/initializers/fog_google_list_objects_match_glob_support.rb b/config/initializers/fog_google_list_objects_match_glob_support.rb index 37eacf33743..d7d2c39857a 100644 --- a/config/initializers/fog_google_list_objects_match_glob_support.rb +++ b/config/initializers/fog_google_list_objects_match_glob_support.rb @@ -28,12 +28,10 @@ module Fog ) # rubocop: enable Style/PercentLiteralDelimiters - # rubocop: disable Gitlab/ModuleWithInstanceVariables -- this is an exact copy of the original method @storage_json.list_objects( bucket, **options.select { |k, _| allowed_opts.include? k } ) - # rubocop: enable Gitlab/ModuleWithInstanceVariables end end end diff --git a/config/initializers/grape_validators.rb b/config/initializers/grape_validators.rb index 6fb689d454a..335c3599c6e 100644 --- a/config/initializers/grape_validators.rb +++ b/config/initializers/grape_validators.rb @@ -11,7 +11,9 @@ Grape::Validations.register_validator(:untrusted_regexp, ::API::Validations::Val Grape::Validations.register_validator(:email_or_email_list, ::API::Validations::Validators::EmailOrEmailList) Grape::Validations.register_validator(:iteration_id, ::API::Validations::Validators::IntegerOrCustomValue) Grape::Validations.register_validator(:project_portable, ::API::Validations::Validators::ProjectPortable) -Grape::Validations.register_validator(:destination_namespace_path, ::API::Validations::Validators::BulkImports::DestinationNamespacePath) # rubocop: disable Layout/LineLength -Grape::Validations.register_validator(:destination_slug_path, ::API::Validations::Validators::BulkImports::DestinationSlugPath) # rubocop: disable Layout/LineLength +Grape::Validations.register_validator(:destination_namespace_path, + ::API::Validations::Validators::BulkImports::DestinationNamespacePath) +Grape::Validations.register_validator(:destination_slug_path, + ::API::Validations::Validators::BulkImports::DestinationSlugPath) Grape::Validations.register_validator(:source_full_path, ::API::Validations::Validators::BulkImports::SourceFullPath) Grape::Validations.register_validator(:limit, ::API::Validations::Validators::Limit) diff --git a/config/initializers/sprockets_patch.rb b/config/initializers/sprockets_patch.rb index 76474b370be..b14b2edeef3 100644 --- a/config/initializers/sprockets_patch.rb +++ b/config/initializers/sprockets_patch.rb @@ -12,9 +12,6 @@ unless Gem::Version.new(Sprockets::VERSION) == Gem::Version.new('3.7.2') raise 'New version of Sprockets detected. This patch can likely be removed.' end -# rubocop:disable Style/CombinableLoops -- Keep the format consistent with upstream project -# rubocop:disable Cop/LineBreakAroundConditionalBlock -- Keep the format consistent with upstream project -# rubocop:disable Style/IfUnlessModifier -- Keep the format consistent with upstream project # rubocop:disable Style/SoleNestedConditional -- Keep the format consistent with upstream project module Sprockets module Utils @@ -57,7 +54,4 @@ module Sprockets end end end -# rubocop:enable Style/CombinableLoops -# rubocop:enable Cop/LineBreakAroundConditionalBlock -# rubocop:enable Style/IfUnlessModifier # rubocop:enable Style/SoleNestedConditional diff --git a/config/initializers/wikicloth_redos_patch.rb b/config/initializers/wikicloth_redos_patch.rb index 98afe000e5b..f54d9659a7d 100644 --- a/config/initializers/wikicloth_redos_patch.rb +++ b/config/initializers/wikicloth_redos_patch.rb @@ -68,14 +68,11 @@ end # rubocop:disable Layout/BlockEndNewline # rubocop:disable Style/PerlBackrefs # rubocop:disable Style/RegexpLiteralMixedPreserve -# rubocop:disable Style/RedundantRegexpCharacterClass # rubocop:disable Performance/StringInclude # rubocop:disable Layout/LineLength # rubocop:disable Style/RedundantSelf # rubocop:disable Style/SymbolProc # rubocop:disable Layout/SpaceInsideParens -# rubocop:disable Style/GuardClause -# rubocop:disable Style/RedundantRegexpEscape module WikiCloth class WikiCloth def render(opt={}) @@ -249,11 +246,8 @@ end # rubocop:enable Layout/BlockEndNewline # rubocop:enable Style/PerlBackrefs # rubocop:enable Style/RegexpLiteralMixedPreserve -# rubocop:enable Style/RedundantRegexpCharacterClass # rubocop:enable Performance/StringInclude # rubocop:enable Layout/LineLength # rubocop:enable Style/RedundantSelf # rubocop:enable Style/SymbolProc # rubocop:enable Layout/SpaceInsideParens -# rubocop:enable Style/GuardClause -# rubocop:enable Style/RedundantRegexpEscape diff --git a/config/initializers/wikicloth_ruby_3_patch.rb b/config/initializers/wikicloth_ruby_3_patch.rb index 04e5b50b7c9..1dd60ebbbe3 100644 --- a/config/initializers/wikicloth_ruby_3_patch.rb +++ b/config/initializers/wikicloth_ruby_3_patch.rb @@ -56,18 +56,14 @@ end # rubocop:disable Layout/EmptyLineAfterGuardClause # rubocop:disable Performance/ReverseEach # rubocop:disable Style/PerlBackrefs -# rubocop:disable Style/RedundantRegexpCharacterClass # rubocop:disable Performance/StringInclude # rubocop:disable Style/IfUnlessModifier # rubocop:disable Layout/LineLength -# rubocop:disable Lint/DeprecatedClassMethods # rubocop:disable Lint/UselessAssignment # rubocop:disable Lint/RedundantStringCoercion # rubocop:disable Style/StringLiteralsInInterpolation -# rubocop:disable Lint/UriEscapeUnescape # rubocop:disable Style/For # rubocop:disable Style/SlicingWithRange -# rubocop:disable Style/GuardClause # rubocop:disable Cop/LineBreakAfterGuardClauses # rubocop:disable Layout/MultilineHashBraceLayout module WikiCloth @@ -254,17 +250,13 @@ end # rubocop:enable Layout/EmptyLineAfterGuardClause # rubocop:enable Performance/ReverseEach # rubocop:enable Style/PerlBackrefs -# rubocop:enable Style/RedundantRegexpCharacterClass # rubocop:enable Performance/StringInclude # rubocop:enable Style/IfUnlessModifier # rubocop:enable Layout/LineLength -# rubocop:enable Lint/DeprecatedClassMethods # rubocop:enable Lint/UselessAssignment # rubocop:enable Lint/RedundantStringCoercion # rubocop:enable Style/StringLiteralsInInterpolation -# rubocop:enable Lint/UriEscapeUnescape # rubocop:enable Style/For # rubocop:enable Style/SlicingWithRange -# rubocop:enable Style/GuardClause # rubocop:enable Cop/LineBreakAfterGuardClauses # rubocop:enable Layout/MultilineHashBraceLayout diff --git a/config/routes/api.rb b/config/routes/api.rb index 61a0455ecc0..3d863b692cb 100644 --- a/config/routes/api.rb +++ b/config/routes/api.rb @@ -3,5 +3,5 @@ match '/api/graphql', via: [:get, :post], to: 'graphql#execute' get '/-/graphql-explorer', to: API::Graphql::GraphqlExplorerController.action(:show) -::API::API.logger Rails.logger # rubocop:disable Gitlab/RailsLogger +::API::API.logger Rails.logger mount ::API::API => '/' diff --git a/db/migrate/20241004213405_add_token_expiry_notify_inherited_members_group_setting.rb b/db/migrate/20241004213405_add_token_expiry_notify_inherited_members_group_setting.rb new file mode 100644 index 00000000000..dfef9c36edf --- /dev/null +++ b/db/migrate/20241004213405_add_token_expiry_notify_inherited_members_group_setting.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddTokenExpiryNotifyInheritedMembersGroupSetting < Gitlab::Database::Migration[2.2] + milestone '17.6' + + def change + add_column :namespace_settings, :token_expiry_notify_inherited, :boolean, default: true, null: false + end +end diff --git a/db/schema_migrations/20241004213405 b/db/schema_migrations/20241004213405 new file mode 100644 index 00000000000..ddad2f8a7cc --- /dev/null +++ b/db/schema_migrations/20241004213405 @@ -0,0 +1 @@ +fdc6b0a8a43515c7a0dd89e650e5ebcd95d78f1911dee2294a0ad891c0e9b6ce \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index adc7885360b..c7ab07472a3 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -14810,6 +14810,7 @@ CREATE TABLE namespace_settings ( spp_repository_pipeline_access boolean, lock_spp_repository_pipeline_access boolean DEFAULT false NOT NULL, archived boolean DEFAULT false NOT NULL, + token_expiry_notify_inherited boolean DEFAULT true NOT NULL, CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255)), CONSTRAINT namespace_settings_unique_project_download_limit_alertlist_size CHECK ((cardinality(unique_project_download_limit_alertlist) <= 100)), CONSTRAINT namespace_settings_unique_project_download_limit_allowlist_size CHECK ((cardinality(unique_project_download_limit_allowlist) <= 100)) diff --git a/doc/user/permissions.md b/doc/user/permissions.md index 9dfa78f76da..27fd2353e73 100644 --- a/doc/user/permissions.md +++ b/doc/user/permissions.md @@ -183,18 +183,9 @@ Project permissions for [compliance](compliance/index.md) features including com ### Machine learning model registry and experiment -Project permissions for [model registry](project/ml/model_registry/index.md) and [model experiments](project/ml/experiment_tracking/index.md). +Access to the model registry is based on a combination of the user's access level for the project, the model registry, and to experiments. -| Action | Guest | Reporter | Developer | Maintainer | Owner | Notes | -| ----------------------------------------------------------------- | :---: | :------: | :-------: | :--------: | :---: | ----- | -| View [models and versions](project/ml/model_registry/index.md) | | ✓ | ✓ | ✓ | ✓ | | -| View [model experiments](project/ml/experiment_tracking/index.md) | | ✓ | ✓ | ✓ | ✓ | | -| Create models, versions, and artifacts | | | ✓ | ✓ | ✓ | | -| Edit models, versions, and artifacts | | | ✓ | ✓ | ✓ | | -| Delete models, versions, and artifacts | | | ✓ | ✓ | ✓ | | -| Create experiments and candidates | | | ✓ | ✓ | ✓ | | -| Edit experiments and candidates | | | ✓ | ✓ | ✓ | | -| Delete experiments and candidates | | | ✓ | ✓ | ✓ | | +More updates to this documentation are planned for GitLab 17.6. ### Monitoring diff --git a/lib/api/api.rb b/lib/api/api.rb index d1fa85479e2..7a1b3a45ae9 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -406,7 +406,7 @@ module API mount ::API::Internal::Workhorse mount ::API::Internal::Shellhorse - route :any, '*path', feature_category: :not_owned do # rubocop:todo Gitlab/AvoidFeatureCategoryNotOwned + route :any, '*path', feature_category: :not_owned do error!('404 Not Found', 404) end end diff --git a/lib/api/entities/issuable_time_stats.rb b/lib/api/entities/issuable_time_stats.rb index 717d2282441..b1024fb5e4e 100644 --- a/lib/api/entities/issuable_time_stats.rb +++ b/lib/api/entities/issuable_time_stats.rb @@ -15,12 +15,10 @@ module API expose :total_time_spent, as: :human_total_time_spent, documentation: { type: 'string', example: '1h' } end - # rubocop: disable CodeReuse/ActiveRecord def total_time_spent # Avoids an N+1 query since timelogs are preloaded object.timelogs.sum(&:time_spent) end - # rubocop: enable CodeReuse/ActiveRecord end end end diff --git a/lib/api/entities/tag.rb b/lib/api/entities/tag.rb index b4c6214e86d..8c5af364d99 100644 --- a/lib/api/entities/tag.rb +++ b/lib/api/entities/tag.rb @@ -13,12 +13,9 @@ module API options[:project].repository.commit(repo_tag.dereferenced_target) end - # rubocop: disable CodeReuse/ActiveRecord expose :release, using: Entities::TagRelease, if: ->(*) { can_read_release? } do |repo_tag, options| options[:releases]&.find { |r| r.tag == repo_tag.name } end - # rubocop: enable CodeReuse/ActiveRecord - expose :protected, documentation: { type: 'boolean', example: true } do |repo_tag, options| ::ProtectedTag.protected?(options[:project], repo_tag.name) end diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index a484d84e2f1..033d86e5dab 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -234,12 +234,10 @@ module API check_group_access(group) end - # rubocop: disable CodeReuse/ActiveRecord def find_group_by_full_path!(full_path) group = Group.find_by_full_path(full_path) check_group_access(group) end - # rubocop: enable CodeReuse/ActiveRecord def check_group_access(group) return group if can?(current_user, :read_group, group) diff --git a/lib/api/issue_links.rb b/lib/api/issue_links.rb index 0f5551e112b..5361ac5d06d 100644 --- a/lib/api/issue_links.rb +++ b/lib/api/issue_links.rb @@ -59,7 +59,6 @@ module API desc: 'The type of the relation (“relates_to”, “blocks”, “is_blocked_by”),'\ 'defaults to “relates_to”)' end - # rubocop: disable CodeReuse/ActiveRecord post ':id/issues/:issue_iid/links' do source_issue = find_project_issue(params[:issue_iid]) target_issue = find_project_issue(declared_params[:target_issue_iid], @@ -77,8 +76,6 @@ module API render_api_error!(result[:message], result[:http_status]) end end - # rubocop: enable CodeReuse/ActiveRecord - desc 'Get an issue link' do detail 'Gets details about an issue link. This feature was introduced in GitLab 15.1.' success Entities::IssueLink diff --git a/lib/backup/options.rb b/lib/backup/options.rb index 4848d23405f..2db6e8ae424 100644 --- a/lib/backup/options.rb +++ b/lib/backup/options.rb @@ -186,7 +186,7 @@ module Backup end # rubocop:enable Metrics/ParameterLists - # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize -- TODO: Complexity will be solved in the Unified Backup implementation (https://gitlab.com/groups/gitlab-org/-/epics/11635) + # rubocop:disable Metrics/AbcSize -- TODO: Complexity will be solved in the Unified Backup implementation (https://gitlab.com/groups/gitlab-org/-/epics/11635) # Extract supported options from defined ENV variables def extract_from_env! # We've used lowercase `force` as the key while ENV normally is defined using UPPERCASE letters @@ -212,7 +212,7 @@ module Backup extract_skippables!(ENV['SKIP']) if ENV['SKIP'].present? end - # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize + # rubocop:enable Metrics/AbcSize def update_from_backup_information!(backup_information) self.repositories_storages += backup_information[:repositories_storages]&.split(',') || [] diff --git a/lib/bulk_imports/pipeline/runner.rb b/lib/bulk_imports/pipeline/runner.rb index 8d937dcf453..f9b2f9784c1 100644 --- a/lib/bulk_imports/pipeline/runner.rb +++ b/lib/bulk_imports/pipeline/runner.rb @@ -64,7 +64,7 @@ module BulkImports def on_finish; end - private # rubocop:disable Lint/UselessAccessModifier + private def run_pipeline_step(step, class_name = nil, entry = nil) raise MarkedAsFailedError if context.entity.failed? diff --git a/lib/container_registry/tag.rb b/lib/container_registry/tag.rb index d4a4ef205b1..5c66c92b887 100644 --- a/lib/container_registry/tag.rb +++ b/lib/container_registry/tag.rb @@ -135,7 +135,6 @@ module ContainerRegistry repository.client.put_tag(repository.path, name, digests) end - # rubocop: disable CodeReuse/ActiveRecord def total_size return @total_size if @total_size @@ -143,7 +142,6 @@ module ContainerRegistry layers.sum(&:size) if v2? end - # rubocop: enable CodeReuse/ActiveRecord # Deletes the image associated with this tag # Note this will delete the image and all tags associated with it. diff --git a/lib/event_filter.rb b/lib/event_filter.rb index deff8b5fc05..4d9f4d0f763 100644 --- a/lib/event_filter.rb +++ b/lib/event_filter.rb @@ -48,7 +48,6 @@ class EventFilter end end - # rubocop: disable Metrics/CyclomaticComplexity # This method build specialized in-operator optimized queries based on different # filter parameters. All queries will benefit from the index covering the following columns: # * author_id target_type action id @@ -119,7 +118,6 @@ class EventFilter in_operator_params(array_data: array_data) end end - # rubocop: enable Metrics/CyclomaticComplexity private diff --git a/lib/feature.rb b/lib/feature.rb index e2b2039a04f..ce36a970f6b 100644 --- a/lib/feature.rb +++ b/lib/feature.rb @@ -68,7 +68,7 @@ module Feature end InvalidFeatureFlagError = Class.new(Exception) # rubocop:disable Lint/InheritException - InvalidOperation = Class.new(ArgumentError) # rubocop:disable Lint/InheritException + InvalidOperation = Class.new(ArgumentError) class << self delegate :group, to: :flipper diff --git a/lib/gitlab/analytics/cycle_analytics/aggregated/base_query_builder.rb b/lib/gitlab/analytics/cycle_analytics/aggregated/base_query_builder.rb index 085f722a66c..476b18df8a1 100644 --- a/lib/gitlab/analytics/cycle_analytics/aggregated/base_query_builder.rb +++ b/lib/gitlab/analytics/cycle_analytics/aggregated/base_query_builder.rb @@ -4,7 +4,6 @@ module Gitlab module Analytics module CycleAnalytics module Aggregated - # rubocop: disable CodeReuse/ActiveRecord class BaseQueryBuilder include StageQueryHelpers @@ -122,7 +121,6 @@ module Gitlab User.by_username(username).first end end - # rubocop: enable CodeReuse/ActiveRecord end end end diff --git a/lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher.rb b/lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher.rb index 552d06eb214..089e525b83d 100644 --- a/lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher.rb +++ b/lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher.rb @@ -110,7 +110,6 @@ module Gitlab MAPPINGS.fetch(subject_class).fetch(:serializer_class).new end - # rubocop: disable CodeReuse/ActiveRecord def preload_associations(records) ActiveRecord::Associations::Preloader.new( records: records, @@ -119,7 +118,6 @@ module Gitlab records end - # rubocop: enable CodeReuse/ActiveRecord end end end diff --git a/lib/gitlab/analytics/cycle_analytics/base_query_builder.rb b/lib/gitlab/analytics/cycle_analytics/base_query_builder.rb index bcfe0b92b28..93657e9174a 100644 --- a/lib/gitlab/analytics/cycle_analytics/base_query_builder.rb +++ b/lib/gitlab/analytics/cycle_analytics/base_query_builder.rb @@ -22,13 +22,11 @@ module Gitlab @params[:state] = :opened if in_progress? end - # rubocop: disable CodeReuse/ActiveRecord def build query = finder.execute query = stage.start_event.apply_query_customization(query) apply_end_event_query_customization(query) end - # rubocop: enable CodeReuse/ActiveRecord private diff --git a/lib/gitlab/analytics/cycle_analytics/records_fetcher.rb b/lib/gitlab/analytics/cycle_analytics/records_fetcher.rb index cb4b908bc5e..3f05e513df7 100644 --- a/lib/gitlab/analytics/cycle_analytics/records_fetcher.rb +++ b/lib/gitlab/analytics/cycle_analytics/records_fetcher.rb @@ -23,7 +23,6 @@ module Gitlab @per_page = MAX_RECORDS end - # rubocop: disable CodeReuse/ActiveRecord def serialized_records strong_memoize(:serialized_records) do records = ordered_and_limited_query.select(*columns, *time_columns) @@ -51,7 +50,6 @@ module Gitlab preload_associations(records) end - # rubocop: enable CodeReuse/ActiveRecord private @@ -73,7 +71,6 @@ module Gitlab end end - # rubocop: disable CodeReuse/ActiveRecord def preload_associations(records) # using preloader instead of includes to avoid AR generating a large column list ActiveRecord::Associations::Preloader.new( @@ -84,7 +81,6 @@ module Gitlab records end - # rubocop: enable CodeReuse/ActiveRecord def time_columns [ stage.start_event.timestamp_projection.as('start_event_timestamp'), diff --git a/lib/gitlab/application_context.rb b/lib/gitlab/application_context.rb index 0bafa7414ce..57d124a2822 100644 --- a/lib/gitlab/application_context.rb +++ b/lib/gitlab/application_context.rb @@ -119,8 +119,6 @@ module Gitlab set_attr_readers end - # rubocop: disable Metrics/CyclomaticComplexity - # rubocop: disable Metrics/PerceivedComplexity # rubocop: disable Metrics/AbcSize def to_lazy_hash {}.tap do |hash| @@ -151,8 +149,6 @@ module Gitlab hash[:bulk_import_entity_id] = -> { bulk_import_entity_id } if set_values.include?(:bulk_import_entity_id) end end - # rubocop: enable Metrics/CyclomaticComplexity - # rubocop: enable Metrics/PerceivedComplexity # rubocop: enable Metrics/AbcSize def use diff --git a/lib/gitlab/cache/request_cache.rb b/lib/gitlab/cache/request_cache.rb index 13b4cace08a..a174892db67 100644 --- a/lib/gitlab/cache/request_cache.rb +++ b/lib/gitlab/cache/request_cache.rb @@ -55,7 +55,7 @@ module Gitlab .join(':') end - private cache_key_method_name # rubocop: disable Style/AccessModifierDeclarations + private cache_key_method_name end end end diff --git a/lib/gitlab/data_builder/pipeline.rb b/lib/gitlab/data_builder/pipeline.rb index 2fa0b40df14..65b68ccaa7e 100644 --- a/lib/gitlab/data_builder/pipeline.rb +++ b/lib/gitlab/data_builder/pipeline.rb @@ -43,7 +43,6 @@ module Gitlab private - # rubocop: disable CodeReuse/ActiveRecord def preload_builds(pipeline, association) ActiveRecord::Associations::Preloader.new( records: [pipeline], @@ -59,7 +58,6 @@ module Gitlab } ).call end - # rubocop: enable CodeReuse/ActiveRecord def hook_attrs(pipeline) { diff --git a/lib/gitlab/diff/file.rb b/lib/gitlab/diff/file.rb index ed43862a19b..26b8b01b269 100644 --- a/lib/gitlab/diff/file.rb +++ b/lib/gitlab/diff/file.rb @@ -350,17 +350,13 @@ module Gitlab old_blob && new_blob && old_blob.binary? != new_blob.binary? end - # rubocop: disable CodeReuse/ActiveRecord def size valid_blobs.sum(&:size) end - # rubocop: enable CodeReuse/ActiveRecord - # rubocop: disable CodeReuse/ActiveRecord def raw_size valid_blobs.sum(&:raw_size) end - # rubocop: enable CodeReuse/ActiveRecord def empty? valid_blobs.map(&:empty?).all? diff --git a/lib/gitlab/diff/file_collection/paginated_diffs.rb b/lib/gitlab/diff/file_collection/paginated_diffs.rb index 63c186affe9..c5661145d5d 100644 --- a/lib/gitlab/diff/file_collection/paginated_diffs.rb +++ b/lib/gitlab/diff/file_collection/paginated_diffs.rb @@ -23,7 +23,7 @@ module Gitlab collection = if offset_index && offset_index > 0 - offset_collection = relation.limit(offset_index) # rubocop:disable CodeReuse/ActiveRecord + offset_collection = relation.limit(offset_index) options[:offset_index] = offset_index offset_collection + collection else diff --git a/lib/gitlab/diff/pair_selector.rb b/lib/gitlab/diff/pair_selector.rb index e848f5107ae..e51c35540f8 100644 --- a/lib/gitlab/diff/pair_selector.rb +++ b/lib/gitlab/diff/pair_selector.rb @@ -6,7 +6,6 @@ module Gitlab include Enumerable # Regex to find a run of deleted lines followed by the same number of added lines - # rubocop: disable Lint/MixedRegexpCaptureTypes LINE_PAIRS_PATTERN = %r{ # Runs start at the beginning of the string (the first line) or after a space (for an unchanged line) (?:\A|\s) @@ -21,8 +20,6 @@ module Gitlab # Runs end at the end of the string (the last line) or before a space (for an unchanged line) (?=\s|\z) }x - # rubocop: enable Lint/MixedRegexpCaptureTypes - def initialize(lines) @lines = lines end diff --git a/lib/gitlab/diff/parser.rb b/lib/gitlab/diff/parser.rb index 1bf51775977..9a34f96d91a 100644 --- a/lib/gitlab/diff/parser.rb +++ b/lib/gitlab/diff/parser.rb @@ -56,7 +56,7 @@ module Gitlab when "-" line_old += 1 context = :old - when "\\" # rubocop:disable Lint/EmptyWhen + when "\\" # No increment else line_new += 1 diff --git a/lib/gitlab/diff/rendered/notebook/diff_file_helper.rb b/lib/gitlab/diff/rendered/notebook/diff_file_helper.rb index b4b7d572901..369acf7ce1e 100644 --- a/lib/gitlab/diff/rendered/notebook/diff_file_helper.rb +++ b/lib/gitlab/diff/rendered/notebook/diff_file_helper.rb @@ -4,7 +4,7 @@ module Gitlab module Rendered module Notebook module DiffFileHelper - require 'set' # rubocop:disable Lint/RedundantRequireStatement -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. + require 'set' # -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. EMBEDDED_IMAGE_PATTERN = ' ![](data:image' diff --git a/lib/gitlab/encrypted_incoming_email_command.rb b/lib/gitlab/encrypted_incoming_email_command.rb index 05fc7cac000..0caf65ab794 100644 --- a/lib/gitlab/encrypted_incoming_email_command.rb +++ b/lib/gitlab/encrypted_incoming_email_command.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true -# rubocop:disable Rails/Output module Gitlab class EncryptedIncomingEmailCommand < EncryptedCommandBase DISPLAY_NAME = "INCOMING_EMAIL" @@ -20,4 +19,3 @@ module Gitlab end end end -# rubocop:enable Rails/Output diff --git a/lib/gitlab/encrypted_redis_command.rb b/lib/gitlab/encrypted_redis_command.rb index 608edcdb950..e72448083bc 100644 --- a/lib/gitlab/encrypted_redis_command.rb +++ b/lib/gitlab/encrypted_redis_command.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true -# rubocop:disable Rails/Output module Gitlab class EncryptedRedisCommand < EncryptedCommandBase DISPLAY_NAME = "Redis" @@ -53,4 +52,3 @@ module Gitlab end end end -# rubocop:enable Rails/Output diff --git a/lib/gitlab/encrypted_service_desk_email_command.rb b/lib/gitlab/encrypted_service_desk_email_command.rb index 1a0317e0da9..5a5d84a81bb 100644 --- a/lib/gitlab/encrypted_service_desk_email_command.rb +++ b/lib/gitlab/encrypted_service_desk_email_command.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true -# rubocop:disable Rails/Output module Gitlab class EncryptedServiceDeskEmailCommand < EncryptedCommandBase DISPLAY_NAME = "SERVICE_DESK_EMAIL" @@ -20,4 +19,3 @@ module Gitlab end end end -# rubocop:enable Rails/Output diff --git a/lib/gitlab/encrypted_smtp_command.rb b/lib/gitlab/encrypted_smtp_command.rb index 51a476b143d..02938da0736 100644 --- a/lib/gitlab/encrypted_smtp_command.rb +++ b/lib/gitlab/encrypted_smtp_command.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true -# rubocop:disable Rails/Output module Gitlab class EncryptedSmtpCommand < EncryptedCommandBase DISPLAY_NAME = "SMTP" @@ -20,4 +19,3 @@ module Gitlab end end end -# rubocop:enable Rails/Output diff --git a/lib/gitlab/error_tracking/processor/sidekiq_processor.rb b/lib/gitlab/error_tracking/processor/sidekiq_processor.rb index a0b6318e066..033e08eced2 100644 --- a/lib/gitlab/error_tracking/processor/sidekiq_processor.rb +++ b/lib/gitlab/error_tracking/processor/sidekiq_processor.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'set' # rubocop:disable Lint/RedundantRequireStatement -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. +require 'set' # -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. module Gitlab module ErrorTracking diff --git a/lib/gitlab/file_detector.rb b/lib/gitlab/file_detector.rb index 91f4e733e9a..62a3f70cd1e 100644 --- a/lib/gitlab/file_detector.rb +++ b/lib/gitlab/file_detector.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'set' # rubocop:disable Lint/RedundantRequireStatement -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. +require 'set' # -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. module Gitlab # Module that can be used to detect if a path points to a special file such as diff --git a/lib/gitlab/git/commit.rb b/lib/gitlab/git/commit.rb index 7c7f9e3374c..c881affff11 100644 --- a/lib/gitlab/git/commit.rb +++ b/lib/gitlab/git/commit.rb @@ -105,7 +105,6 @@ module Gitlab # Commit.last_for_path(repo, 'master', 'Gemfile') # def last_for_path(repo, ref, path = nil, literal_pathspec: false) - # rubocop: disable Rails/FindBy # This is not where..first from ActiveRecord where( repo: repo, @@ -114,7 +113,6 @@ module Gitlab limit: 1, literal_pathspec: literal_pathspec ).first - # rubocop: enable Rails/FindBy end # Get commits between two revspecs diff --git a/lib/gitlab/git/patches/collection.rb b/lib/gitlab/git/patches/collection.rb index ad6b5d32abc..4359d5c720e 100644 --- a/lib/gitlab/git/patches/collection.rb +++ b/lib/gitlab/git/patches/collection.rb @@ -20,13 +20,11 @@ module Gitlab size < MAX_PATCH_SIZE end - # rubocop: disable CodeReuse/ActiveRecord # `@patches` is not an `ActiveRecord` relation, but an `Enumerable` # We're using sum from `ActiveSupport` def size @size ||= @patches.sum(&:size) end - # rubocop: enable CodeReuse/ActiveRecord end end end diff --git a/lib/gitlab/github_import/markdown_text.rb b/lib/gitlab/github_import/markdown_text.rb index 5e2c9b06c97..69f3b0a6cb6 100644 --- a/lib/gitlab/github_import/markdown_text.rb +++ b/lib/gitlab/github_import/markdown_text.rb @@ -2,7 +2,6 @@ # This class includes overriding Kernel#format method # what makes impossible to use it here -# rubocop:disable Style/FormatString module Gitlab module GithubImport class MarkdownText @@ -87,4 +86,3 @@ module Gitlab end end end -# rubocop:enable Style/FormatString diff --git a/lib/gitlab/github_import/user_finder.rb b/lib/gitlab/github_import/user_finder.rb index 204851fdeb0..603851b1de3 100644 --- a/lib/gitlab/github_import/user_finder.rb +++ b/lib/gitlab/github_import/user_finder.rb @@ -197,17 +197,13 @@ module Gitlab Gitlab::Cache::Import::Caching.write(ID_FOR_EMAIL_CACHE_KEY % email, gitlab_id) end - # rubocop: disable CodeReuse/ActiveRecord def query_id_for_github_id(id) User.by_provider_and_extern_uid(:github, id).select(:id).first&.id end - # rubocop: enable CodeReuse/ActiveRecord - # rubocop: disable CodeReuse/ActiveRecord def query_id_for_github_email(email) User.by_any_email(email).pick(:id) end - # rubocop: enable CodeReuse/ActiveRecord # Reads an ID from the cache. # diff --git a/lib/gitlab/graphql/pagination/keyset/connection.rb b/lib/gitlab/graphql/pagination/keyset/connection.rb index 208ca5f2d24..55de4a8aef6 100644 --- a/lib/gitlab/graphql/pagination/keyset/connection.rb +++ b/lib/gitlab/graphql/pagination/keyset/connection.rb @@ -124,7 +124,6 @@ module Gitlab end end - # rubocop: disable CodeReuse/ActiveRecord def slice_nodes(sliced, encoded_cursor, before_or_after) order = Gitlab::Pagination::Keyset::Order.extract_keyset_order_object(sliced) order = order.reversed_order if before_or_after == :before @@ -132,7 +131,6 @@ module Gitlab decoded_cursor = ordering_from_encoded_json(encoded_cursor) order.apply_cursor_conditions(sliced, decoded_cursor) end - # rubocop: enable CodeReuse/ActiveRecord def limit_value # note: only first _or_ last can be specified, not both diff --git a/lib/gitlab/health_checks/metric.rb b/lib/gitlab/health_checks/metric.rb index c1e437831d7..b697cb0d027 100644 --- a/lib/gitlab/health_checks/metric.rb +++ b/lib/gitlab/health_checks/metric.rb @@ -1,4 +1,3 @@ -# rubocop:disable Naming/FileName # frozen_string_literal: true module Gitlab @@ -6,5 +5,3 @@ module Gitlab Metric = Struct.new(:name, :value, :labels) end end - -# rubocop:enable Naming/FileName diff --git a/lib/gitlab/health_checks/probes/status.rb b/lib/gitlab/health_checks/probes/status.rb index 1c59f18ff7d..192e9366001 100644 --- a/lib/gitlab/health_checks/probes/status.rb +++ b/lib/gitlab/health_checks/probes/status.rb @@ -1,4 +1,3 @@ -# rubocop:disable Naming/FileName # frozen_string_literal: true module Gitlab @@ -13,5 +12,3 @@ module Gitlab end end end - -# rubocop:enable Naming/FileName diff --git a/lib/gitlab/health_checks/result.rb b/lib/gitlab/health_checks/result.rb index cbb847d2af2..38a36100ec7 100644 --- a/lib/gitlab/health_checks/result.rb +++ b/lib/gitlab/health_checks/result.rb @@ -1,4 +1,3 @@ -# rubocop:disable Naming/FileName # frozen_string_literal: true module Gitlab @@ -14,5 +13,3 @@ module Gitlab end end end - -# rubocop:enable Naming/FileName diff --git a/lib/gitlab/middleware/release_env.rb b/lib/gitlab/middleware/release_env.rb index 2439e873e0b..0719fb2e8c6 100644 --- a/lib/gitlab/middleware/release_env.rb +++ b/lib/gitlab/middleware/release_env.rb @@ -1,4 +1,3 @@ -# rubocop:disable Naming/FileName # frozen_string_literal: true module Gitlab @@ -15,5 +14,3 @@ module Gitlab end end end - -# rubocop:enable Naming/FileName diff --git a/lib/gitlab/object_hierarchy.rb b/lib/gitlab/object_hierarchy.rb index 0576aed811c..17a163db17d 100644 --- a/lib/gitlab/object_hierarchy.rb +++ b/lib/gitlab/object_hierarchy.rb @@ -84,22 +84,18 @@ module Gitlab # # When `with_depth` is `true`, a `depth` column is included where it starts with `1` for the base objects # and incremented as we go down the descendant tree - # rubocop: disable CodeReuse/ActiveRecord def base_and_descendants(with_depth: false) outer_select_relation = unscoped_model.all outer_select_relation = outer_select_relation.select(objects_table[Arel.star]) if with_depth # Otherwise Active Record will not select `depth` as it's not a table column read_only(base_and_descendants_cte(with_depth: with_depth).apply_to(outer_select_relation)) end - # rubocop: enable CodeReuse/ActiveRecord # Returns a relation that includes ID of the descendants_base set of objects # and all their descendants IDs (recursively). - # rubocop: disable CodeReuse/ActiveRecord def base_and_descendant_ids read_only(base_and_descendant_ids_cte.apply_to(unscoped_model.select(objects_table[:id]))) end - # rubocop: enable CodeReuse/ActiveRecord # Returns a relation that includes the base objects, their ancestors, # and the descendants of the base objects. diff --git a/lib/gitlab/pagination/keyset/column_order_definition.rb b/lib/gitlab/pagination/keyset/column_order_definition.rb index 606fb7d1e60..567d7535839 100644 --- a/lib/gitlab/pagination/keyset/column_order_definition.rb +++ b/lib/gitlab/pagination/keyset/column_order_definition.rb @@ -129,7 +129,6 @@ module Gitlab attr_reader :attribute_name, :column_expression, :order_expression, :add_to_projections, :order_direction - # rubocop: disable Metrics/ParameterLists def initialize(attribute_name:, order_expression:, column_expression: nil, reversed_order_expression: nil, nullable: :not_nullable, order_direction: nil, sql_type: nil, add_to_projections: false) @attribute_name = attribute_name @order_expression = order_expression @@ -140,7 +139,6 @@ module Gitlab @sql_type = sql_type @add_to_projections = add_to_projections end - # rubocop: enable Metrics/ParameterLists def reverse self.class.new( diff --git a/lib/gitlab/pagination/keyset/pager.rb b/lib/gitlab/pagination/keyset/pager.rb index 3fabd454ee3..5de6adf7aa3 100644 --- a/lib/gitlab/pagination/keyset/pager.rb +++ b/lib/gitlab/pagination/keyset/pager.rb @@ -14,7 +14,7 @@ module Gitlab # Validate assumption: The last two columns must match the page order_by validate_order!(relation) - relation.limit(page.per_page) # rubocop: disable CodeReuse/ActiveRecord + relation.limit(page.per_page) end def finalize(records) diff --git a/lib/gitlab/patch/old_redis_cache_store.rb b/lib/gitlab/patch/old_redis_cache_store.rb index 308b0c0ff5c..0491b4f092e 100644 --- a/lib/gitlab/patch/old_redis_cache_store.rb +++ b/lib/gitlab/patch/old_redis_cache_store.rb @@ -5,7 +5,7 @@ module Gitlab module OldRedisCacheStore # We will try keep patched code explicit and matching the original signature in # https://github.com/rails/rails/blob/v6.1.7.2/activesupport/lib/active_support/cache/redis_cache_store.rb#L361 - def read_multi_mget(*names) # rubocop:disable Style/ArgumentsForwarding -- Overridden patch + def read_multi_mget(*names) return super unless enable_rails_cache_pipeline_patch? return super unless use_patched_mget? diff --git a/lib/gitlab/patch/redis_cache_store.rb b/lib/gitlab/patch/redis_cache_store.rb index 59c9d586082..faaa31a8dff 100644 --- a/lib/gitlab/patch/redis_cache_store.rb +++ b/lib/gitlab/patch/redis_cache_store.rb @@ -5,7 +5,7 @@ module Gitlab module RedisCacheStore # We will try keep patched code explicit and matching the original signature in # https://github.com/rails/rails/blob/v7.1.3.4/activesupport/lib/active_support/cache/redis_cache_store.rb#L324 - def read_multi_entries(names, **options) # rubocop:disable Style/ArgumentsForwarding -- Overridden patch + def read_multi_entries(names, **options) return super unless enable_rails_cache_pipeline_patch? return super unless use_patched_mget? diff --git a/lib/gitlab/profiler.rb b/lib/gitlab/profiler.rb index 1a6feff915f..5b1bb734ddc 100644 --- a/lib/gitlab/profiler.rb +++ b/lib/gitlab/profiler.rb @@ -155,7 +155,6 @@ module Gitlab klass.send(:remove_method, meth) if klass.instance_methods(false).include?(meth) # rubocop:disable GitlabSecurity/PublicSend end - # rubocop: disable CodeReuse/ActiveRecord def self.log_load_times_by_model(logger) return unless logger.respond_to?(:load_times_by_model) @@ -167,7 +166,6 @@ module Gitlab logger.info("#{model} total (#{query_count}): #{time.round(2)}ms") end end - # rubocop: enable CodeReuse/ActiveRecord def self.with_profiler(profiler_options) require 'stackprof' diff --git a/lib/gitlab/project_search_results.rb b/lib/gitlab/project_search_results.rb index 6b198d5d950..762ad43b741 100644 --- a/lib/gitlab/project_search_results.rb +++ b/lib/gitlab/project_search_results.rb @@ -64,7 +64,6 @@ module Gitlab @limited_blobs_count ||= blobs(limit: count_limit).count end - # rubocop: disable CodeReuse/ActiveRecord def limited_notes_count return @limited_notes_count if defined?(@limited_notes_count) @@ -78,7 +77,6 @@ module Gitlab @limited_notes_count end - # rubocop: enable CodeReuse/ActiveRecord def wiki_blobs_count @wiki_blobs_count ||= wiki_blobs(limit: count_limit).count diff --git a/lib/gitlab/rack_attack/user_allowlist.rb b/lib/gitlab/rack_attack/user_allowlist.rb index c1da1fabef5..70b475191ac 100644 --- a/lib/gitlab/rack_attack/user_allowlist.rb +++ b/lib/gitlab/rack_attack/user_allowlist.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'set' # rubocop:disable Lint/RedundantRequireStatement -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. +require 'set' # -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. module Gitlab module RackAttack diff --git a/lib/gitlab/redis/hll.rb b/lib/gitlab/redis/hll.rb index 3a610c08d67..8339a5f11b2 100644 --- a/lib/gitlab/redis/hll.rb +++ b/lib/gitlab/redis/hll.rb @@ -1,4 +1,3 @@ -# rubocop:disable Naming/FileName # frozen_string_literal: true module Gitlab @@ -52,5 +51,3 @@ module Gitlab end end end - -# rubocop:enable Naming/FileName diff --git a/lib/gitlab/search/sort_options.rb b/lib/gitlab/search/sort_options.rb index 31c374f6a78..1c1f5999ec5 100644 --- a/lib/gitlab/search/sort_options.rb +++ b/lib/gitlab/search/sort_options.rb @@ -33,7 +33,7 @@ module Gitlab :unknown end end - module_function :sort_and_direction # rubocop: disable Style/AccessModifierDeclarations + module_function :sort_and_direction end end end diff --git a/lib/gitlab/sidekiq_config/cli_methods.rb b/lib/gitlab/sidekiq_config/cli_methods.rb index 5c69a87f366..565e8a3f647 100644 --- a/lib/gitlab/sidekiq_config/cli_methods.rb +++ b/lib/gitlab/sidekiq_config/cli_methods.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'yaml' -require 'set' # rubocop:disable Lint/RedundantRequireStatement -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. +require 'set' # -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. # These methods are called by `sidekiq-cluster`, which runs outside of # the bundler/Rails context, so we cannot use any gem or Rails methods. diff --git a/lib/gitlab/slash_commands/issue_search.rb b/lib/gitlab/slash_commands/issue_search.rb index 0a705de4484..2c25c32e1f7 100644 --- a/lib/gitlab/slash_commands/issue_search.rb +++ b/lib/gitlab/slash_commands/issue_search.rb @@ -11,7 +11,6 @@ module Gitlab "issue search " end - # rubocop: disable CodeReuse/ActiveRecord def execute(match) issues = collection.search(match[:query]).limit(QUERY_LIMIT) @@ -21,7 +20,6 @@ module Gitlab Presenters::Access.new(issues).not_found end end - # rubocop: enable CodeReuse/ActiveRecord end end end diff --git a/lib/gitlab/slash_commands/result.rb b/lib/gitlab/slash_commands/result.rb index d488606120f..a66a2e0726b 100644 --- a/lib/gitlab/slash_commands/result.rb +++ b/lib/gitlab/slash_commands/result.rb @@ -1,4 +1,3 @@ -# rubocop:disable Naming/FileName # frozen_string_literal: true module Gitlab @@ -6,5 +5,3 @@ module Gitlab Result = Struct.new(:type, :message) end end - -# rubocop:enable Naming/FileName diff --git a/lib/gitlab/tracking.rb b/lib/gitlab/tracking.rb index dc81595fbde..383b34e65d3 100644 --- a/lib/gitlab/tracking.rb +++ b/lib/gitlab/tracking.rb @@ -55,7 +55,7 @@ module Gitlab private - def track_struct_event(destination, category, action, label:, property:, value:, contexts:) # rubocop:disable Metrics/ParameterLists + def track_struct_event(destination, category, action, label:, property:, value:, contexts:) destination .event(category, action, label: label, property: property, value: value, context: contexts) rescue StandardError => error diff --git a/lib/gitlab/tracking/event_validator.rb b/lib/gitlab/tracking/event_validator.rb index c0e5b9fe316..a98327e742f 100644 --- a/lib/gitlab/tracking/event_validator.rb +++ b/lib/gitlab/tracking/event_validator.rb @@ -58,9 +58,10 @@ module Gitlab custom_properties = additional_properties.except(*BASE_ADDITIONAL_PROPERTIES.keys) event_definition_attributes = Gitlab::Tracking::EventDefinition.find(event_name).to_h allowed_types = CUSTOM_PROPERTIES_CLASSES + custom_properties.each_key do |key| - unless event_definition_attributes[:additional_properties].include?(key) - raise InvalidPropertyError, "Unknown additional property: #{key}" + unless event_definition_attributes[:additional_properties]&.include?(key) + raise InvalidPropertyError, "Unknown additional property: #{key} for event_name: #{event_name}" end validate_property!(custom_properties, key, *allowed_types) diff --git a/lib/gitlab/usage/metrics/instrumentations/count_imported_projects_metric.rb b/lib/gitlab/usage/metrics/instrumentations/count_imported_projects_metric.rb index f3e81766b4c..859466adb63 100644 --- a/lib/gitlab/usage/metrics/instrumentations/count_imported_projects_metric.rb +++ b/lib/gitlab/usage/metrics/instrumentations/count_imported_projects_metric.rb @@ -22,7 +22,7 @@ module Gitlab unless start.nil? ::Project .select(:id) - .where(Project.arel_table[:created_at].gteq(start)) # rubocop:disable UsageData/LargeTable + .where(Project.arel_table[:created_at].gteq(start)) .order(created_at: :asc).order(id: :asc).limit(1).first&.id end end @@ -35,7 +35,7 @@ module Gitlab unless finish.nil? ::Project .select(:id) - .where(Project.arel_table[:created_at].lteq(finish)) # rubocop:disable UsageData/LargeTable + .where(Project.arel_table[:created_at].lteq(finish)) .order(created_at: :desc).order(id: :desc).limit(1).first&.id end end diff --git a/lib/gitlab/usage/metrics/instrumentations/database_metric.rb b/lib/gitlab/usage/metrics/instrumentations/database_metric.rb index 926d4ccb335..f9762794baa 100644 --- a/lib/gitlab/usage/metrics/instrumentations/database_metric.rb +++ b/lib/gitlab/usage/metrics/instrumentations/database_metric.rb @@ -15,7 +15,7 @@ module Gitlab # end # end - UnimplementedOperationError = Class.new(StandardError) # rubocop:disable UsageData/InstrumentationSuperclass + UnimplementedOperationError = Class.new(StandardError) class << self IMPLEMENTED_OPERATIONS = %i[count distinct_count estimate_batch_distinct_count sum average].freeze diff --git a/lib/gitlab/usage/metrics/instrumentations/numbers_metric.rb b/lib/gitlab/usage/metrics/instrumentations/numbers_metric.rb index f168837bd50..36202f6153d 100644 --- a/lib/gitlab/usage/metrics/instrumentations/numbers_metric.rb +++ b/lib/gitlab/usage/metrics/instrumentations/numbers_metric.rb @@ -18,7 +18,7 @@ module Gitlab # end # end - UnimplementedOperationError = Class.new(StandardError) # rubocop:disable UsageData/InstrumentationSuperclass + UnimplementedOperationError = Class.new(StandardError) class << self IMPLEMENTED_OPERATIONS = %i[add].freeze diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index 1d2b4813dc2..171f71ecd2b 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -65,9 +65,7 @@ module Gitlab auto_devops_enabled: count(::ProjectAutoDevops.enabled), auto_devops_disabled: count(::ProjectAutoDevops.disabled), deploy_keys: count(DeployKey), - # rubocop: disable UsageData/LargeTable: feature_flags: count(Operations::FeatureFlag), - # rubocop: enable UsageData/LargeTable: environments: count(::Environment), clusters: count(::Clusters::Cluster), clusters_enabled: count(::Clusters::Cluster.enabled), @@ -439,7 +437,6 @@ module Gitlab Gitlab::Utils::UsageData::FALLBACK else # rubocop: disable CodeReuse/ActiveRecord - # rubocop: disable UsageData/LargeTable start = ::Event.where(time_period).select(:id).order(created_at: :asc).first&.id finish = ::Event.where(time_period).select(:id).order(created_at: :desc).first&.id estimate_batch_distinct_count(::Event.where(time_period), :author_id, start: start, finish: finish) diff --git a/lib/gitlab/usage_data_queries.rb b/lib/gitlab/usage_data_queries.rb index 8310c464a59..08f034b2e46 100644 --- a/lib/gitlab/usage_data_queries.rb +++ b/lib/gitlab/usage_data_queries.rb @@ -27,11 +27,9 @@ module Gitlab Gitlab::Usage::Metrics::Query.for(:sum, relation, column) end - # rubocop: disable CodeReuse/ActiveRecord def histogram(relation, column, buckets:, bucket_size: buckets.size) Gitlab::Usage::Metrics::Query.for(:histogram, relation, column, buckets: buckets, bucket_size: bucket_size) end - # rubocop: enable CodeReuse/ActiveRecord # For estimated distinct count use exact query instead of hll # buckets query, because it can't be used to obtain estimations without @@ -77,9 +75,7 @@ module Gitlab def stage_manage_events(time_period) # rubocop: disable CodeReuse/ActiveRecord - # rubocop: disable UsageData/LargeTable estimate_batch_distinct_count(::Event.where(time_period), :author_id) - # rubocop: enable UsageData/LargeTable # rubocop: enable CodeReuse/ActiveRecord end end diff --git a/lib/gitlab/verify/ci_secure_files.rb b/lib/gitlab/verify/ci_secure_files.rb index 9bb7f7260c4..8ba8c15bb48 100644 --- a/lib/gitlab/verify/ci_secure_files.rb +++ b/lib/gitlab/verify/ci_secure_files.rb @@ -13,11 +13,9 @@ module Gitlab private - # rubocop: disable CodeReuse/ActiveRecord def all_relation ::Ci::SecureFile.all end - # rubocop: enable CodeReuse/ActiveRecord def local?(secure_file) secure_file.local? diff --git a/lib/gitlab/x509/signature.rb b/lib/gitlab/x509/signature.rb index 3cecb995a7e..1f96b95716b 100644 --- a/lib/gitlab/x509/signature.rb +++ b/lib/gitlab/x509/signature.rb @@ -69,7 +69,9 @@ module Gitlab if Feature.enabled?(:x509_forced_cert_loading, type: :ops) # Forcibly load the default cert file because the OpenSSL library seemingly ignores it - store.add_file(Gitlab::X509::Certificate.default_cert_file) if File.exist?(Gitlab::X509::Certificate.default_cert_file) # rubocop:disable Layout/LineLength + if File.exist?(Gitlab::X509::Certificate.default_cert_file) + store.add_file(Gitlab::X509::Certificate.default_cert_file) + end end # valid_signing_time? checks the time attributes already diff --git a/lib/tasks/gitlab/cleanup.rake b/lib/tasks/gitlab/cleanup.rake index d85530e8c74..9bfcf1f7d14 100644 --- a/lib/tasks/gitlab/cleanup.rake +++ b/lib/tasks/gitlab/cleanup.rake @@ -1,7 +1,7 @@ # frozen_string_literal: true namespace :gitlab do - require 'set' # rubocop:disable Lint/RedundantRequireStatement -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. + require 'set' # -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. namespace :cleanup do desc "GitLab | Cleanup | Block users that have been removed in LDAP" @@ -287,7 +287,6 @@ new_sha: Gitlab::Git::SHA1_BLANK_SHA } end end - # rubocop:disable Gitlab/RailsLogger def logger return @logger if defined?(@logger) @@ -305,6 +304,5 @@ new_sha: Gitlab::Git::SHA1_BLANK_SHA } Rails.logger end end - # rubocop:enable Gitlab/RailsLogger end end diff --git a/lib/tasks/gitlab/seed/group_seed.rake b/lib/tasks/gitlab/seed/group_seed.rake index d9b24d8e679..c2636931011 100644 --- a/lib/tasks/gitlab/seed/group_seed.rake +++ b/lib/tasks/gitlab/seed/group_seed.rake @@ -123,7 +123,6 @@ class GroupSeeder end def create_user - # rubocop:disable Style/SymbolProc -- Incorrect rubocop advice. User.create!( username: FFaker::Internet.unique.user_name, name: FFaker::Name.name, @@ -133,7 +132,6 @@ class GroupSeeder ) do |user| user.assign_personal_namespace(@organization) end - # rubocop:enable Style/SymbolProc end def create_member(user_id, group_id) diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 27b3e7039de..b29bf87359a 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -2086,6 +2086,9 @@ msgstr "" msgid "A non-confidential work item cannot have a confidential parent." msgstr "" +msgid "A parent group has selected \"Only direct members.\" It cannot be overridden by this group." +msgstr "" + msgid "A parent must be provided when bulk updating issuables" msgstr "" @@ -3573,9 +3576,6 @@ msgstr "" msgid "AdminAIPoweredFeatures|AI-powered features" msgstr "" -msgid "AdminAIPoweredFeatures|AI-powered features that can be enabled, disabled, or linked to a cloud-based or self-hosted model." -msgstr "" - msgid "AdminAIPoweredFeatures|Add self-hosted model" msgstr "" @@ -3588,9 +3588,6 @@ msgstr "" msgid "AdminAIPoweredFeatures|Disabled" msgstr "" -msgid "AdminAIPoweredFeatures|Features that can be enabled, disabled, or linked to a cloud-based or self-hosted model." -msgstr "" - msgid "AdminAIPoweredFeatures|Main feature" msgstr "" @@ -3603,42 +3600,18 @@ msgstr "" msgid "AdminAIPoweredFeatures|Sub feature" msgstr "" -msgid "AdminAiPoweredFeatures|%{feature_name}" -msgstr "" - msgid "AdminAiPoweredFeatures|%{selected_model} is incompatible with the %{title} feature" msgstr "" msgid "AdminAiPoweredFeatures|AI vendor" msgstr "" -msgid "AdminAiPoweredFeatures|AI-powered features" -msgstr "" - -msgid "AdminAiPoweredFeatures|Choose the AI model to use with %{feature_name}." -msgstr "" - msgid "AdminAiPoweredFeatures|Disabled" msgstr "" -msgid "AdminAiPoweredFeatures|Model provider" -msgstr "" - msgid "AdminAiPoweredFeatures|Self-hosted model" msgstr "" -msgid "AdminAiPoweredFeatures|Turn off" -msgstr "" - -msgid "AdminAiPoweredFeatures|Turn off %{feature_name} for the instance." -msgstr "" - -msgid "AdminAiPoweredFeatures|Turn on %{feature_name}, powered by a GitLab-selected AI Vendor. The model must be configured for the instance." -msgstr "" - -msgid "AdminAiPoweredFeatures|Turn on %{feature_name}, powered by a self-hosted model." -msgstr "" - msgid "AdminArea|%{billable_users_link_start}Learn more%{billable_users_link_end} about what defines a billable user" msgstr "" @@ -20314,7 +20287,7 @@ msgstr "" msgid "DuoChat|Search %{categoryLabel}..." msgstr "" -msgid "DuoChat|The issue, epic, or code you're viewing" +msgid "DuoChat|The issue, epic, merge request, or code you're viewing" msgstr "" msgid "DuoChat|There was an error communicating with GitLab Duo Chat. Please try again later." @@ -22685,6 +22658,9 @@ msgstr "" msgid "Expiry notification emails about group and project access tokens should be sent to:" msgstr "" +msgid "Expiry notification emails about group and project access tokens within this group should be sent to:" +msgstr "" + msgid "Explain current vulnerability." msgstr "" @@ -23214,9 +23190,6 @@ msgstr "" msgid "Feature flag was successfully removed." msgstr "" -msgid "Feature settings updated successfully" -msgstr "" - msgid "FeatureFlags|%d user" msgid_plural "FeatureFlags|%d users" msgstr[0] "" @@ -66241,6 +66214,9 @@ msgstr "" msgid "organizations can only be added to root groups and groups configured as CRM targets" msgstr "" +msgid "overdue" +msgstr "" + msgid "packages" msgstr "" @@ -66264,6 +66240,9 @@ msgstr "" msgid "password" msgstr "" +msgid "past due" +msgstr "" + msgid "pending comment" msgstr "" @@ -66646,6 +66625,9 @@ msgstr "" msgid "unsubscribed %{emails}" msgstr "" +msgid "upcoming" +msgstr "" + msgid "updated" msgstr "" diff --git a/rubocop/cop/gettext/static_identifier.rb b/rubocop/cop/gettext/static_identifier.rb index 9ca1c88f4b6..28d7e83effc 100644 --- a/rubocop/cop/gettext/static_identifier.rb +++ b/rubocop/cop/gettext/static_identifier.rb @@ -76,7 +76,7 @@ module RuboCop def allowed_method_call?(node) return false unless node.send_type? - !DENIED_METHOD_CALLS.include?(node.method_name) # rubocop:disable Rails/NegateInclude + !DENIED_METHOD_CALLS.include?(node.method_name) end end end diff --git a/rubocop/cop/gitlab/feature_available_usage.rb b/rubocop/cop/gitlab/feature_available_usage.rb index 0b1c4367eae..ec38650b89a 100644 --- a/rubocop/cop/gitlab/feature_available_usage.rb +++ b/rubocop/cop/gitlab/feature_available_usage.rb @@ -41,7 +41,7 @@ module RuboCop return if feature_name(node).nil? return if ALL_FEATURES.include?(feature_name(node)) && args_count(node) == 2 - if !ALL_FEATURES.include?(feature_name(node)) # rubocop:disable Rails/NegateInclude + if !ALL_FEATURES.include?(feature_name(node)) add_offense(node, message: licensed_feature_message(node)) elsif args_count(node) < 2 add_offense(node, message: NOT_ENOUGH_ARGS_MSG) diff --git a/rubocop/cop/migration/add_reference.rb b/rubocop/cop/migration/add_reference.rb index 8daa85749fd..02a0ef899b4 100644 --- a/rubocop/cop/migration/add_reference.rb +++ b/rubocop/cop/migration/add_reference.rb @@ -41,7 +41,7 @@ module RuboCop private def existing_table?(new_tables, table) - !new_tables.include?(table) # rubocop:disable Rails/NegateInclude + !new_tables.include?(table) end def create_table?(node) diff --git a/rubocop/cop/rake/require.rb b/rubocop/cop/rake/require.rb index 1b358505f6f..2139911f0dd 100644 --- a/rubocop/cop/rake/require.rb +++ b/rubocop/cop/rake/require.rb @@ -107,7 +107,7 @@ module RuboCop def inside_block(node, skip:) node.each_ancestor(:block).any? do |block| - !skip.include?(block.method_name) # rubocop:disable Rails/NegateInclude -- This is not Rails + !skip.include?(block.method_name) end end diff --git a/rubocop/cop/rspec/factory_bot/inline_association.rb b/rubocop/cop/rspec/factory_bot/inline_association.rb index acd2c10a63d..8d7c73b99a0 100644 --- a/rubocop/cop/rspec/factory_bot/inline_association.rb +++ b/rubocop/cop/rspec/factory_bot/inline_association.rb @@ -99,7 +99,7 @@ module RuboCop def inside_assocation_definition?(node) node.each_ancestor(:block).any? do |parent| name = association_definition(parent) - name && !SKIP_NAMES.include?(name) # rubocop:disable Rails/NegateInclude + name && !SKIP_NAMES.include?(name) end end end diff --git a/rubocop/cop/static_translation_definition.rb b/rubocop/cop/static_translation_definition.rb index e7b8cdeab12..55c1176e31b 100644 --- a/rubocop/cop/static_translation_definition.rb +++ b/rubocop/cop/static_translation_definition.rb @@ -105,7 +105,7 @@ module RuboCop def named_block?(node) return unless node.block_type? - !NON_METHOD_DEFINITIONS.include?(node.method_name) # rubocop:disable Rails/NegateInclude + !NON_METHOD_DEFINITIONS.include?(node.method_name) end def instance_method_definition?(node) diff --git a/rubocop/feature_categories.rb b/rubocop/feature_categories.rb index 015c267ab34..f8401def83a 100644 --- a/rubocop/feature_categories.rb +++ b/rubocop/feature_categories.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'set' # rubocop:disable Lint/RedundantRequireStatement -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. +require 'set' # -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. require 'yaml' require 'digest/sha2' require 'did_you_mean' @@ -51,7 +51,7 @@ module RuboCop if value_node if !value_node.sym_type? yield MSG_SYMBOL - elsif !categories.include?(value_node.value.to_s) # rubocop:disable Rails/NegateInclude + elsif !categories.include?(value_node.value.to_s) yield format_message(value_node.value, document_link: document_link) end else diff --git a/rubocop/formatter/todo_formatter.rb b/rubocop/formatter/todo_formatter.rb index cc9767764c5..77c74802586 100644 --- a/rubocop/formatter/todo_formatter.rb +++ b/rubocop/formatter/todo_formatter.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'set' # rubocop:disable Lint/RedundantRequireStatement -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. +require 'set' # -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. require 'rubocop' require 'yaml' diff --git a/sidekiq_cluster/cli.rb b/sidekiq_cluster/cli.rb index 2760eecb5e1..424e6bd422d 100644 --- a/sidekiq_cluster/cli.rb +++ b/sidekiq_cluster/cli.rb @@ -89,7 +89,7 @@ module Gitlab end if @list_queues - puts queue_groups.map(&:sort) # rubocop:disable Rails/Output + puts queue_groups.map(&:sort) return end diff --git a/sidekiq_cluster/sidekiq_cluster.rb b/sidekiq_cluster/sidekiq_cluster.rb index 47a81d3143b..df0fcc31f52 100644 --- a/sidekiq_cluster/sidekiq_cluster.rb +++ b/sidekiq_cluster/sidekiq_cluster.rb @@ -65,7 +65,7 @@ module Gitlab end if dryrun - puts Shellwords.join(cmd) # rubocop:disable Rails/Output + puts Shellwords.join(cmd) return end diff --git a/spec/controllers/groups/milestones_controller_spec.rb b/spec/controllers/groups/milestones_controller_spec.rb index 596deccba69..8b34c6e4a43 100644 --- a/spec/controllers/groups/milestones_controller_spec.rb +++ b/spec/controllers/groups/milestones_controller_spec.rb @@ -334,7 +334,7 @@ RSpec.describe Groups::MilestonesController, feature_category: :team_planning do expect(response).to have_gitlab_http_status(:conflict) expect(json_response).to include "errors" => [ format( - _("Someone edited this %{model_name} at the same time you did. Please refresh your browser and make sure your changes will not unintentionally remove theirs."), # rubocop:disable Layout/LineLength + _("Someone edited this %{model_name} at the same time you did. Please refresh your browser and make sure your changes will not unintentionally remove theirs."), model_name: _('milestone') ) ] diff --git a/spec/controllers/profiles/two_factor_auths_controller_spec.rb b/spec/controllers/profiles/two_factor_auths_controller_spec.rb index 046a5f5959e..d380312af73 100644 --- a/spec/controllers/profiles/two_factor_auths_controller_spec.rb +++ b/spec/controllers/profiles/two_factor_auths_controller_spec.rb @@ -273,9 +273,11 @@ RSpec.describe Profiles::TwoFactorAuthsController, feature_category: :system_acc let(:client) { WebAuthn::FakeClient.new('http://localhost', encoding: :base64) } let(:credential) { create_credential(client: client, rp_id: request.host) } - let(:params) { { device_registration: { name: 'touch id', device_response: device_response } } } # rubocop:disable Rails/SaveBang + let(:params) { { device_registration: { name: 'touch id', device_response: device_response } } } - let(:params_with_password) { { device_registration: { name: 'touch id', device_response: device_response }, current_password: user.password } } # rubocop:disable Rails/SaveBang + let(:params_with_password) do + { device_registration: { name: 'touch id', device_response: device_response }, current_password: user.password } + end before do session[:challenge] = challenge diff --git a/spec/controllers/projects/milestones_controller_spec.rb b/spec/controllers/projects/milestones_controller_spec.rb index 9f8272c11d1..aafcb1dfdcd 100644 --- a/spec/controllers/projects/milestones_controller_spec.rb +++ b/spec/controllers/projects/milestones_controller_spec.rb @@ -254,7 +254,7 @@ RSpec.describe Projects::MilestonesController, feature_category: :team_planning expect(response).to have_gitlab_http_status(:conflict) expect(json_response).to include "errors" => [ format( - _("Someone edited this %{model_name} at the same time you did. Please refresh your browser and make sure your changes will not unintentionally remove theirs."), # rubocop:disable Layout/LineLength + _("Someone edited this %{model_name} at the same time you did. Please refresh your browser and make sure your changes will not unintentionally remove theirs."), model_name: _('milestone') ) ] diff --git a/spec/features/issues/discussion_lock_spec.rb b/spec/features/issues/discussion_lock_spec.rb index 7541d7658b3..6db5c0b62c5 100644 --- a/spec/features/issues/discussion_lock_spec.rb +++ b/spec/features/issues/discussion_lock_spec.rb @@ -114,6 +114,6 @@ RSpec.describe 'Discussion Lock', :js, feature_category: :team_planning do expect(page).to be_axe_clean.within(issuable_note_warning) more_dropdown.click - expect(page).to be_axe_clean.within('[data-testid="lock-issue-toggle"] button') # rubocop:todo Capybara/TestidFinders -- Doesn't cover use case, see https://gitlab.com/gitlab-org/gitlab/-/issues/442224 + expect(page).to be_axe_clean.within('[data-testid="lock-issue-toggle"] button') end end diff --git a/spec/features/issues/user_edits_issue_spec.rb b/spec/features/issues/user_edits_issue_spec.rb index 8ed75d55446..5e48c714107 100644 --- a/spec/features/issues/user_edits_issue_spec.rb +++ b/spec/features/issues/user_edits_issue_spec.rb @@ -93,7 +93,7 @@ RSpec.describe "Issues > User edits issue", :js, feature_category: :team_plannin expect(page).to have_content( format( - _("Someone edited this %{model_name} at the same time you did. Please check out the %{link_to_model} and make sure your changes will not unintentionally remove theirs."), # rubocop:disable Layout/LineLength + _("Someone edited this %{model_name} at the same time you did. Please check out the %{link_to_model} and make sure your changes will not unintentionally remove theirs."), model_name: _('issue'), link_to_model: _('issue') ) diff --git a/spec/frontend/boards/components/issue_due_date_spec.js b/spec/frontend/boards/components/issue_due_date_spec.js index 979b7fee411..41c34023a53 100644 --- a/spec/frontend/boards/components/issue_due_date_spec.js +++ b/spec/frontend/boards/components/issue_due_date_spec.js @@ -1,4 +1,5 @@ import { shallowMount } from '@vue/test-utils'; +import { GlIcon } from '@gitlab/ui'; import IssueDueDate from '~/boards/components/issue_due_date.vue'; import { localeDateFormat, toISODateFormat } from '~/lib/utils/datetime_utility'; @@ -11,6 +12,7 @@ const createComponent = (dueDate = new Date(), closed = false) => }); const findTime = (wrapper) => wrapper.find('time'); +const findIcon = (wrapper) => wrapper.findComponent(GlIcon); describe('Issue Due Date component', () => { let wrapper; @@ -59,18 +61,24 @@ describe('Issue Due Date component', () => { expect(findTime(wrapper).text()).toBe(expected); }); - it('should contain the correct `.gl-text-danger` css class for overdue issue that is open', () => { + it('should contain the correct icon for overdue issue that is open', () => { date.setDate(date.getDate() - 17); wrapper = createComponent(date); - expect(findTime(wrapper).classes('gl-text-danger')).toBe(true); + expect(findIcon(wrapper).props()).toMatchObject({ + variant: 'danger', + name: 'calendar-overdue', + }); }); - it('should not contain the `.gl-text-danger` css class for overdue issue that is closed', () => { + it('should not contain the overdue icon for overdue issue that is closed', () => { date.setDate(date.getDate() - 17); const closed = true; wrapper = createComponent(date, closed); - expect(findTime(wrapper).classes('gl-text-danger')).toBe(false); + expect(findIcon(wrapper).props()).toMatchObject({ + variant: 'default', + name: 'calendar', + }); }); }); diff --git a/spec/frontend/ci/catalog/components/details/ci_resource_readme_spec.js b/spec/frontend/ci/catalog/components/details/ci_resource_readme_spec.js index cde7710baa7..9be6948e40a 100644 --- a/spec/frontend/ci/catalog/components/details/ci_resource_readme_spec.js +++ b/spec/frontend/ci/catalog/components/details/ci_resource_readme_spec.js @@ -1,4 +1,4 @@ -import Vue from 'vue'; +import Vue, { nextTick } from 'vue'; import VueApollo from 'vue-apollo'; import { GlLoadingIcon } from '@gitlab/ui'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; @@ -7,8 +7,10 @@ import getCiCatalogResourceReadme from '~/ci/catalog/graphql/queries/get_ci_cata import createMockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; import { createAlert } from '~/alert'; +import { renderGFM } from '~/behaviors/markdown/render_gfm'; jest.mock('~/alert'); +jest.mock('~/behaviors/markdown/render_gfm'); Vue.use(VueApollo); @@ -90,6 +92,12 @@ describe('CiResourceReadme', () => { expect(wrapper.html()).toContain(versionedReadmeHtml); }); + it('calls `renderGFM` to ensure that all gitlab-flavoured markdown is rendered on the README', async () => { + await nextTick(); + + expect(renderGFM).toHaveBeenCalledWith(expect.anything()); + }); + it('does not render an error', () => { expect(createAlert).not.toHaveBeenCalled(); }); diff --git a/spec/frontend/fixtures/merge_requests.rb b/spec/frontend/fixtures/merge_requests.rb index f34997cfd65..6e3c779396d 100644 --- a/spec/frontend/fixtures/merge_requests.rb +++ b/spec/frontend/fixtures/merge_requests.rb @@ -15,7 +15,6 @@ RSpec let(:project) { create(:project, :repository, namespace: namespace, path: 'merge-requests-project') } let(:user) { project.first_owner } - # rubocop: disable Layout/TrailingWhitespace let(:description) do <<~MARKDOWN.strip_heredoc - [ ] Task List Item @@ -23,7 +22,6 @@ RSpec - [ ] Task List Item 2 MARKDOWN end - # rubocop: enable Layout/TrailingWhitespace let(:merge_request) do create( diff --git a/spec/frontend/issues/list/components/issue_card_time_info_spec.js b/spec/frontend/issues/list/components/issue_card_time_info_spec.js index 2a07b388563..9336e5111c3 100644 --- a/spec/frontend/issues/list/components/issue_card_time_info_spec.js +++ b/spec/frontend/issues/list/components/issue_card_time_info_spec.js @@ -51,6 +51,7 @@ describe('CE IssueCardTimeInfo component', () => { const findMilestone = () => wrapper.findComponent(IssuableMilestone); const findDueDate = () => wrapper.find('[data-testid="issuable-due-date"]'); + const findDateIcon = () => findDueDate().findComponent(GlIcon); const mountComponent = ({ issue = issueObject() } = {}) => shallowMount(IssueCardTimeInfo, { propsData: { issue } }); @@ -78,27 +79,35 @@ describe('CE IssueCardTimeInfo component', () => { expect(dueDate.text()).toBe('Dec 12, 2020'); expect(dueDate.attributes('title')).toBe('Due date'); - expect(dueDate.findComponent(GlIcon).props('name')).toBe('calendar'); - expect(dueDate.classes()).not.toContain('gl-text-red-500'); + expect(findDateIcon().props()).toMatchObject({ + variant: 'default', + name: 'calendar', + }); }); }); describe('when in the past', () => { describe('when issue is open', () => { - it('renders in red', () => { + it('renders in red with overdue icon', () => { wrapper = mountComponent({ issue: object({ dueDate: '2020-10-10' }) }); - expect(findDueDate().classes()).toContain('gl-text-red-500'); + expect(findDateIcon().props()).toMatchObject({ + variant: 'danger', + name: 'calendar-overdue', + }); }); }); describe('when issue is closed', () => { - it('does not render in red', () => { + it('does not render in red with overdue icon', () => { wrapper = mountComponent({ issue: object({ dueDate: '2020-10-10', state: STATUS_CLOSED }), }); - expect(findDueDate().classes()).not.toContain('gl-text-red-500'); + expect(findDateIcon().props()).toMatchObject({ + variant: 'default', + name: 'calendar', + }); }); }); }); diff --git a/spec/frontend/vue_shared/issuable/list/components/issuable_milestone_spec.js b/spec/frontend/vue_shared/issuable/list/components/issuable_milestone_spec.js index 84d401a4529..0a3a56ea28c 100644 --- a/spec/frontend/vue_shared/issuable/list/components/issuable_milestone_spec.js +++ b/spec/frontend/vue_shared/issuable/list/components/issuable_milestone_spec.js @@ -33,9 +33,9 @@ describe('IssuableMilestone component', () => { describe.each` time | text | milestoneDueDate | milestoneStartDate | expected - ${'due date is in past'} | ${'Past due'} | ${'2020-09-09'} | ${null} | ${'Sep 9, 2020 (Past due)'} - ${'due date is today'} | ${'Today'} | ${'2020-12-11'} | ${null} | ${'Dec 11, 2020 (Today)'} - ${'start date is in future'} | ${'Upcoming'} | ${'2021-03-01'} | ${'2021-02-01'} | ${'Mar 1, 2021 (Upcoming)'} + ${'due date is in past'} | ${'past due'} | ${'2020-09-09'} | ${null} | ${'Sep 9, 2020 (past due)'} + ${'due date is today'} | ${'today'} | ${'2020-12-11'} | ${null} | ${'Dec 11, 2020 (today)'} + ${'start date is in future'} | ${'upcoming'} | ${'2021-03-01'} | ${'2021-02-01'} | ${'Mar 1, 2021 (upcoming)'} ${'due date is in future'} | ${'2 weeks remaining'} | ${'2020-12-25'} | ${null} | ${'Dec 25, 2020 (2 weeks remaining)'} `('when $description', ({ text, milestoneDueDate, milestoneStartDate, expected }) => { it(`renders with "${text}"`, () => { diff --git a/spec/initializers/secret_token_spec.rb b/spec/initializers/secret_token_spec.rb index 29e7e46b181..aaebb17f301 100644 --- a/spec/initializers/secret_token_spec.rb +++ b/spec/initializers/secret_token_spec.rb @@ -91,7 +91,10 @@ RSpec.describe SecretsInitializer do let(:rsa_key) { /\A-----BEGIN RSA PRIVATE KEY-----\n.+\n-----END RSA PRIVATE KEY-----\n\Z/m } around do |example| - original_credentials = Rails.application.credentials + # We store Rails.application.credentials as a hash so that we can revert to the original + # values after the example has run. Assigning Rails.application.credentials= directly doesn't work. + original_credentials = Rails.application.credentials.to_h + # Ensure we clear any existing `encrypted_settings_key_base` credential allowed_keys.each do |key| Rails.application.credentials.public_send(:"#{key}=", nil) @@ -99,7 +102,9 @@ RSpec.describe SecretsInitializer do example.run - Rails.application.credentials = original_credentials + original_credentials.each do |key, value| + Rails.application.credentials.public_send(:"#{key}=", value) + end end before do diff --git a/spec/lib/backup/manager_spec.rb b/spec/lib/backup/manager_spec.rb index 012a4861044..76dadebdb12 100644 --- a/spec/lib/backup/manager_spec.rb +++ b/spec/lib/backup/manager_spec.rb @@ -1042,7 +1042,7 @@ RSpec.describe Backup::Manager, feature_category: :backup_restore do it 'returns false' do allow(lfs).to receive(:backup!).and_raise(Backup::FileBackupError.new('foo', 'bar')) - expect(subject.create).to be_falsey # rubocop:disable Rails/SaveBang -- not a Rails create method + expect(subject.create).to be_falsey end end end diff --git a/spec/lib/gitlab/avatar_cache_spec.rb b/spec/lib/gitlab/avatar_cache_spec.rb index 65cde195a61..ae86a35cdae 100644 --- a/spec/lib/gitlab/avatar_cache_spec.rb +++ b/spec/lib/gitlab/avatar_cache_spec.rb @@ -4,7 +4,7 @@ require "spec_helper" RSpec.describe Gitlab::AvatarCache, :clean_gitlab_redis_cache do def with(&blk) - Gitlab::Redis::Cache.with(&blk) # rubocop:disable CodeReuse/ActiveRecord + Gitlab::Redis::Cache.with(&blk) end def read(key, subkey) diff --git a/spec/lib/gitlab/diff/rendered/notebook/diff_file_helper_spec.rb b/spec/lib/gitlab/diff/rendered/notebook/diff_file_helper_spec.rb index 4dd29e1fb15..36c0166c447 100644 --- a/spec/lib/gitlab/diff/rendered/notebook/diff_file_helper_spec.rb +++ b/spec/lib/gitlab/diff/rendered/notebook/diff_file_helper_spec.rb @@ -2,7 +2,7 @@ require 'fast_spec_helper' require 'rspec-parameterized' -require 'set' # rubocop:disable Lint/RedundantRequireStatement -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. +require 'set' # -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. MOCK_LINE = Struct.new(:text, :type, :index, :old_pos, :new_pos) diff --git a/spec/lib/gitlab/gfm/uploads_rewriter_spec.rb b/spec/lib/gitlab/gfm/uploads_rewriter_spec.rb index 0ed9e0b4a90..8e59557ef54 100644 --- a/spec/lib/gitlab/gfm/uploads_rewriter_spec.rb +++ b/spec/lib/gitlab/gfm/uploads_rewriter_spec.rb @@ -19,7 +19,7 @@ RSpec.describe Gitlab::Gfm::UploadsRewriter do end let(:text) do - "Text and #{image_uploader.markdown_link} and #{zip_uploader.markdown_link}".freeze # rubocop:disable Style/RedundantFreeze + "Text and #{image_uploader.markdown_link} and #{zip_uploader.markdown_link}".freeze end def referenced_files(text, project) diff --git a/spec/lib/gitlab/git/tree_spec.rb b/spec/lib/gitlab/git/tree_spec.rb index d456499c025..8efdd08df0a 100644 --- a/spec/lib/gitlab/git/tree_spec.rb +++ b/spec/lib/gitlab/git/tree_spec.rb @@ -75,11 +75,9 @@ RSpec.describe Gitlab::Git::Tree, feature_category: :source_code_management do it { expect(dir.flat_path).to eq('encoding') } context :subdir do - # rubocop: disable Rails/FindBy # This is not ActiveRecord where..first let(:path) { 'files' } let(:subdir) { entries.first } - # rubocop: enable Rails/FindBy it { expect(subdir).to be_kind_of Gitlab::Git::Tree } it { expect(subdir.id).to eq('a1e8f8d745cc87e3a9248358d9352bb7f9a0aeba') } @@ -90,11 +88,9 @@ RSpec.describe Gitlab::Git::Tree, feature_category: :source_code_management do end context :subdir_file do - # rubocop: disable Rails/FindBy # This is not ActiveRecord where..first let(:path) { 'files/ruby' } let(:subdir_file) { entries.first } - # rubocop: enable Rails/FindBy it { expect(subdir_file).to be_kind_of Gitlab::Git::Tree } it { expect(subdir_file.id).to eq('7e3e39ebb9b2bf433b4ad17313770fbe4051649c') } @@ -109,10 +105,8 @@ RSpec.describe Gitlab::Git::Tree, feature_category: :source_code_management do let(:repository) { project.repository.raw } let(:filename) { 'files/flat/path/correct/content.txt' } let(:path) { 'files/flat' } - # rubocop: disable Rails/FindBy # This is not ActiveRecord where..first let(:subdir_file) { entries.first } - # rubocop: enable Rails/FindBy let!(:sha) do repository.commit_files( user, diff --git a/spec/lib/gitlab/import_export/project/relation_saver_spec.rb b/spec/lib/gitlab/import_export/project/relation_saver_spec.rb index 5b56df33fe0..244416f1f07 100644 --- a/spec/lib/gitlab/import_export/project/relation_saver_spec.rb +++ b/spec/lib/gitlab/import_export/project/relation_saver_spec.rb @@ -55,7 +55,7 @@ RSpec.describe Gitlab::ImportExport::Project::RelationSaver do end it 'successfully serializes without errors' do - result = relation_saver.save # rubocop:disable Rails/SaveBang + result = relation_saver.save expect(result).to eq(true) expect(shared.errors).to be_empty @@ -81,7 +81,7 @@ RSpec.describe Gitlab::ImportExport::Project::RelationSaver do end it 'successfully serializes without errors' do - result = relation_saver.save # rubocop:disable Rails/SaveBang + result = relation_saver.save expect(result).to eq(true) expect(shared.errors).to be_empty @@ -92,7 +92,7 @@ RSpec.describe Gitlab::ImportExport::Project::RelationSaver do let(:relation) { 'unknown' } it 'returns false and register the error' do - result = relation_saver.save # rubocop:disable Rails/SaveBang + result = relation_saver.save expect(result).to eq(false) expect(shared.errors).to be_present @@ -105,7 +105,7 @@ RSpec.describe Gitlab::ImportExport::Project::RelationSaver do allow(serializer).to receive(:serialize_root).and_raise('Error!') end - result = relation_saver.save # rubocop:disable Rails/SaveBang + result = relation_saver.save expect(result).to eq(false) expect(shared.errors).to include('Error!') diff --git a/spec/lib/gitlab/memory/watchdog/configurator_spec.rb b/spec/lib/gitlab/memory/watchdog/configurator_spec.rb index 365505913d9..86110d33740 100644 --- a/spec/lib/gitlab/memory/watchdog/configurator_spec.rb +++ b/spec/lib/gitlab/memory/watchdog/configurator_spec.rb @@ -63,7 +63,6 @@ RSpec.describe Gitlab::Memory::Watchdog::Configurator, feature_category: :cloud_ let(:configuration) { Gitlab::Memory::Watchdog::Configuration.new } # In tests, the Puma constant does not exist so we cannot use a verified double. - # rubocop: disable RSpec/VerifiedDoubles describe '.configure_for_puma' do let(:logger) { Gitlab::AppLogger } let(:puma) do @@ -189,7 +188,6 @@ RSpec.describe Gitlab::Memory::Watchdog::Configurator, feature_category: :cloud_ end end end - # rubocop: enable RSpec/VerifiedDoubles describe '.configure_for_sidekiq' do let(:logger) { ::Sidekiq.logger } diff --git a/spec/lib/gitlab/metrics/exporter/base_exporter_spec.rb b/spec/lib/gitlab/metrics/exporter/base_exporter_spec.rb index 54e28a4db22..095811e8e8f 100644 --- a/spec/lib/gitlab/metrics/exporter/base_exporter_spec.rb +++ b/spec/lib/gitlab/metrics/exporter/base_exporter_spec.rb @@ -216,7 +216,7 @@ RSpec.describe Gitlab::Metrics::Exporter::BaseExporter, feature_category: :cloud # in separate thread allow_any_instance_of(::WEBrick::HTTPServer) .to receive(:start).and_wrap_original do |m, *args| - @server_thread = Thread.new do # rubocop:disable RSpec/InstanceVariable -- let does not work for this case + @server_thread = Thread.new do m.call(*args) rescue IOError # is raised as we close listeners diff --git a/spec/lib/gitlab/namespaced_session_store_spec.rb b/spec/lib/gitlab/namespaced_session_store_spec.rb index 07e2b9c0cea..d55a9ea4717 100644 --- a/spec/lib/gitlab/namespaced_session_store_spec.rb +++ b/spec/lib/gitlab/namespaced_session_store_spec.rb @@ -16,13 +16,10 @@ RSpec.describe Gitlab::NamespacedSessionStore do it 'passes .each call to storage hash' do keys = [] values = [] - # rubocop:disable Lint/UnreachableLoop -- false positive instance.each do |key, val| keys << key values << val end - # rubocop:enable Lint/UnreachableLoop - expect(keys).to match_array([:a, :b]) expect(values).to match_array([1, 2]) end diff --git a/spec/lib/gitlab/pagination/keyset/iterator_spec.rb b/spec/lib/gitlab/pagination/keyset/iterator_spec.rb index 1b7b9efc9d1..b55baef671b 100644 --- a/spec/lib/gitlab/pagination/keyset/iterator_spec.rb +++ b/spec/lib/gitlab/pagination/keyset/iterator_spec.rb @@ -20,8 +20,8 @@ RSpec.describe Gitlab::Pagination::Keyset::Iterator do Gitlab::Pagination::Keyset::ColumnOrderDefinition.new( attribute_name: column, column_expression: klass.arel_table[column], - order_expression: klass.arel_table[column].public_send(direction).public_send(nulls_position), # rubocop:disable GitlabSecurity/PublicSend - reversed_order_expression: klass.arel_table[column].public_send(reverse_direction).public_send(reverse_nulls_position), # rubocop:disable GitlabSecurity/PublicSend + order_expression: klass.arel_table[column].public_send(direction).public_send(nulls_position), + reversed_order_expression: klass.arel_table[column].public_send(reverse_direction).public_send(reverse_nulls_position), order_direction: direction, nullable: nulls_position ), diff --git a/spec/lib/gitlab/quick_actions/dsl_spec.rb b/spec/lib/gitlab/quick_actions/dsl_spec.rb index c0469537c68..72cfc07cd58 100644 --- a/spec/lib/gitlab/quick_actions/dsl_spec.rb +++ b/spec/lib/gitlab/quick_actions/dsl_spec.rb @@ -6,7 +6,7 @@ RSpec.describe Gitlab::QuickActions::Dsl do before do stub_const('DummyClass', Struct.new(:project)) DummyClass.class_eval do - include Gitlab::QuickActions::Dsl # rubocop:disable RSpec/DescribedClass + include Gitlab::QuickActions::Dsl desc 'A command with no args' command :no_args, :none do diff --git a/spec/lib/gitlab/redis/multi_store_spec.rb b/spec/lib/gitlab/redis/multi_store_spec.rb index 148fa928269..4667c270598 100644 --- a/spec/lib/gitlab/redis/multi_store_spec.rb +++ b/spec/lib/gitlab/redis/multi_store_spec.rb @@ -132,7 +132,6 @@ RSpec.describe Gitlab::Redis::MultiStore, feature_category: :redis do end end - # rubocop:disable RSpec/MultipleMemoizedHelpers context 'with READ redis commands' do let(:args) { 'args' } let(:kwargs) { { match: '*:set:key2*' } } @@ -270,7 +269,6 @@ RSpec.describe Gitlab::Redis::MultiStore, feature_category: :redis do end end end - # rubocop:enable RSpec/MultipleMemoizedHelpers context 'with nested command in block' do let(:skey) { "test_set" } diff --git a/spec/lib/gitlab/shard_health_cache_spec.rb b/spec/lib/gitlab/shard_health_cache_spec.rb index 8d0eebbb23e..5f56d8a7cc4 100644 --- a/spec/lib/gitlab/shard_health_cache_spec.rb +++ b/spec/lib/gitlab/shard_health_cache_spec.rb @@ -36,7 +36,7 @@ RSpec.describe Gitlab::ShardHealthCache, :clean_gitlab_redis_cache do end it 'returns 0 if no shards are available' do - described_class.update([]) # rubocop:disable Rails/SaveBang + described_class.update([]) expect(described_class.healthy_shard_count).to eq(0) end diff --git a/spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb b/spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb index dde20a03dc6..e6294b14218 100644 --- a/spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb +++ b/spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' -# rubocop: disable RSpec/MultipleMemoizedHelpers RSpec.describe Gitlab::SidekiqMiddleware::ServerMetrics, feature_category: :shared do before do allow(Thread.current).to receive(:name=) @@ -557,4 +556,3 @@ RSpec.describe Gitlab::SidekiqMiddleware::ServerMetrics, feature_category: :shar end end end -# rubocop: enable RSpec/MultipleMemoizedHelpers diff --git a/spec/lib/gitlab/sidekiq_middleware/size_limiter/server_spec.rb b/spec/lib/gitlab/sidekiq_middleware/size_limiter/server_spec.rb index 12430313141..1ab893f2a30 100644 --- a/spec/lib/gitlab/sidekiq_middleware/size_limiter/server_spec.rb +++ b/spec/lib/gitlab/sidekiq_middleware/size_limiter/server_spec.rb @@ -2,7 +2,6 @@ require 'fast_spec_helper' -# rubocop: disable RSpec/MultipleMemoizedHelpers RSpec.describe Gitlab::SidekiqMiddleware::SizeLimiter::Server, :clean_gitlab_redis_queues do subject(:middleware) { described_class.new } diff --git a/spec/lib/gitlab/tracking/event_validator_spec.rb b/spec/lib/gitlab/tracking/event_validator_spec.rb index 1f6fb65ca5e..2ab1c0155ff 100644 --- a/spec/lib/gitlab/tracking/event_validator_spec.rb +++ b/spec/lib/gitlab/tracking/event_validator_spec.rb @@ -76,7 +76,20 @@ RSpec.describe Gitlab::Tracking::EventValidator, feature_category: :service_ping it 'raises an InvalidPropertyError for unknown properties' do expect { validate }.to raise_error(Gitlab::Tracking::EventValidator::InvalidPropertyError, - 'Unknown additional property: custom_property') + 'Unknown additional property: custom_property for event_name: test_event') + end + end + + context 'when additional properties are not defined in the event definition files' do + let(:additional_properties) { { custom_property: 'value' } } + + before do + allow(event_definition).to receive(:to_h).and_return({}) + end + + it 'raises an InvalidPropertyError for unknown properties' do + expect { validate }.to raise_error(Gitlab::Tracking::EventValidator::InvalidPropertyError, + 'Unknown additional property: custom_property for event_name: test_event') end end end diff --git a/spec/lib/omni_auth/strategies/jwt_spec.rb b/spec/lib/omni_auth/strategies/jwt_spec.rb index ac3d2deb3e9..4e25e6a96f7 100644 --- a/spec/lib/omni_auth/strategies/jwt_spec.rb +++ b/spec/lib/omni_auth/strategies/jwt_spec.rb @@ -51,7 +51,6 @@ RSpec.describe OmniAuth::Strategies::Jwt do context "when the #{algorithm} algorithm is used" do let(:algorithm) { algorithm } let(:secret) do - # rubocop:disable Style/CaseLikeIf if private_key_class == OpenSSL::PKey::RSA private_key_class.generate(2048) .to_pem @@ -61,7 +60,6 @@ RSpec.describe OmniAuth::Strategies::Jwt do else private_key_class.new(jwt_config.strategy.secret) end - # rubocop:enable Style/CaseLikeIf end let(:private_key) { private_key_class ? private_key_class.new(secret) : secret } diff --git a/spec/models/ci/build_trace_chunk_spec.rb b/spec/models/ci/build_trace_chunk_spec.rb index b56c0608488..d205d0ce712 100644 --- a/spec/models/ci/build_trace_chunk_spec.rb +++ b/spec/models/ci/build_trace_chunk_spec.rb @@ -903,7 +903,7 @@ RSpec.describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state, :clean_git let(:chunk) { create(:ci_build_trace_chunk) } it 'indicates the these are equal' do - expect(chunk <=> chunk).to be_zero # rubocop:disable Lint/UselessComparison + expect(chunk <=> chunk).to be_zero end end end diff --git a/spec/models/concerns/triggerable_hooks_spec.rb b/spec/models/concerns/triggerable_hooks_spec.rb index c209d6476f3..a916f3f3861 100644 --- a/spec/models/concerns/triggerable_hooks_spec.rb +++ b/spec/models/concerns/triggerable_hooks_spec.rb @@ -7,7 +7,7 @@ RSpec.describe TriggerableHooks do stub_const('TestableHook', Class.new(WebHook)) TestableHook.class_eval do - include TriggerableHooks # rubocop:disable RSpec/DescribedClass + include TriggerableHooks triggerable_hooks [:push_hooks] self.allow_legacy_sti_class = true diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index 1e93f5a4155..4f0ef85fc16 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -654,6 +654,8 @@ RSpec.describe Namespace, feature_category: :groups_and_projects do it { is_expected.to delegate_method(:math_rendering_limits_enabled).to(:namespace_settings) } it { is_expected.to delegate_method(:math_rendering_limits_enabled?).to(:namespace_settings) } it { is_expected.to delegate_method(:lock_math_rendering_limits_enabled?).to(:namespace_settings) } + it { is_expected.to delegate_method(:token_expiry_notify_inherited).to(:namespace_settings) } + it { is_expected.to delegate_method(:token_expiry_notify_inherited=).to(:namespace_settings).with_arguments(:args) } it { is_expected.to delegate_method(:add_creator).to(:namespace_details) } it { is_expected.to delegate_method(:pending_delete).to(:namespace_details) } it { is_expected.to delegate_method(:pending_delete=).to(:namespace_details).with_arguments(:args) } @@ -2221,6 +2223,74 @@ RSpec.describe Namespace, feature_category: :groups_and_projects do end end + context 'with token_expiry_notify_inherited settings' do + let_it_be_with_reload(:grandparent_namespace) { create(:group) } + let_it_be_with_reload(:parent_namespace) { create(:group, parent: grandparent_namespace) } + let_it_be_with_reload(:child_namespace) { create(:group, parent: parent_namespace) } + + describe '.token_expiry_notify_inherited?' do + subject { child_namespace.token_expiry_notify_inherited? } + + # setting defaults to true for all namespace settings + it { is_expected.to eq(true) } + + context 'when parent namespace has setting disabled' do + before do + parent_namespace.namespace_settings.update!(token_expiry_notify_inherited: false) + end + + it { is_expected.to eq(false) } + end + + context 'when grandparent namespace has setting disabled' do + before do + grandparent_namespace.namespace_settings.update!(token_expiry_notify_inherited: false) + end + + it { is_expected.to eq(false) } + end + + context 'when current token_expiry_notify_inherited is set to false' do + before do + child_namespace.namespace_settings.update!(token_expiry_notify_inherited: false) + end + + it { is_expected.to eq(false) } + end + end + + describe '.can_modify_token_expiry_notify_inherited?' do + subject { child_namespace.can_modify_token_expiry_notify_inherited? } + + # setting defaults to true for all namespace settings + it { is_expected.to eq(true) } + + context 'when parent namespace has setting disabled' do + before do + parent_namespace.namespace_settings.update!(token_expiry_notify_inherited: false) + end + + it { is_expected.to eq(false) } + end + + context 'when grandparent namespace has setting disabled' do + before do + grandparent_namespace.namespace_settings.update!(token_expiry_notify_inherited: false) + end + + it { is_expected.to eq(false) } + end + + context 'when current token_expiry_notify_inherited is set to false' do + before do + child_namespace.namespace_settings.update!(token_expiry_notify_inherited: false) + end + + it { is_expected.to eq(true) } + end + end + end + describe '#any_project_with_pages_deployed?' do it 'returns true if any project nested under the group has pages deployed' do parent_1 = create(:group) # Three projects, one with pages diff --git a/spec/presenters/packages/pypi/simple_index_presenter_spec.rb b/spec/presenters/packages/pypi/simple_index_presenter_spec.rb index eb167d67398..c18772cdd07 100644 --- a/spec/presenters/packages/pypi/simple_index_presenter_spec.rb +++ b/spec/presenters/packages/pypi/simple_index_presenter_spec.rb @@ -56,16 +56,16 @@ RSpec.describe ::Packages::Pypi::SimpleIndexPresenter, :aggregate_failures, feat context 'for project' do let(:project_or_group) { project } - let(:expected_link1) { "#{package1.name}" } # rubocop:disable Layout/LineLength - let(:expected_link2) { "#{package2.name}" } # rubocop:disable Layout/LineLength + let(:expected_link1) { "#{package1.name}" } + let(:expected_link2) { "#{package2.name}" } it_behaves_like 'pypi package presenter' end context 'for group' do let(:project_or_group) { group } - let(:expected_link1) { "#{package1.name}" } # rubocop:disable Layout/LineLength - let(:expected_link2) { "#{package2.name}" } # rubocop:disable Layout/LineLength + let(:expected_link1) { "#{package1.name}" } + let(:expected_link2) { "#{package2.name}" } it_behaves_like 'pypi package presenter' end diff --git a/spec/presenters/packages/pypi/simple_package_versions_presenter_spec.rb b/spec/presenters/packages/pypi/simple_package_versions_presenter_spec.rb index 9ad26999437..6dca4ac0be3 100644 --- a/spec/presenters/packages/pypi/simple_package_versions_presenter_spec.rb +++ b/spec/presenters/packages/pypi/simple_package_versions_presenter_spec.rb @@ -49,14 +49,14 @@ RSpec.describe ::Packages::Pypi::SimplePackageVersionsPresenter, :aggregate_fail context 'for project' do let(:project_or_group) { project } - let(:expected_link) { "#{filename}" } # rubocop:disable Layout/LineLength + let(:expected_link) { "#{filename}" } it_behaves_like 'pypi package presenter' end context 'for group' do let(:project_or_group) { group } - let(:expected_link) { "#{filename}" } # rubocop:disable Layout/LineLength + let(:expected_link) { "#{filename}" } it_behaves_like 'pypi package presenter' end diff --git a/spec/requests/api/graphql/ci/config_spec.rb b/spec/requests/api/graphql/ci/config_spec.rb index c30b8abdbb2..58711a9bd4e 100644 --- a/spec/requests/api/graphql/ci/config_spec.rb +++ b/spec/requests/api/graphql/ci/config_spec.rb @@ -415,7 +415,6 @@ RSpec.describe 'Query.ciConfig', feature_category: :continuous_integration do it_behaves_like 'a working graphql query' - # rubocop:disable Layout/LineLength it 'returns correct includes' do expect(graphql_data['ciConfig']["includes"]).to eq( [ @@ -467,7 +466,6 @@ RSpec.describe 'Query.ciConfig', feature_category: :continuous_integration do ] ) end - # rubocop:enable Layout/LineLength end describe 'skip_verify_project_sha' do diff --git a/spec/scripts/duo_chat/reporter_spec.rb b/spec/scripts/duo_chat/reporter_spec.rb index 836c41273e8..8f778416c0d 100644 --- a/spec/scripts/duo_chat/reporter_spec.rb +++ b/spec/scripts/duo_chat/reporter_spec.rb @@ -111,7 +111,7 @@ RSpec.describe Reporter, feature_category: :ai_abstraction_layer do end context 'when a note does not already exist' do - let(:note) { nil } # rubocop: disable RSpec/VerifiedDoubles -- an internal detail of Gitlab gem. + let(:note) { nil } it 'saves the report as a markdown file and creates a new MR note containing the report content' do expect(File).to receive(:write).with(base_dir, reporter.markdown_report) diff --git a/spec/services/alert_management/metric_images/upload_service_spec.rb b/spec/services/alert_management/metric_images/upload_service_spec.rb index e2a21cb9d16..fea57dd5d3a 100644 --- a/spec/services/alert_management/metric_images/upload_service_spec.rb +++ b/spec/services/alert_management/metric_images/upload_service_spec.rb @@ -64,7 +64,8 @@ RSpec.describe AlertManagement::MetricImages::UploadService, feature_category: : } end - it_behaves_like 'no metric saved, an error given', /File does not have a supported extension. Only png, jpg, jpeg, gif, bmp, tiff, ico, and webp are supported/ # rubocop: disable Layout/LineLength + it_behaves_like 'no metric saved, an error given', + /File does not have a supported extension. Only png, jpg, jpeg, gif, bmp, tiff, ico, and webp are supported/ end context 'user is guest' do diff --git a/spec/services/boards/lists/list_service_spec.rb b/spec/services/boards/lists/list_service_spec.rb index 282230def44..40ef4b64603 100644 --- a/spec/services/boards/lists/list_service_spec.rb +++ b/spec/services/boards/lists/list_service_spec.rb @@ -18,7 +18,8 @@ RSpec.describe Boards::Lists::ListService, feature_category: :portfolio_manageme end let_it_be(:milestone_list) do - list = build(:list, board: board, milestone_id: milestone.id, list_type: List.list_types[:milestone], position: 1) # rubocop:disable Layout/LineLength + list = build(:list, board: board, milestone_id: milestone.id, list_type: List.list_types[:milestone], + position: 1) list.save!(validate: false) list end diff --git a/spec/support/finder_collection.rb b/spec/support/finder_collection.rb index 93363943449..6bcdc80acff 100644 --- a/spec/support/finder_collection.rb +++ b/spec/support/finder_collection.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'set' # rubocop:disable Lint/RedundantRequireStatement -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. +require 'set' # -- Ruby 3.1 and earlier needs this. Drop this line after Ruby 3.2+ is only supported. module Support # Ensure that finders' `execute` method always returns diff --git a/spec/support/forgery_protection.rb b/spec/support/forgery_protection.rb index d12e99b17c4..1d6ea013292 100644 --- a/spec/support/forgery_protection.rb +++ b/spec/support/forgery_protection.rb @@ -8,7 +8,7 @@ module ForgeryProtection ActionController::Base.allow_forgery_protection = false end - module_function :with_forgery_protection # rubocop: disable Style/AccessModifierDeclarations + module_function :with_forgery_protection end RSpec.configure do |config| diff --git a/spec/support/helpers/database/multiple_databases_helpers.rb b/spec/support/helpers/database/multiple_databases_helpers.rb index 328365366ce..c8af2f1f1af 100644 --- a/spec/support/helpers/database/multiple_databases_helpers.rb +++ b/spec/support/helpers/database/multiple_databases_helpers.rb @@ -90,7 +90,6 @@ module Database # # The execution within a block ensures safe cleanup of all allocated resources. # - # rubocop:disable Database/MultipleDatabases def with_reestablished_active_record_base(reconnect: true) connection_classes = ActiveRecord::Base .connection_handler @@ -112,10 +111,9 @@ module Database ActiveRecord::Base.connection_handler = original_handler new_handler&.clear_all_connections! end - # rubocop:enable Database/MultipleDatabases def with_db_configs(test: test_config) - current_configurations = ActiveRecord::Base.configurations # rubocop:disable Database/MultipleDatabases + current_configurations = ActiveRecord::Base.configurations ActiveRecord::Base.configurations = { test: test_config } yield ensure diff --git a/spec/support/helpers/graphql_helpers.rb b/spec/support/helpers/graphql_helpers.rb index 8fafd7a46d4..e9356062cff 100644 --- a/spec/support/helpers/graphql_helpers.rb +++ b/spec/support/helpers/graphql_helpers.rb @@ -130,7 +130,6 @@ module GraphqlHelpers # NB: Arguments are passed from the client's perspective. If there is an argument # `foo` aliased as `bar`, then we would pass `args: { bar: the_value }`, and # types are checked before resolution. - # rubocop:disable Metrics/ParameterLists def resolve_field( field, # An instance of `BaseField`, or the name of a field on the current described_class object, # The current object of the `BaseObject` this field 'belongs' to diff --git a/spec/support/helpers/snowplow_helpers.rb b/spec/support/helpers/snowplow_helpers.rb index a04e5d46df9..f0a65e51c19 100644 --- a/spec/support/helpers/snowplow_helpers.rb +++ b/spec/support/helpers/snowplow_helpers.rb @@ -60,7 +60,7 @@ module SnowplowHelpers end end - expect(Gitlab::Tracking).to have_received(tracking_method) # rubocop:disable RSpec/ExpectGitlabTracking + expect(Gitlab::Tracking).to have_received(tracking_method) .with(category, action, **kwargs).at_least(:once) end @@ -81,9 +81,9 @@ module SnowplowHelpers # end def expect_no_snowplow_event(category: nil, action: nil, tracking_method: :event, **kwargs) if category && action - expect(Gitlab::Tracking).not_to have_received(tracking_method).with(category, action, **kwargs) # rubocop:disable RSpec/ExpectGitlabTracking + expect(Gitlab::Tracking).not_to have_received(tracking_method).with(category, action, **kwargs) else - expect(Gitlab::Tracking).not_to have_received(tracking_method) # rubocop:disable RSpec/ExpectGitlabTracking + expect(Gitlab::Tracking).not_to have_received(tracking_method) end end end diff --git a/spec/support/shared_examples/features/editable_merge_request_shared_examples.rb b/spec/support/shared_examples/features/editable_merge_request_shared_examples.rb index 1bee8184e61..8594bfad5c7 100644 --- a/spec/support/shared_examples/features/editable_merge_request_shared_examples.rb +++ b/spec/support/shared_examples/features/editable_merge_request_shared_examples.rb @@ -89,7 +89,7 @@ RSpec.shared_examples 'an editable merge request' do expect(page).to have_content( format( - _("Someone edited this %{model_name} at the same time you did. Please check out the %{link_to_model} and make sure your changes will not unintentionally remove theirs."), # rubocop:disable Layout/LineLength + _("Someone edited this %{model_name} at the same time you did. Please check out the %{link_to_model} and make sure your changes will not unintentionally remove theirs."), model_name: _('merge request'), link_to_model: _('merge request') ) diff --git a/spec/support/shared_examples/lib/gitlab/regex_shared_examples.rb b/spec/support/shared_examples/lib/gitlab/regex_shared_examples.rb index 2de30aed264..57032997fe1 100644 --- a/spec/support/shared_examples/lib/gitlab/regex_shared_examples.rb +++ b/spec/support/shared_examples/lib/gitlab/regex_shared_examples.rb @@ -14,8 +14,16 @@ RSpec.shared_examples 'container repository name regex' do it { is_expected.to match('my/awesome/image.test') } it { is_expected.to match('my/awesome/image--test') } it { is_expected.to match('my/image__test') } + # this example tests for catastrophic backtracking - it { is_expected.to match('user1/project/a_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb------------x') } # rubocop:disable Layout/LineLength -- Avoid formatting to keep one-line test blocks + specify do + string = + 'user1/project/a_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' \ + 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' \ + 'bbbbbbbbbb------------x' + is_expected.to match(string) + end + it { is_expected.not_to match('user1/project/a_bbbbb-------------') } it { is_expected.not_to match('my/image-.test') } it { is_expected.not_to match('my/image___test') } diff --git a/spec/support/shared_examples/models/boards/listable_shared_examples.rb b/spec/support/shared_examples/models/boards/listable_shared_examples.rb index ac8655a907f..aee591764b2 100644 --- a/spec/support/shared_examples/models/boards/listable_shared_examples.rb +++ b/spec/support/shared_examples/models/boards/listable_shared_examples.rb @@ -86,7 +86,7 @@ RSpec.shared_examples 'boards listable model' do |list_factory| end it 'can not be destroyed when list_type is set to closed' do - subject = create(list_factory, list_type: :closed) # rubocop:disable Rails/SaveBang + subject = create(list_factory, list_type: :closed) expect(subject.destroy).to be_falsey end diff --git a/spec/support/shared_examples/models/concerns/incident_management/escalatable_shared_examples.rb b/spec/support/shared_examples/models/concerns/incident_management/escalatable_shared_examples.rb index a5970f134d9..6d10dd6ac4f 100644 --- a/spec/support/shared_examples/models/concerns/incident_management/escalatable_shared_examples.rb +++ b/spec/support/shared_examples/models/concerns/incident_management/escalatable_shared_examples.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true RSpec.shared_examples 'a model including Escalatable' do - # rubocop:disable Rails/SaveBang -- Usage of factory symbol as argument causes a false-positive let_it_be(:escalatable_factory) { factory_from_class(described_class) } let_it_be(:triggered_escalatable, reload: true) { create(escalatable_factory, :triggered) } let_it_be(:acknowledged_escalatable, reload: true) { create(escalatable_factory, :acknowledged) } @@ -276,4 +275,3 @@ RSpec.shared_examples 'a model including Escalatable' do klass.name.underscore.tr('/', '_') end end -# rubocop:enable Rails/SaveBang diff --git a/spec/support/shared_examples/models/cycle_analytics_stage_shared_examples.rb b/spec/support/shared_examples/models/cycle_analytics_stage_shared_examples.rb index de25dc2379e..67b4faf4953 100644 --- a/spec/support/shared_examples/models/cycle_analytics_stage_shared_examples.rb +++ b/spec/support/shared_examples/models/cycle_analytics_stage_shared_examples.rb @@ -156,7 +156,6 @@ RSpec.shared_examples 'value stream analytics stage' do end end - # rubocop: disable Rails/SaveBang describe '#event_hash' do it 'associates the same stage event hash record' do first = create(factory, namespace: group) @@ -224,7 +223,6 @@ RSpec.shared_examples 'value stream analytics stage' do end end end - # rubocop: enable Rails/SaveBang end RSpec.shared_examples 'value stream analytics label based stage' do diff --git a/spec/support/shared_examples/models/packages/debian/distribution_key_shared_examples.rb b/spec/support/shared_examples/models/packages/debian/distribution_key_shared_examples.rb index 26794c83736..69192ee7558 100644 --- a/spec/support/shared_examples/models/packages/debian/distribution_key_shared_examples.rb +++ b/spec/support/shared_examples/models/packages/debian/distribution_key_shared_examples.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.shared_examples 'Debian Distribution Key' do |container| - let_it_be_with_refind(:distribution_key) { create("debian_#{container}_distribution_key") } # rubocop:disable Rails/SaveBang + let_it_be_with_refind(:distribution_key) { create("debian_#{container}_distribution_key") } subject { distribution_key } diff --git a/spec/support/shared_examples/requests/api/rubygems_packages_shared_examples.rb b/spec/support/shared_examples/requests/api/rubygems_packages_shared_examples.rb index d7077180b91..b5d6cc2394e 100644 --- a/spec/support/shared_examples/requests/api/rubygems_packages_shared_examples.rb +++ b/spec/support/shared_examples/requests/api/rubygems_packages_shared_examples.rb @@ -161,7 +161,7 @@ RSpec.shared_examples 'dependency endpoint success' do |user_type, status, add_m subject - expect(response.body).to eq(expected_response) # rubocop:disable Security/MarshalLoad + expect(response.body).to eq(expected_response) expect(response).to have_gitlab_http_status(status) end diff --git a/spec/views/groups/edit.html.haml_spec.rb b/spec/views/groups/edit.html.haml_spec.rb index f33a4190bf8..029531c5844 100644 --- a/spec/views/groups/edit.html.haml_spec.rb +++ b/spec/views/groups/edit.html.haml_spec.rb @@ -161,4 +161,50 @@ RSpec.describe 'groups/edit.html.haml', feature_category: :groups_and_projects d end end end + + describe 'Email notifications section' do + let_it_be(:user) { create(:user) } + let_it_be_with_reload(:parent_group) { create(:group, owners: user) } + let_it_be_with_reload(:group) { create(:group, parent: parent_group, owners: user) } + + before do + assign(:group, group) + allow(view).to receive(:current_user).and_return(user) + end + + it 'renders fields for token_expiry_notify_inherited' do + render + + expect(rendered).to have_content(_('Expiry notification emails about group and project access tokens within this group should be sent to:')) + expect(rendered).to have_selector('#group_token_expiry_notify_inherited_true:not([disabled])') + expect(rendered).to have_selector('#group_token_expiry_notify_inherited_false:not([disabled])') + expect(rendered).not_to have_content(_('A parent group has selected "Only direct members." It cannot be overridden by this group.')) + end + + context 'when pat_expiry_inherited_members_notification FF is disabled' do + before do + stub_feature_flags(pat_expiry_inherited_members_notification: false) + end + + it 'does not render form' do + render + + expect(rendered).not_to have_content(_('Expiry notification emails about group and project access tokens within this group should be sent to:')) + end + end + + context 'when parent group has token_expiry_notify_inherited set to false' do + before do + parent_group.namespace_settings.update!(token_expiry_notify_inherited: false) + end + + it 'renders disabled fields' do + render + + expect(rendered).to have_selector('#group_token_expiry_notify_inherited_false[disabled]') + expect(rendered).to have_selector('#group_token_expiry_notify_inherited_true[disabled]') + expect(rendered).to have_content(_('A parent group has selected "Only direct members." It cannot be overridden by this group.')) + end + end + end end