diff options
35 files changed, 879 insertions, 461 deletions
diff --git a/.haml-lint.yml b/.haml-lint.yml index 3231627862d..08a2442e1eb 100644 --- a/.haml-lint.yml +++ b/.haml-lint.yml @@ -120,6 +120,7 @@ linters: - Layout/SpaceInsideStringInterpolation - Layout/TrailingEmptyLines - Lint/AmbiguousOperatorPrecedence + - Lint/AssignmentInCondition - Lint/LiteralInInterpolation - Lint/ParenthesesAsGroupedExpression - Lint/SafeNavigationConsistency @@ -130,13 +131,14 @@ linters: - Performance/RedundantMatch - Performance/StringReplacement - Rails/LinkToBlank + - Rails/OutputSafety - Rails/RequestReferer - Style/ColonMethodCall - Style/ConditionalAssignment - Style/FormatString - Style/HashSyntax - - Style/IfInsideElse - Style/IdenticalConditionalBranches + - Style/IfInsideElse - Style/NegatedIf - Style/NestedTernaryOperator - Style/RedundantInterpolation diff --git a/.rubocop_todo/factory_bot/create_list.yml b/.rubocop_todo/factory_bot/create_list.yml new file mode 100644 index 00000000000..289be6ef20b --- /dev/null +++ b/.rubocop_todo/factory_bot/create_list.yml @@ -0,0 +1,83 @@ +--- +# Cop supports --autocorrect. +FactoryBot/CreateList: + Details: grace period + Exclude: + - 'ee/spec/controllers/ee/search_controller_spec.rb' + - 'ee/spec/controllers/projects/licenses_controller_spec.rb' + - 'ee/spec/factories/geo_nodes.rb' + - 'ee/spec/features/projects/environments/environments_spec.rb' + - 'ee/spec/features/projects/licenses/maintainer_views_policies_spec.rb' + - 'ee/spec/finders/security/findings_finder_spec.rb' + - 'ee/spec/finders/security/pipeline_vulnerabilities_finder_spec.rb' + - 'ee/spec/frontend/fixtures/dast_profiles.rb' + - 'ee/spec/frontend/fixtures/merge_requests.rb' + - 'ee/spec/graphql/types/pipeline_security_report_finding_type_spec.rb' + - 'ee/spec/helpers/ee/branches_helper_spec.rb' + - 'ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_spec.rb' + - 'ee/spec/lib/ee/gitlab/usage_data_spec.rb' + - 'ee/spec/lib/gitlab/ci/reports/security/vulnerability_reports_comparer_spec.rb' + - 'ee/spec/lib/gitlab/license_scanning/sbom_scanner_spec.rb' + - 'ee/spec/lib/gitlab/vulnerabilities/findings_preloader_spec.rb' + - 'ee/spec/models/approval_project_rule_spec.rb' + - 'ee/spec/models/ci/build_spec.rb' + - 'ee/spec/models/ee/project_spec.rb' + - 'ee/spec/models/geo_node_spec.rb' + - 'ee/spec/models/label_note_spec.rb' + - 'ee/spec/models/merge_request_spec.rb' + - 'ee/spec/models/merge_requests/external_status_check_spec.rb' + - 'ee/spec/models/preloaders/environments/protected_environment_preloader_spec.rb' + - 'ee/spec/models/protected_environment_spec.rb' + - 'ee/spec/models/sca/license_compliance_spec.rb' + - 'ee/spec/models/visible_approvable_spec.rb' + - 'ee/spec/models/vulnerabilities/finding_spec.rb' + - 'ee/spec/presenters/merge_request_presenter_spec.rb' + - 'ee/spec/requests/api/search_spec.rb' + - 'ee/spec/requests/api/status_checks_spec.rb' + - 'ee/spec/requests/projects/pipelines_controller_spec.rb' + - 'ee/spec/serializers/license_compliance/collapsed_comparer_entity_spec.rb' + - 'ee/spec/serializers/license_compliance/comparer_entity_spec.rb' + - 'ee/spec/services/approval_rules/params_filtering_service_spec.rb' + - 'ee/spec/services/ci/compare_license_scanning_reports_service_spec.rb' + - 'ee/spec/services/ci/sync_reports_to_approval_rules_service_spec.rb' + - 'ee/spec/services/ee/issuable/bulk_update_service_spec.rb' + - 'ee/spec/services/epics/epic_links/create_service_spec.rb' + - 'ee/spec/services/geo/node_update_service_spec.rb' + - 'ee/spec/services/iterations/roll_over_issues_service_spec.rb' + - 'ee/spec/services/members/activate_service_spec.rb' + - 'ee/spec/services/sbom/ingestion/tasks/ingest_components_spec.rb' + - 'ee/spec/services/sbom/ingestion/tasks/ingest_sources_spec.rb' + - 'ee/spec/services/security/findings/dismiss_service_spec.rb' + - 'ee/spec/services/security/ingestion/ingest_report_slice_service_spec.rb' + - 'ee/spec/services/security/ingestion/mark_as_resolved_service_spec.rb' + - 'ee/spec/services/vulnerabilities/find_or_create_from_security_finding_service_spec.rb' + - 'ee/spec/support/shared_examples/requests/api/graphql/issue_list_shared_examples.rb' + - 'spec/controllers/groups/children_controller_spec.rb' + - 'spec/features/groups/milestone_spec.rb' + - 'spec/features/projects/environments/environments_spec.rb' + - 'spec/finders/clusters/agent_tokens_finder_spec.rb' + - 'spec/graphql/resolvers/design_management/design_resolver_spec.rb' + - 'spec/helpers/branches_helper_spec.rb' + - 'spec/helpers/groups/group_members_helper_spec.rb' + - 'spec/lib/atlassian/jira_connect/serializers/repository_entity_spec.rb' + - 'spec/lib/gitlab/ci/reports/security/report_spec.rb' + - 'spec/lib/gitlab/usage_data_spec.rb' + - 'spec/mailers/repository_check_mailer_spec.rb' + - 'spec/models/ci/group_spec.rb' + - 'spec/models/concerns/issuable_spec.rb' + - 'spec/models/deploy_key_spec.rb' + - 'spec/models/group_spec.rb' + - 'spec/models/label_note_spec.rb' + - 'spec/models/note_spec.rb' + - 'spec/models/work_items/widgets/assignees_spec.rb' + - 'spec/models/work_items/widgets/labels_spec.rb' + - 'spec/requests/api/graphql/project/pipeline_spec.rb' + - 'spec/requests/api/protected_branches_spec.rb' + - 'spec/requests/api/protected_tags_spec.rb' + - 'spec/services/clusters/management/validate_management_project_permissions_service_spec.rb' + - 'spec/services/issuable/bulk_update_service_spec.rb' + - 'spec/services/issues/resolve_discussions_spec.rb' + - 'spec/services/merge_requests/assign_issues_service_spec.rb' + - 'spec/services/projects/fork_service_spec.rb' + - 'spec/support/shared_examples/models/concerns/bulk_users_by_email_load_shared_examples.rb' + - 'spec/support/shared_examples/requests/api/graphql/issue_list_shared_examples.rb' diff --git a/.rubocop_todo/internal_affairs/use_restrict_on_send.yml b/.rubocop_todo/internal_affairs/use_restrict_on_send.yml new file mode 100644 index 00000000000..def67cd71b1 --- /dev/null +++ b/.rubocop_todo/internal_affairs/use_restrict_on_send.yml @@ -0,0 +1,13 @@ +--- +InternalAffairs/UseRestrictOnSend: + Details: grace period + Exclude: + - 'rubocop/cop/gitlab/feature_available_usage.rb' + - 'rubocop/cop/migration/add_concurrent_foreign_key.rb' + - 'rubocop/cop/migration/add_concurrent_index.rb' + - 'rubocop/cop/migration/add_timestamps.rb' + - 'rubocop/cop/migration/background_migrations.rb' + - 'rubocop/cop/migration/remove_concurrent_index.rb' + - 'rubocop/cop/migration/with_lock_retries_with_change.rb' + - 'rubocop/cop/project_path_helper.rb' + - 'rubocop/cop/safe_params.rb' diff --git a/.rubocop_todo/layout/extra_spacing.yml b/.rubocop_todo/layout/extra_spacing.yml new file mode 100644 index 00000000000..6da17195834 --- /dev/null +++ b/.rubocop_todo/layout/extra_spacing.yml @@ -0,0 +1,8 @@ +--- +# Cop supports --autocorrect. +Layout/ExtraSpacing: + Details: grace period + Exclude: + - 'ee/spec/requests/api/debian_project_packages_spec.rb' + - 'spec/serializers/admin/abuse_report_details_entity_spec.rb' + - 'spec/services/bulk_imports/create_service_spec.rb' diff --git a/.rubocop_todo/layout/line_length.yml b/.rubocop_todo/layout/line_length.yml index 44079928518..99d866627d0 100644 --- a/.rubocop_todo/layout/line_length.yml +++ b/.rubocop_todo/layout/line_length.yml @@ -46,7 +46,6 @@ Layout/LineLength: - 'app/controllers/import/bulk_imports_controller.rb' - 'app/controllers/import/fogbugz_controller.rb' - 'app/controllers/import/gitea_controller.rb' - - 'app/controllers/import/gitlab_controller.rb' - 'app/controllers/import/gitlab_groups_controller.rb' - 'app/controllers/import/gitlab_projects_controller.rb' - 'app/controllers/invites_controller.rb' @@ -86,7 +85,6 @@ Layout/LineLength: - 'app/controllers/projects/settings/ci_cd_controller.rb' - 'app/controllers/projects/settings/repository_controller.rb' - 'app/controllers/projects/templates_controller.rb' - - 'app/controllers/projects/tree_controller.rb' - 'app/controllers/projects/triggers_controller.rb' - 'app/controllers/projects/web_ide_schemas_controller.rb' - 'app/controllers/projects_controller.rb' @@ -101,7 +99,6 @@ Layout/LineLength: - 'app/finders/ci/runners_finder.rb' - 'app/finders/clusters/agents/authorizations/ci_access/finder.rb' - 'app/finders/group_descendants_finder.rb' - - 'app/finders/group_members_finder.rb' - 'app/finders/group_projects_finder.rb' - 'app/finders/issuable_finder.rb' - 'app/finders/issuable_finder/params.rb' @@ -154,7 +151,6 @@ Layout/LineLength: - 'app/graphql/mutations/snippets/update.rb' - 'app/graphql/mutations/todos/create.rb' - 'app/graphql/mutations/todos/mark_all_done.rb' - - 'app/graphql/resolvers/concerns/time_frame_arguments.rb' - 'app/graphql/resolvers/container_repository_tags_resolver.rb' - 'app/graphql/resolvers/project_merge_requests_resolver.rb' - 'app/graphql/resolvers/user_discussions_count_resolver.rb' @@ -266,7 +262,6 @@ Layout/LineLength: - 'app/helpers/timeboxes_helper.rb' - 'app/helpers/tree_helper.rb' - 'app/helpers/users_helper.rb' - - 'app/helpers/version_check_helper.rb' - 'app/helpers/visibility_level_helper.rb' - 'app/helpers/whats_new_helper.rb' - 'app/helpers/wiki_helper.rb' @@ -327,14 +322,12 @@ Layout/LineLength: - 'app/models/concerns/protected_ref.rb' - 'app/models/concerns/redis_cacheable.rb' - 'app/models/concerns/restricted_signup.rb' - - 'app/models/concerns/routable.rb' - 'app/models/concerns/shardable.rb' - 'app/models/concerns/sortable.rb' - 'app/models/concerns/storage/legacy_namespace.rb' - 'app/models/concerns/subscribable.rb' - 'app/models/concerns/token_authenticatable_strategies/base.rb' - 'app/models/concerns/token_authenticatable_strategies/encrypted.rb' - - 'app/models/concerns/token_authenticatable_strategies/encryption_helper.rb' - 'app/models/concerns/update_highest_role.rb' - 'app/models/concerns/update_project_statistics.rb' - 'app/models/concerns/x509_serial_number_attribute.rb' @@ -343,7 +336,6 @@ Layout/LineLength: - 'app/models/customer_relations/issue_contact.rb' - 'app/models/deploy_key.rb' - 'app/models/deployment.rb' - - 'app/models/design_management/repository.rb' - 'app/models/diff_note.rb' - 'app/models/environment.rb' - 'app/models/error_tracking/project_error_tracking_setting.rb' @@ -398,7 +390,6 @@ Layout/LineLength: - 'app/models/list.rb' - 'app/models/loose_foreign_keys/modification_tracker.rb' - 'app/models/member.rb' - - 'app/models/members_preloader.rb' - 'app/models/merge_request.rb' - 'app/models/merge_request_assignee.rb' - 'app/models/merge_request_diff.rb' @@ -488,7 +479,6 @@ Layout/LineLength: - 'app/services/ci/create_pipeline_service.rb' - 'app/services/ci/drop_pipeline_service.rb' - 'app/services/ci/generate_coverage_reports_service.rb' - - 'app/services/ci/job_artifacts/destroy_all_expired_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/pipelines/add_job_service.rb' @@ -522,9 +512,7 @@ Layout/LineLength: - 'app/services/emails/create_service.rb' - 'app/services/environments/reset_auto_stop_service.rb' - 'app/services/environments/schedule_to_delete_review_apps_service.rb' - - 'app/services/event_create_service.rb' - 'app/services/feature_flags/update_service.rb' - - 'app/services/git/branch_hooks_service.rb' - 'app/services/git/process_ref_changes_service.rb' - 'app/services/google_cloud/create_service_accounts_service.rb' - 'app/services/google_cloud/generate_pipeline_service.rb' @@ -558,7 +546,6 @@ Layout/LineLength: - 'app/services/lfs/unlock_file_service.rb' - 'app/services/loose_foreign_keys/batch_cleaner_service.rb' - 'app/services/loose_foreign_keys/cleaner_service.rb' - - 'app/services/members/destroy_service.rb' - 'app/services/members/invitation_reminder_email_service.rb' - 'app/services/merge_requests/add_context_service.rb' - 'app/services/merge_requests/assign_issues_service.rb' @@ -579,7 +566,6 @@ Layout/LineLength: - 'app/services/milestones/destroy_service.rb' - 'app/services/namespace_settings/update_service.rb' - 'app/services/notes/build_service.rb' - - 'app/services/notes/quick_actions_service.rb' - 'app/services/notes/resolve_service.rb' - 'app/services/notification_recipients/builder/default.rb' - 'app/services/notification_service.rb' @@ -617,7 +603,6 @@ Layout/LineLength: - 'app/services/projects/hashed_storage/migrate_attachments_service.rb' - 'app/services/projects/hashed_storage/migrate_repository_service.rb' - 'app/services/projects/hashed_storage/rollback_repository_service.rb' - - 'app/services/projects/import_service.rb' - 'app/services/projects/lfs_pointers/lfs_download_service.rb' - 'app/services/projects/operations/update_service.rb' - 'app/services/projects/overwrite_project_service.rb' @@ -630,7 +615,6 @@ Layout/LineLength: - 'app/services/repository_archive_clean_up_service.rb' - 'app/services/resource_access_tokens/create_service.rb' - 'app/services/resource_access_tokens/revoke_service.rb' - - 'app/services/search/global_service.rb' - 'app/services/search_service.rb' - 'app/services/security/ci_configuration/container_scanning_create_service.rb' - 'app/services/security/ci_configuration/dependency_scanning_create_service.rb' @@ -674,8 +658,6 @@ Layout/LineLength: - 'app/workers/container_registry/migration/guard_worker.rb' - 'app/workers/database/batched_background_migration/single_database_worker.rb' - 'app/workers/error_tracking_issue_link_worker.rb' - - 'app/workers/gitlab/github_import/stage/finish_import_worker.rb' - - 'app/workers/gitlab/github_import/stage/import_repository_worker.rb' - 'app/workers/gitlab/import/stuck_import_job.rb' - 'app/workers/gitlab/jira_import/stage/import_attachments_worker.rb' - 'app/workers/gitlab/jira_import/stage/import_labels_worker.rb' @@ -685,13 +667,11 @@ Layout/LineLength: - 'app/workers/issues/rebalancing_worker.rb' - 'app/workers/jira_connect/sync_branch_worker.rb' - 'app/workers/jira_connect/sync_merge_request_worker.rb' - - 'app/workers/jira_connect/sync_project_worker.rb' - 'app/workers/merge_request_mergeability_check_worker.rb' - 'app/workers/object_storage/migrate_uploads_worker.rb' - 'app/workers/packages/maven/metadata/sync_worker.rb' - 'app/workers/pipeline_metrics_worker.rb' - 'app/workers/repository_fork_worker.rb' - - 'app/workers/repository_import_worker.rb' - 'app/workers/ssh_keys/expired_notification_worker.rb' - 'config/application.rb' - 'config/initializers/00_rails_disable_joins.rb' @@ -717,7 +697,6 @@ Layout/LineLength: - 'config/initializers/validate_database_config.rb' - 'config/initializers/validate_puma.rb' - 'config/initializers/zz_metrics.rb' - - 'config/object_store_settings.rb' - 'config/puma.rb' - 'config/routes.rb' - 'config/routes/admin.rb' @@ -736,14 +715,6 @@ Layout/LineLength: - 'danger/roulette/Dangerfile' - 'danger/vue_shared_documentation/Dangerfile' - 'danger/z_metadata/Dangerfile' - - 'db/migrate/20220314184209_add_group_fk_to_protected_environment_approval_rules.rb' - - 'db/migrate/20220314204009_add_approval_rule_fk_to_deployment_approvals.rb' - - 'db/post_migrate/20220315171027_add_tmp_index_to_support_leaky_regex_cleanup.rb' - - 'db/post_migrate/20220316102902_add_user_foreign_key_to_deploy_tokens.rb' - - 'db/post_migrate/20220317161914_remove_ci_runners_ci_builds_runner_id_fk.rb' - - 'db/post_migrate/20220318111729_cleanup_after_fixing_issue_when_admin_changed_primary_email.rb' - - 'db/post_migrate/20220322205008_change_search_rate_limit_values.rb' - - 'db/post_migrate/20220323130000_add_temp_index_on_null_project_namespace_ids.rb' - 'ee/app/controllers/admin/elasticsearch_controller.rb' - 'ee/app/controllers/admin/geo/application_controller.rb' - 'ee/app/controllers/admin/geo/projects_controller.rb' @@ -780,7 +751,6 @@ Layout/LineLength: - 'ee/app/controllers/projects/requirements_management/requirements_controller.rb' - 'ee/app/controllers/projects/security/policies_controller.rb' - 'ee/app/controllers/projects/security/vulnerabilities/notes_controller.rb' - - 'ee/app/controllers/subscriptions_controller.rb' - 'ee/app/enums/vulnerabilities/dismissal_reason_enum.rb' - 'ee/app/finders/compliance_management/merge_requests/compliance_violations_finder.rb' - 'ee/app/finders/incident_management/escalation_rules_finder.rb' @@ -872,7 +842,6 @@ Layout/LineLength: - 'ee/app/helpers/billing_plans_helper.rb' - 'ee/app/helpers/ee/application_helper.rb' - 'ee/app/helpers/ee/button_helper.rb' - - 'ee/app/helpers/ee/feature_flags_helper.rb' - 'ee/app/helpers/ee/geo_helper.rb' - 'ee/app/helpers/ee/groups/settings_helper.rb' - 'ee/app/helpers/ee/groups_helper.rb' @@ -994,7 +963,6 @@ Layout/LineLength: - 'ee/app/models/vulnerabilities/read.rb' - 'ee/app/models/vulnerabilities/remediation.rb' - 'ee/app/models/vulnerabilities/scanner.rb' - - 'ee/app/models/vulnerabilities/stat_diff.rb' - 'ee/app/policies/ee/group_policy.rb' - 'ee/app/policies/ee/identity_provider_policy.rb' - 'ee/app/policies/ee/project_policy.rb' @@ -1005,7 +973,6 @@ Layout/LineLength: - 'ee/app/serializers/ee/merge_request_poll_widget_entity.rb' - 'ee/app/serializers/ee/merge_request_user_entity.rb' - 'ee/app/serializers/ee/merge_request_widget_entity.rb' - - 'ee/app/serializers/ee/note_user_entity.rb' - 'ee/app/serializers/ee/user_entity.rb' - 'ee/app/serializers/vulnerabilities/feedback_entity.rb' - 'ee/app/services/analytics/cycle_analytics/consistency_check_service.rb' @@ -1033,7 +1000,6 @@ Layout/LineLength: - 'ee/app/services/boards/epics/move_service.rb' - 'ee/app/services/ci/compare_security_reports_service.rb' - 'ee/app/services/ci/minutes/track_live_consumption_service.rb' - - 'ee/app/services/ci/sync_reports_to_approval_rules_service.rb' - 'ee/app/services/compliance_management/frameworks/create_service.rb' - 'ee/app/services/compliance_management/merge_requests/create_compliance_violations_service.rb' - 'ee/app/services/concerns/incident_management/oncall_rotations/shared_rotation_logic.rb' @@ -1049,7 +1015,6 @@ Layout/LineLength: - 'ee/app/services/ee/ci/register_job_service.rb' - 'ee/app/services/ee/ci/retry_pipeline_service.rb' - 'ee/app/services/ee/groups/autocomplete_service.rb' - - 'ee/app/services/ee/groups/create_service.rb' - 'ee/app/services/ee/groups/deploy_tokens/create_service.rb' - 'ee/app/services/ee/groups/deploy_tokens/destroy_service.rb' - 'ee/app/services/ee/groups/deploy_tokens/revoke_service.rb' @@ -1127,7 +1092,6 @@ Layout/LineLength: - 'ee/app/services/security/report_summary_service.rb' - 'ee/app/services/security/scanned_resources_counting_service.rb' - 'ee/app/services/security/scanned_resources_service.rb' - - 'ee/app/services/security/security_orchestration_policies/fetch_policy_approvers_service.rb' - 'ee/app/services/security/security_orchestration_policies/on_demand_scan_pipeline_configuration_service.rb' - 'ee/app/services/security/security_orchestration_policies/policy_commit_service.rb' - 'ee/app/services/security/security_orchestration_policies/policy_configuration_validation_service.rb' @@ -1140,7 +1104,6 @@ Layout/LineLength: - 'ee/app/services/start_pull_mirroring_service.rb' - 'ee/app/services/system_notes/escalations_service.rb' - 'ee/app/services/timebox_report_service.rb' - - 'ee/app/services/vulnerabilities/base_service.rb' - 'ee/app/services/vulnerabilities/historical_statistics/adjustment_service.rb' - 'ee/app/services/vulnerabilities/revert_to_detected_service.rb' - 'ee/app/services/vulnerabilities/statistics/adjustment_service.rb' @@ -1163,7 +1126,6 @@ Layout/LineLength: - 'ee/app/workers/geo/batch/project_registry_scheduler_worker.rb' - 'ee/app/workers/geo/batch/project_registry_worker.rb' - 'ee/app/workers/geo/destroy_worker.rb' - - 'ee/app/workers/geo/file_registry_removal_worker.rb' - 'ee/app/workers/geo/repositories_clean_up_worker.rb' - 'ee/app/workers/geo/repository_shard_sync_worker.rb' - 'ee/app/workers/geo/repository_verification/secondary/shard_worker.rb' @@ -1222,7 +1184,6 @@ Layout/LineLength: - 'ee/lib/api/resource_iteration_events.rb' - 'ee/lib/api/status_checks.rb' - 'ee/lib/api/vulnerability_issue_links.rb' - - 'ee/lib/banzai/filter/references/iteration_reference_filter.rb' - 'ee/lib/ee/api/deployments.rb' - 'ee/lib/ee/api/entities/application_setting.rb' - 'ee/lib/ee/api/entities/dependency.rb' @@ -1233,8 +1194,6 @@ Layout/LineLength: - 'ee/lib/ee/api/entities/namespace.rb' - 'ee/lib/ee/api/entities/project.rb' - 'ee/lib/ee/api/entities/project_approval_rule.rb' - - 'ee/lib/ee/api/entities/user_basic.rb' - - 'ee/lib/ee/api/entities/user_path.rb' - 'ee/lib/ee/api/geo.rb' - 'ee/lib/ee/api/helpers/groups_helpers.rb' - 'ee/lib/ee/api/helpers/issues_helpers.rb' @@ -1302,7 +1261,6 @@ Layout/LineLength: - 'ee/lib/gitlab/analytics/cycle_analytics/summary/base_time.rb' - 'ee/lib/gitlab/analytics/cycle_analytics/summary/group/deployment_frequency.rb' - 'ee/lib/gitlab/auth/group_saml/response_check.rb' - - 'ee/lib/gitlab/auth/group_saml/session_enforcer.rb' - 'ee/lib/gitlab/auth/group_saml/user.rb' - 'ee/lib/gitlab/auth/group_saml/xml_response.rb' - 'ee/lib/gitlab/authority_analyzer.rb' @@ -1340,7 +1298,6 @@ Layout/LineLength: - 'ee/lib/gitlab/status_page/storage/s3_client.rb' - 'ee/lib/gitlab/usage/metrics/instrumentations/approval_project_rules_with_user_metric.rb' - 'ee/lib/gitlab/usage/metrics/instrumentations/count_ci_builds_metric.rb' - - 'ee/lib/gitlab/usage/metrics/instrumentations/count_users_creating_ci_builds_metric.rb' - 'ee/lib/gitlab/usage/metrics/instrumentations/license_metric.rb' - 'ee/lib/gitlab/usage_data_counters/license_testing_counter.rb' - 'ee/lib/system_check/geo/authorized_keys_check.rb' @@ -1352,7 +1309,6 @@ Layout/LineLength: - 'ee/lib/tasks/gitlab/elastic/test.rake' - 'ee/lib/tasks/gitlab/seed/metrics.rake' - 'ee/lib/world.rb' - - 'ee/spec/config/metrics/every_metric_definition_spec.rb' - 'ee/spec/controllers/admin/elasticsearch_controller_spec.rb' - 'ee/spec/controllers/admin/geo/projects_controller_spec.rb' - 'ee/spec/controllers/admin/impersonations_controller_spec.rb' @@ -1486,7 +1442,6 @@ Layout/LineLength: - 'ee/spec/features/projects/settings/ee/service_desk_setting_spec.rb' - 'ee/spec/features/projects/settings/issues_settings_spec.rb' - 'ee/spec/features/projects/settings/merge_requests_settings_spec.rb' - - 'ee/spec/features/projects/settings/protected_environments_spec.rb' - 'ee/spec/features/projects/user_applies_custom_file_template_spec.rb' - 'ee/spec/features/projects_spec.rb' - 'ee/spec/features/promotion_spec.rb' @@ -1545,7 +1500,6 @@ Layout/LineLength: - 'ee/spec/graphql/ee/types/board_type_spec.rb' - 'ee/spec/graphql/ee/types/issue_sort_enum_spec.rb' - 'ee/spec/graphql/ee/types/merge_request_type_spec.rb' - - 'ee/spec/graphql/mutations/boards/epic_boards/create_spec.rb' - 'ee/spec/graphql/mutations/boards/epics/create_spec.rb' - 'ee/spec/graphql/mutations/boards/lists/update_limit_metrics_spec.rb' - 'ee/spec/graphql/mutations/compliance_management/frameworks/update_spec.rb' @@ -1594,7 +1548,6 @@ Layout/LineLength: - 'ee/spec/graphql/resolvers/security_report_summary_resolver_spec.rb' - 'ee/spec/graphql/resolvers/timebox_report_resolver_spec.rb' - 'ee/spec/graphql/resolvers/vulnerabilities/details_resolver_spec.rb' - - 'ee/spec/graphql/resolvers/vulnerabilities/issue_links_resolver_spec.rb' - 'ee/spec/graphql/resolvers/vulnerabilities/scanners_resolver_spec.rb' - 'ee/spec/graphql/resolvers/vulnerabilities_count_per_day_resolver_spec.rb' - 'ee/spec/graphql/resolvers/vulnerabilities_resolver_spec.rb' @@ -1607,7 +1560,6 @@ Layout/LineLength: - 'ee/spec/graphql/types/epic_sort_enum_spec.rb' - 'ee/spec/graphql/types/incident_management/escalation_rule_input_type_spec.rb' - 'ee/spec/graphql/types/issue_type_spec.rb' - - 'ee/spec/graphql/types/permission_types/vulnerability_spec.rb' - 'ee/spec/graphql/types/project_type_spec.rb' - 'ee/spec/graphql/types/security_scanner_type_enum_spec.rb' - 'ee/spec/graphql/types/vulnerability_details/file_location_type_spec.rb' @@ -1630,7 +1582,6 @@ Layout/LineLength: - 'ee/spec/helpers/ee/groups/group_members_helper_spec.rb' - 'ee/spec/helpers/ee/groups_helper_spec.rb' - 'ee/spec/helpers/ee/integrations_helper_spec.rb' - - 'ee/spec/helpers/ee/issuables_helper_spec.rb' - 'ee/spec/helpers/ee/issues_helper_spec.rb' - 'ee/spec/helpers/ee/lock_helper_spec.rb' - 'ee/spec/helpers/ee/operations_helper_spec.rb' @@ -1640,7 +1591,6 @@ Layout/LineLength: - 'ee/spec/helpers/ee/projects/security/dast_configuration_helper_spec.rb' - 'ee/spec/helpers/ee/subscribable_banner_helper_spec.rb' - 'ee/spec/helpers/ee/users/callouts_helper_spec.rb' - - 'ee/spec/helpers/ee/version_check_helper_spec.rb' - 'ee/spec/helpers/epics_helper_spec.rb' - 'ee/spec/helpers/gitlab_subscriptions/upcoming_reconciliation_helper_spec.rb' - 'ee/spec/helpers/groups/security_features_helper_spec.rb' @@ -1679,8 +1629,6 @@ Layout/LineLength: - 'ee/spec/lib/ee/gitlab/background_migration/backfill_iteration_cadence_id_for_boards_spec.rb' - 'ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_check_progress_spec.rb' - 'ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_spec.rb' - - 'ee/spec/lib/ee/gitlab/background_migration/populate_latest_pipeline_ids_spec.rb' - - 'ee/spec/lib/ee/gitlab/background_migration/populate_resolved_on_default_branch_column_spec.rb' - 'ee/spec/lib/ee/gitlab/checks/push_rule_check_spec.rb' - 'ee/spec/lib/ee/gitlab/checks/push_rules/branch_check_spec.rb' - 'ee/spec/lib/ee/gitlab/checks/push_rules/commit_check_spec.rb' @@ -1689,7 +1637,6 @@ Layout/LineLength: - 'ee/spec/lib/ee/gitlab/ci/parsers/security/common_spec.rb' - 'ee/spec/lib/ee/gitlab/ci/parsers/security/validators/schema_validator_spec.rb' - 'ee/spec/lib/ee/gitlab/ci/pipeline/chain/validate/security_orchestration_policy_spec.rb' - - 'ee/spec/lib/ee/gitlab/ci/reports/security/reports_spec.rb' - 'ee/spec/lib/ee/gitlab/ci/status/build/manual_spec.rb' - 'ee/spec/lib/ee/gitlab/elastic/helper_spec.rb' - 'ee/spec/lib/ee/gitlab/email/handler/service_desk_handler_spec.rb' @@ -1700,7 +1647,6 @@ Layout/LineLength: - 'ee/spec/lib/ee/gitlab/import_export/wiki_repo_saver_spec.rb' - 'ee/spec/lib/ee/gitlab/repo_path_spec.rb' - 'ee/spec/lib/ee/gitlab/repository_size_checker_spec.rb' - - 'ee/spec/lib/ee/gitlab/security/scan_configuration_spec.rb' - 'ee/spec/lib/ee/gitlab/url_builder_spec.rb' - 'ee/spec/lib/ee/gitlab/usage/service_ping/payload_keys_processor_spec.rb' - 'ee/spec/lib/ee/gitlab/usage_data_counters/hll_redis_counter_spec.rb' @@ -1721,7 +1667,6 @@ Layout/LineLength: - 'ee/spec/lib/gitlab/analytics/cycle_analytics/data_collector_spec.rb' - 'ee/spec/lib/gitlab/analytics/cycle_analytics/data_for_duration_chart_spec.rb' - 'ee/spec/lib/gitlab/analytics/cycle_analytics/distinct_stage_loader_spec.rb' - - 'ee/spec/lib/gitlab/analytics/cycle_analytics/request_params_spec.rb' - 'ee/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_first_associated_with_milestone_spec.rb' - 'ee/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_label_added_spec.rb' - 'ee/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_label_removed_spec.rb' @@ -1946,7 +1891,6 @@ Layout/LineLength: - 'ee/spec/models/project_import_state_spec.rb' - 'ee/spec/models/project_member_spec.rb' - 'ee/spec/models/project_security_setting_spec.rb' - - 'ee/spec/models/protected_branch/unprotect_access_level_spec.rb' - 'ee/spec/models/protected_environment_spec.rb' - 'ee/spec/models/protected_environments/approval_rule_spec.rb' - 'ee/spec/models/release_highlight_spec.rb' @@ -2085,7 +2029,6 @@ Layout/LineLength: - 'ee/spec/requests/api/ldap_group_links_spec.rb' - 'ee/spec/requests/api/license_spec.rb' - 'ee/spec/requests/api/members_spec.rb' - - 'ee/spec/requests/api/merge_request_approval_rules_spec.rb' - 'ee/spec/requests/api/merge_request_approvals_spec.rb' - 'ee/spec/requests/api/merge_requests_spec.rb' - 'ee/spec/requests/api/namespaces_spec.rb' @@ -2247,7 +2190,6 @@ Layout/LineLength: - 'ee/spec/services/geo/framework_repository_sync_service_spec.rb' - 'ee/spec/services/geo/hashed_storage_attachments_event_store_spec.rb' - 'ee/spec/services/geo/hashed_storage_migration_service_spec.rb' - - 'ee/spec/services/geo/metrics_update_service_spec.rb' - 'ee/spec/services/geo/project_housekeeping_service_spec.rb' - 'ee/spec/services/geo/rename_repository_service_spec.rb' - 'ee/spec/services/geo/repository_destroy_service_spec.rb' @@ -2349,7 +2291,6 @@ Layout/LineLength: - 'ee/spec/services/todo_service_spec.rb' - 'ee/spec/services/user_permissions/export_service_spec.rb' - 'ee/spec/services/vulnerabilities/dismiss_service_spec.rb' - - 'ee/spec/services/vulnerabilities/finding_dismiss_service_spec.rb' - 'ee/spec/services/vulnerabilities/historical_statistics/adjustment_service_spec.rb' - 'ee/spec/services/vulnerabilities/manually_create_service_spec.rb' - 'ee/spec/services/vulnerabilities/revert_to_detected_service_spec.rb' @@ -2363,9 +2304,7 @@ Layout/LineLength: - 'ee/spec/services/vulnerability_feedback/create_service_spec.rb' - 'ee/spec/services/vulnerability_feedback/destroy_service_spec.rb' - 'ee/spec/services/vulnerability_scanners/list_service_spec.rb' - - 'ee/spec/services/wiki_pages/create_service_spec.rb' - 'ee/spec/services/wiki_pages/destroy_service_spec.rb' - - 'ee/spec/services/wiki_pages/update_service_spec.rb' - 'ee/spec/support/features/redacted_search_results_examples.rb' - 'ee/spec/support/helpers/search_results_helpers.rb' - 'ee/spec/support/helpers/subscription_portal_helpers.rb' @@ -2381,7 +2320,6 @@ Layout/LineLength: - 'ee/spec/support/shared_examples/controllers/analytics/cycle_analytics/shared_stage_shared_examples.rb' - 'ee/spec/support/shared_examples/controllers/concerns/description_diff_actions_shared_examples.rb' - 'ee/spec/support/shared_examples/features/epics_filtered_search_shared_examples.rb' - - 'ee/spec/support/shared_examples/features/protected_branches_access_control_shared_examples.rb' - 'ee/spec/support/shared_examples/features/sidebar_shared_examples.rb' - 'ee/spec/support/shared_examples/finders/geo/file_registry_finder_shared_examples.rb' - 'ee/spec/support/shared_examples/finders/geo/registry_finder_shared_examples.rb' @@ -2449,7 +2387,6 @@ Layout/LineLength: - 'ee/spec/workers/concerns/elastic/indexing_control_spec.rb' - 'ee/spec/workers/elastic/migration_worker_spec.rb' - 'ee/spec/workers/elastic_association_indexer_worker_spec.rb' - - 'ee/spec/workers/elastic_commit_indexer_worker_spec.rb' - 'ee/spec/workers/geo/batch/project_registry_scheduler_worker_spec.rb' - 'ee/spec/workers/geo/destroy_worker_spec.rb' - 'ee/spec/workers/geo/project_sync_worker_spec.rb' @@ -2472,7 +2409,6 @@ Layout/LineLength: - 'ee/spec/workers/iterations_update_status_worker_spec.rb' - 'ee/spec/workers/merge_request_reset_approvals_worker_spec.rb' - 'ee/spec/workers/new_epic_worker_spec.rb' - - 'ee/spec/workers/refresh_license_compliance_checks_worker_spec.rb' - 'ee/spec/workers/repository_import_worker_spec.rb' - 'ee/spec/workers/security/orchestration_policy_rule_schedule_namespace_worker_spec.rb' - 'ee/spec/workers/security/orchestration_policy_rule_schedule_worker_spec.rb' @@ -2500,7 +2436,6 @@ Layout/LineLength: - 'lib/api/concerns/packages/conan_endpoints.rb' - 'lib/api/concerns/packages/debian_distribution_endpoints.rb' - 'lib/api/concerns/packages/debian_package_endpoints.rb' - - 'lib/api/concerns/packages/nuget_endpoints.rb' - 'lib/api/debian_group_packages.rb' - 'lib/api/debian_project_packages.rb' - 'lib/api/deploy_keys.rb' @@ -2548,7 +2483,6 @@ Layout/LineLength: - 'lib/api/internal/base.rb' - 'lib/api/internal/kubernetes.rb' - 'lib/api/internal/mail_room.rb' - - 'lib/api/internal/pages.rb' - 'lib/api/invitations.rb' - 'lib/api/issues.rb' - 'lib/api/lint.rb' @@ -2593,7 +2527,6 @@ Layout/LineLength: - 'lib/api/templates.rb' - 'lib/api/terraform/modules/v1/packages.rb' - 'lib/api/terraform/state.rb' - - 'lib/api/time_tracking_endpoints.rb' - 'lib/api/todos.rb' - 'lib/api/users.rb' - 'lib/api/wikis.rb' @@ -2604,7 +2537,6 @@ Layout/LineLength: - 'lib/backup/gitaly_backup.rb' - 'lib/backup/manager.rb' - 'lib/banzai/filter/autolink_filter.rb' - - 'lib/banzai/filter/inline_diff_filter.rb' - 'lib/banzai/filter/markdown_post_escape_filter.rb' - 'lib/banzai/filter/references/external_issue_reference_filter.rb' - 'lib/banzai/filter/references/issue_reference_filter.rb' @@ -2637,7 +2569,6 @@ Layout/LineLength: - 'lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher.rb' - 'lib/gitlab/analytics/cycle_analytics/aggregated/stage_query_helpers.rb' - 'lib/gitlab/analytics/cycle_analytics/base_query_builder.rb' - - 'lib/gitlab/analytics/cycle_analytics/request_params.rb' - 'lib/gitlab/analytics/cycle_analytics/stage_events.rb' - 'lib/gitlab/analytics/cycle_analytics/stage_events/issue_deployed_to_production.rb' - 'lib/gitlab/analytics/cycle_analytics/stage_events/issue_stage_end.rb' @@ -2652,7 +2583,6 @@ Layout/LineLength: - 'lib/gitlab/auth/ldap/adapter.rb' - 'lib/gitlab/auth/ldap/dn.rb' - 'lib/gitlab/auth/ldap/person.rb' - - 'lib/gitlab/auth/o_auth/session.rb' - 'lib/gitlab/auth/o_auth/user.rb' - 'lib/gitlab/auth/saml/auth_hash.rb' - 'lib/gitlab/auth/user_access_denied_reason.rb' @@ -2670,7 +2600,6 @@ Layout/LineLength: - 'lib/gitlab/background_migration/migrate_requirements_to_work_items.rb' - 'lib/gitlab/background_migration/populate_resolved_on_default_branch_column.rb' - 'lib/gitlab/background_migration/project_namespaces/backfill_project_namespaces.rb' - - 'lib/gitlab/background_migration/reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb' - 'lib/gitlab/bitbucket_import/importer.rb' - 'lib/gitlab/bitbucket_server_import/importer.rb' - 'lib/gitlab/buffered_io.rb' @@ -2714,7 +2643,6 @@ Layout/LineLength: - 'lib/gitlab/ci/runner_releases.rb' - 'lib/gitlab/ci/runner_upgrade_check.rb' - 'lib/gitlab/ci/status/build/manual.rb' - - 'lib/gitlab/ci/status/build/waiting_for_approval.rb' - 'lib/gitlab/ci/variables/builder.rb' - 'lib/gitlab/cleanup/project_uploads.rb' - 'lib/gitlab/composer/version_index.rb' @@ -2762,7 +2690,6 @@ Layout/LineLength: - 'lib/gitlab/database/similarity_score.rb' - 'lib/gitlab/database/with_lock_retries.rb' - 'lib/gitlab/database/with_lock_retries_outside_transaction.rb' - - 'lib/gitlab/database_importers/instance_administrators/create_group.rb' - 'lib/gitlab/dependency_linker/base_linker.rb' - 'lib/gitlab/dependency_linker/go_mod_linker.rb' - 'lib/gitlab/dependency_linker/go_sum_linker.rb' @@ -2836,7 +2763,6 @@ Layout/LineLength: - 'lib/gitlab/import_export/base/object_builder.rb' - 'lib/gitlab/import_export/base/relation_factory.rb' - 'lib/gitlab/import_export/base/relation_object_saver.rb' - - 'lib/gitlab/import_export/file_importer.rb' - 'lib/gitlab/import_export/group/relation_tree_restorer.rb' - 'lib/gitlab/import_export/importer.rb' - 'lib/gitlab/import_export/json/streaming_serializer.rb' @@ -2848,7 +2774,6 @@ Layout/LineLength: - 'lib/gitlab/import_export/snippet_repo_restorer.rb' - 'lib/gitlab/import_export/version_checker.rb' - 'lib/gitlab/instrumentation/redis_base.rb' - - 'lib/gitlab/instrumentation_helper.rb' - 'lib/gitlab/issues/rebalancing/state.rb' - 'lib/gitlab/jira/http_client.rb' - 'lib/gitlab/jira_import.rb' @@ -2901,9 +2826,7 @@ Layout/LineLength: - 'lib/gitlab/quick_actions/issue_actions.rb' - 'lib/gitlab/quick_actions/issue_and_merge_request_actions.rb' - 'lib/gitlab/quick_actions/merge_request_actions.rb' - - 'lib/gitlab/quick_actions/relate_actions.rb' - 'lib/gitlab/rack_attack.rb' - - 'lib/gitlab/redis/wrapper.rb' - 'lib/gitlab/regex.rb' - 'lib/gitlab/relative_positioning/item_context.rb' - 'lib/gitlab/repository_size_error_message.rb' @@ -2947,9 +2870,7 @@ Layout/LineLength: - 'lib/gitlab/utils/override.rb' - 'lib/gitlab/utils/usage_data.rb' - 'lib/gitlab/webpack/manifest.rb' - - 'lib/gitlab/wiki_pages/front_matter_parser.rb' - 'lib/gitlab/word_diff/parser.rb' - - 'lib/gitlab/x509/tag.rb' - 'lib/google_api/cloud_platform/client.rb' - 'lib/peek/views/memory.rb' - 'lib/quality/seeders/issues.rb' @@ -2989,7 +2910,6 @@ Layout/LineLength: - 'lib/tasks/migrate/schema_check.rake' - 'lib/tasks/tanuki_emoji.rake' - 'lib/tasks/test.rake' - - 'lib/uploaded_file.rb' - 'qa/qa/ee/page/group/secure/show.rb' - 'qa/qa/ee/page/group/settings/general.rb' - 'qa/qa/ee/page/group/settings/saml_sso.rb' @@ -3010,7 +2930,6 @@ Layout/LineLength: - 'qa/qa/page/project/registry/show.rb' - 'qa/qa/page/project/settings/protected_branches.rb' - 'qa/qa/page/project/web_ide/edit.rb' - - 'qa/qa/resource/api_fabricator.rb' - 'qa/qa/resource/file.rb' - 'qa/qa/resource/protected_branch.rb' - 'qa/qa/resource/registry_repository.rb' @@ -3037,14 +2956,12 @@ Layout/LineLength: - 'qa/qa/specs/features/api/3_create/repository/push_postreceive_idempotent_spec.rb' - 'qa/qa/specs/features/api/3_create/snippet/snippet_repository_storage_move_spec.rb' - 'qa/qa/specs/features/api/4_verify/cancel_pipeline_when_block_user_spec.rb' - - 'qa/qa/specs/features/api/5_package/container_registry_spec.rb' - 'qa/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb' - 'qa/qa/specs/features/browser_ui/1_manage/login/2fa_ssh_recovery_spec.rb' - 'qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb' - 'qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb' - 'qa/qa/specs/features/browser_ui/1_manage/login/log_into_gitlab_via_ldap_spec.rb' - 'qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb' - - 'qa/qa/specs/features/browser_ui/1_manage/login/maintain_log_in_mixed_env_spec.rb' - 'qa/qa/specs/features/browser_ui/1_manage/login/register_spec.rb' - 'qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb' - 'qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb' @@ -3095,13 +3012,10 @@ Layout/LineLength: - 'qa/qa/specs/features/browser_ui/4_verify/pipeline/include_multiple_files_from_a_project_spec.rb' - '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/pass_dotenv_variables_to_downstream_via_bridge_spec.rb' - - 'qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_editor_branch_switcher_spec.rb' - 'qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_matrix_spec.rb' - 'qa/qa/specs/features/browser_ui/4_verify/pipeline/update_ci_file_with_pipeline_editor_spec.rb' - 'qa/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb' - 'qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb' - - 'qa/qa/specs/features/browser_ui/5_package/container_registry/container_registry_spec.rb' - - 'qa/qa/specs/features/browser_ui/5_package/container_registry/online_garbage_collection_spec.rb' - 'qa/qa/specs/features/browser_ui/5_package/package_registry/composer_registry_spec.rb' - 'qa/qa/specs/features/browser_ui/5_package/package_registry/conan_repository_spec.rb' - 'qa/qa/specs/features/browser_ui/5_package/package_registry/generic_repository_spec.rb' @@ -3145,9 +3059,7 @@ Layout/LineLength: - 'qa/qa/specs/features/ee/browser_ui/3_create/merge_request/approval_rules_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/3_create/merge_request/default_merge_request_template_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/assign_code_owners_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/code_owners_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/code_owners_with_protected_branch_and_squashed_commits_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/file_locking_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/merge_with_code_owner_in_root_group_spec.rb' - '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' @@ -3157,7 +3069,6 @@ Layout/LineLength: - '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' - 'qa/qa/specs/features/ee/browser_ui/5_package/dependency_proxy_sso_spec.rb' - - 'qa/qa/specs/helpers/context_selector.rb' - 'qa/qa/specs/parallel_runner.rb' - 'qa/qa/support/run.rb' - 'qa/qa/support/ssh.rb' @@ -3215,14 +3126,12 @@ Layout/LineLength: - 'spec/controllers/concerns/check_rate_limit_spec.rb' - 'spec/controllers/concerns/confirm_email_warning_spec.rb' - 'spec/controllers/concerns/metrics_dashboard_spec.rb' - - 'spec/controllers/concerns/product_analytics_tracking_spec.rb' - 'spec/controllers/concerns/send_file_upload_spec.rb' - 'spec/controllers/concerns/sourcegraph_decorator_spec.rb' - 'spec/controllers/concerns/spammable_actions/akismet_mark_as_spam_action_spec.rb' - 'spec/controllers/concerns/static_object_external_storage_spec.rb' - 'spec/controllers/dashboard/milestones_controller_spec.rb' - 'spec/controllers/dashboard/projects_controller_spec.rb' - - 'spec/controllers/every_controller_spec.rb' - 'spec/controllers/explore/projects_controller_spec.rb' - 'spec/controllers/groups/children_controller_spec.rb' - 'spec/controllers/groups/clusters_controller_spec.rb' @@ -3231,7 +3140,6 @@ Layout/LineLength: - 'spec/controllers/groups/milestones_controller_spec.rb' - 'spec/controllers/groups/releases_controller_spec.rb' - 'spec/controllers/groups/settings/applications_controller_spec.rb' - - 'spec/controllers/groups/settings/integrations_controller_spec.rb' - 'spec/controllers/groups_controller_spec.rb' - 'spec/controllers/import/bitbucket_controller_spec.rb' - 'spec/controllers/import/bitbucket_server_controller_spec.rb' @@ -3246,7 +3154,6 @@ Layout/LineLength: - 'spec/controllers/passwords_controller_spec.rb' - 'spec/controllers/profiles/accounts_controller_spec.rb' - 'spec/controllers/profiles/notifications_controller_spec.rb' - - 'spec/controllers/profiles/webauthn_registrations_controller_spec.rb' - 'spec/controllers/profiles_controller_spec.rb' - 'spec/controllers/projects/alerting/notifications_controller_spec.rb' - 'spec/controllers/projects/analytics/cycle_analytics/summary_controller_spec.rb' @@ -3347,7 +3254,6 @@ Layout/LineLength: - 'spec/features/commits_spec.rb' - 'spec/features/contextual_sidebar_spec.rb' - 'spec/features/cycle_analytics_spec.rb' - - 'spec/features/dashboard/issues_spec.rb' - 'spec/features/dashboard/projects_spec.rb' - 'spec/features/dashboard/todos/todos_spec.rb' - 'spec/features/dashboard/user_filters_projects_spec.rb' @@ -3397,7 +3303,6 @@ Layout/LineLength: - 'spec/features/labels_hierarchy_spec.rb' - 'spec/features/markdown/copy_as_gfm_spec.rb' - 'spec/features/markdown/gitlab_flavored_markdown_spec.rb' - - 'spec/features/markdown/metrics_spec.rb' - 'spec/features/merge_request/batch_comments_spec.rb' - 'spec/features/merge_request/user_accepts_merge_request_spec.rb' - 'spec/features/merge_request/user_allows_commits_from_memebers_who_can_merge_spec.rb' @@ -3541,7 +3446,6 @@ Layout/LineLength: - 'spec/finders/environments/environments_by_deployments_finder_spec.rb' - 'spec/finders/environments/environments_finder_spec.rb' - 'spec/finders/events_finder_spec.rb' - - 'spec/finders/fork_targets_finder_spec.rb' - 'spec/finders/group_descendants_finder_spec.rb' - 'spec/finders/group_members_finder_spec.rb' - 'spec/finders/group_projects_finder_spec.rb' @@ -3683,7 +3587,6 @@ Layout/LineLength: - 'spec/helpers/environments_helper_spec.rb' - 'spec/helpers/events_helper_spec.rb' - 'spec/helpers/external_link_helper_spec.rb' - - 'spec/helpers/feature_flags_helper_spec.rb' - 'spec/helpers/gitlab_routing_helper_spec.rb' - 'spec/helpers/gitlab_script_tag_helper_spec.rb' - 'spec/helpers/groups/group_members_helper_spec.rb' @@ -3754,9 +3657,7 @@ Layout/LineLength: - 'spec/lib/banzai/filter/external_link_filter_spec.rb' - 'spec/lib/banzai/filter/gollum_tags_filter_spec.rb' - 'spec/lib/banzai/filter/image_link_filter_spec.rb' - - 'spec/lib/banzai/filter/inline_alert_metrics_filter_spec.rb' - 'spec/lib/banzai/filter/inline_diff_filter_spec.rb' - - 'spec/lib/banzai/filter/inline_metrics_filter_spec.rb' - 'spec/lib/banzai/filter/kroki_filter_spec.rb' - 'spec/lib/banzai/filter/math_filter_spec.rb' - 'spec/lib/banzai/filter/mermaid_filter_spec.rb' @@ -3842,22 +3743,11 @@ Layout/LineLength: - 'spec/lib/gitlab/auth/user_access_denied_reason_spec.rb' - 'spec/lib/gitlab/auth_spec.rb' - 'spec/lib/gitlab/authorized_keys_spec.rb' - - 'spec/lib/gitlab/background_migration/backfill_issue_search_data_spec.rb' - - 'spec/lib/gitlab/background_migration/backfill_member_namespace_for_group_members_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_project_repositories_spec.rb' - - 'spec/lib/gitlab/background_migration/backfill_snippet_repositories_spec.rb' - - 'spec/lib/gitlab/background_migration/batching_strategies/backfill_project_namespace_per_group_batching_strategy_spec.rb' - 'spec/lib/gitlab/background_migration/batching_strategies/primary_key_batching_strategy_spec.rb' - 'spec/lib/gitlab/background_migration/copy_column_using_background_migration_job_spec.rb' - - 'spec/lib/gitlab/background_migration/fix_duplicate_project_name_and_path_spec.rb' - - 'spec/lib/gitlab/background_migration/fix_vulnerability_occurrences_with_hashes_as_raw_metadata_spec.rb' - 'spec/lib/gitlab/background_migration/job_coordinator_spec.rb' - 'spec/lib/gitlab/background_migration/legacy_upload_mover_spec.rb' - - 'spec/lib/gitlab/background_migration/migrate_personal_namespace_project_maintainer_to_owner_spec.rb' - - 'spec/lib/gitlab/background_migration/populate_container_repository_migration_plan_spec.rb' - - 'spec/lib/gitlab/background_migration/project_namespaces/backfill_project_namespaces_spec.rb' - - 'spec/lib/gitlab/background_migration/remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings_spec.rb' - - 'spec/lib/gitlab/background_migration/remove_vulnerability_finding_links_spec.rb' - 'spec/lib/gitlab/background_migration/update_jira_tracker_data_deployment_type_based_on_url_spec.rb' - 'spec/lib/gitlab/bitbucket_import/importer_spec.rb' - 'spec/lib/gitlab/bitbucket_server_import/importer_spec.rb' @@ -3875,13 +3765,11 @@ Layout/LineLength: - 'spec/lib/gitlab/ci/badge/coverage/report_spec.rb' - 'spec/lib/gitlab/ci/build/releaser_spec.rb' - 'spec/lib/gitlab/ci/build/step_spec.rb' - - 'spec/lib/gitlab/ci/config/entry/cache_spec.rb' - 'spec/lib/gitlab/ci/config/entry/environment_spec.rb' - 'spec/lib/gitlab/ci/config/entry/reports_spec.rb' - 'spec/lib/gitlab/ci/config/entry/root_spec.rb' - 'spec/lib/gitlab/ci/config/entry/services_spec.rb' - 'spec/lib/gitlab/ci/config/external/file/artifact_spec.rb' - - 'spec/lib/gitlab/ci/config/external/file/base_spec.rb' - 'spec/lib/gitlab/ci/config/external/file/local_spec.rb' - 'spec/lib/gitlab/ci/config/external/file/project_spec.rb' - 'spec/lib/gitlab/ci/config/external/file/remote_spec.rb' @@ -3912,7 +3800,6 @@ Layout/LineLength: - 'spec/lib/gitlab/ci/runner_upgrade_check_spec.rb' - 'spec/lib/gitlab/ci/status/bridge/factory_spec.rb' - 'spec/lib/gitlab/ci/status/build/manual_spec.rb' - - 'spec/lib/gitlab/ci/status/build/waiting_for_approval_spec.rb' - 'spec/lib/gitlab/ci/status/stage/play_manual_spec.rb' - 'spec/lib/gitlab/ci/templates/Jobs/deploy_gitlab_ci_yaml_spec.rb' - 'spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb' @@ -4176,7 +4063,6 @@ Layout/LineLength: - 'spec/lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job_spec.rb' - 'spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb' - 'spec/lib/gitlab/sidekiq_middleware/size_limiter/compressor_spec.rb' - - 'spec/lib/gitlab/sidekiq_middleware/worker_context/server_spec.rb' - 'spec/lib/gitlab/slash_commands/presenters/issue_new_spec.rb' - 'spec/lib/gitlab/spamcheck/client_spec.rb' - 'spec/lib/gitlab/sql/pattern_spec.rb' @@ -4184,6 +4070,7 @@ Layout/LineLength: - 'spec/lib/gitlab/string_range_marker_spec.rb' - 'spec/lib/gitlab/string_regex_marker_spec.rb' - 'spec/lib/gitlab/suggestions/commit_message_spec.rb' + - 'spec/lib/gitlab/task_helpers_spec.rb' - 'spec/lib/gitlab/template/issue_template_spec.rb' - 'spec/lib/gitlab/template/merge_request_template_spec.rb' - 'spec/lib/gitlab/throttle_spec.rb' @@ -4259,9 +4146,6 @@ Layout/LineLength: - 'spec/mailers/emails/service_desk_spec.rb' - 'spec/mailers/notify_spec.rb' - 'spec/migrations/active_record/schema_spec.rb' - - 'spec/migrations/cleanup_after_fixing_issue_when_admin_changed_primary_email_spec.rb' - - 'spec/migrations/finalize_project_namespaces_backfill_spec.rb' - - 'spec/migrations/fix_and_backfill_project_namespaces_for_projects_with_duplicate_name_spec.rb' - 'spec/models/active_session_spec.rb' - 'spec/models/acts_as_taggable_on/tag_spec.rb' - 'spec/models/acts_as_taggable_on/tagging_spec.rb' @@ -4273,7 +4157,6 @@ Layout/LineLength: - 'spec/models/authentication_event_spec.rb' - 'spec/models/award_emoji_spec.rb' - 'spec/models/blob_viewer/go_mod_spec.rb' - - 'spec/models/blob_viewer/metrics_dashboard_yml_spec.rb' - 'spec/models/bulk_import_spec.rb' - 'spec/models/bulk_imports/entity_spec.rb' - 'spec/models/bulk_imports/file_transfer/project_config_spec.rb' @@ -4391,7 +4274,6 @@ Layout/LineLength: - 'spec/models/packages/dependency_spec.rb' - 'spec/models/packages/go/module_version_spec.rb' - 'spec/models/packages/nuget/dependency_link_metadatum_spec.rb' - - 'spec/models/packages/nuget/metadatum_spec.rb' - 'spec/models/packages/package_file_spec.rb' - 'spec/models/packages/package_spec.rb' - 'spec/models/pages/virtual_domain_spec.rb' @@ -4415,7 +4297,6 @@ Layout/LineLength: - 'spec/models/projects/topic_spec.rb' - 'spec/models/projects/triggered_hooks_spec.rb' - 'spec/models/prometheus_metric_spec.rb' - - 'spec/models/protected_branch/merge_access_level_spec.rb' - 'spec/models/protected_branch/push_access_level_spec.rb' - 'spec/models/protected_branch_spec.rb' - 'spec/models/redirect_route_spec.rb' @@ -4462,13 +4343,11 @@ Layout/LineLength: - 'spec/presenters/packages/conan/package_presenter_spec.rb' - 'spec/presenters/packages/detail/package_presenter_spec.rb' - 'spec/presenters/packages/helm/index_presenter_spec.rb' - - 'spec/presenters/packages/npm/package_presenter_spec.rb' - 'spec/presenters/packages/nuget/package_metadata_presenter_spec.rb' - 'spec/presenters/packages/nuget/packages_metadata_presenter_spec.rb' - 'spec/presenters/packages/nuget/search_results_presenter_spec.rb' - 'spec/presenters/projects/security/configuration_presenter_spec.rb' - 'spec/presenters/prometheus_alert_presenter_spec.rb' - - 'spec/presenters/service_hook_presenter_spec.rb' - 'spec/presenters/snippet_blob_presenter_spec.rb' - 'spec/rack_servers/puma_spec.rb' - 'spec/requests/admin/background_migrations_controller_spec.rb' @@ -4573,7 +4452,6 @@ Layout/LineLength: - 'spec/requests/api/group_clusters_spec.rb' - 'spec/requests/api/group_debian_distributions_spec.rb' - 'spec/requests/api/group_labels_spec.rb' - - 'spec/requests/api/group_milestones_spec.rb' - 'spec/requests/api/group_packages_spec.rb' - 'spec/requests/api/group_variables_spec.rb' - 'spec/requests/api/groups_spec.rb' @@ -4979,7 +4857,6 @@ Layout/LineLength: - 'spec/support/database/prevent_cross_database_modification.rb' - 'spec/support/database/prevent_cross_joins.rb' - 'spec/support/db_cleaner.rb' - - 'spec/support/fast_quarantine.rb' - 'spec/support/helpers/api_helpers.rb' - 'spec/support/helpers/board_helpers.rb' - 'spec/support/helpers/cycle_analytics_helpers.rb' @@ -5010,12 +4887,6 @@ Layout/LineLength: - 'spec/support/matchers/project_namespace_matcher.rb' - 'spec/support/matchers/query_matcher.rb' - 'spec/support/matchers/route_to_route_not_found_matcher.rb' - - 'spec/support/migrations_helpers/schema_version_finder.rb' - - 'spec/support/migrations_helpers/vulnerabilities_findings_helper.rb' - - 'spec/support/prometheus/additional_metrics_shared_examples.rb' - - 'spec/support/redis/redis_shared_examples.rb' - - 'spec/support/services/deploy_token_shared_examples.rb' - - 'spec/support/services/issuable_update_service_shared_examples.rb' - 'spec/support/shared_contexts/bulk_imports_requests_shared_context.rb' - 'spec/support/shared_contexts/container_repositories_shared_context.rb' - 'spec/support/shared_contexts/finders/group_projects_finder_shared_contexts.rb' @@ -5157,7 +5028,6 @@ Layout/LineLength: - 'spec/support/shared_examples/services/namespace_package_settings_shared_examples.rb' - 'spec/support/shared_examples/services/packages/debian/generate_distribution_shared_examples.rb' - 'spec/support/shared_examples/services/projects/update_repository_storage_service_shared_examples.rb' - - 'spec/support/shared_examples/services/rate_limited_service_shared_examples.rb' - 'spec/support/shared_examples/services/repositories/housekeeping_shared_examples.rb' - 'spec/support/shared_examples/services/resource_events/change_milestone_service_shared_examples.rb' - 'spec/support/shared_examples/services/security/ci_configuration/create_service_shared_examples.rb' @@ -5187,14 +5057,13 @@ Layout/LineLength: - 'spec/tasks/gitlab/smtp_rake_spec.rb' - 'spec/tasks/gitlab/snippets_rake_spec.rb' - 'spec/tasks/gitlab/storage_rake_spec.rb' - - 'spec/lib/gitlab/task_helpers_spec.rb' - 'spec/tasks/gitlab/terraform/migrate_rake_spec.rb' - 'spec/tasks/gitlab/uploads/check_rake_spec.rb' - 'spec/tasks/gitlab/workhorse_rake_spec.rb' - 'spec/tasks/migrate/schema_check_rake_spec.rb' + - 'spec/tooling/danger/analytics_instrumentation_spec.rb' - 'spec/tooling/danger/datateam_spec.rb' - 'spec/tooling/danger/feature_flag_spec.rb' - - 'spec/tooling/danger/analytics_instrumentation_spec.rb' - 'spec/tooling/danger/project_helper_spec.rb' - 'spec/tooling/danger/sidekiq_queues_spec.rb' - 'spec/tooling/lib/tooling/kubernetes_client_spec.rb' @@ -5221,7 +5090,6 @@ Layout/LineLength: - 'spec/views/groups/edit.html.haml_spec.rb' - 'spec/views/help/index.html.haml_spec.rb' - 'spec/views/layouts/_head.html.haml_spec.rb' - - 'spec/views/layouts/application.html.haml_spec.rb' - 'spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb' - 'spec/views/notify/push_to_merge_request_email.text.haml_spec.rb' - 'spec/views/profiles/keys/_form.html.haml_spec.rb' @@ -5231,7 +5099,6 @@ Layout/LineLength: - 'spec/views/projects/jobs/_generic_commit_status.html.haml_spec.rb' - 'spec/views/projects/merge_requests/creations/_new_submit.html.haml_spec.rb' - 'spec/views/projects/pages_domains/show.html.haml_spec.rb' - - 'spec/views/projects/pipeline_schedules/_pipeline_schedule.html.haml_spec.rb' - 'spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb' - 'spec/views/projects/settings/operations/show.html.haml_spec.rb' - 'spec/views/projects/tags/index.html.haml_spec.rb' @@ -5257,7 +5124,6 @@ Layout/LineLength: - 'spec/workers/ci/pipeline_success_unlock_artifacts_worker_spec.rb' - 'spec/workers/ci/ref_delete_unlock_artifacts_worker_spec.rb' - 'spec/workers/ci/resource_groups/assign_resource_from_resource_group_worker_spec.rb' - - 'spec/workers/clusters/integrations/check_prometheus_health_worker_spec.rb' - 'spec/workers/concerns/application_worker_spec.rb' - 'spec/workers/concerns/project_import_options_spec.rb' - 'spec/workers/container_expiration_policies/cleanup_container_repository_worker_spec.rb' @@ -5311,7 +5177,6 @@ Layout/LineLength: - 'spec/workers/users/deactivate_dormant_users_worker_spec.rb' - 'tooling/danger/analytics_instrumentation.rb' - 'tooling/danger/project_helper.rb' - - 'tooling/danger/specs.rb' - 'tooling/graphql/docs/helper.rb' - 'tooling/lib/tooling/helm3_client.rb' - 'tooling/lib/tooling/kubernetes_client.rb' diff --git a/.rubocop_todo/lint/assignment_in_condition.yml b/.rubocop_todo/lint/assignment_in_condition.yml new file mode 100644 index 00000000000..0d893f4c1a0 --- /dev/null +++ b/.rubocop_todo/lint/assignment_in_condition.yml @@ -0,0 +1,259 @@ +--- +# Cop supports --autocorrect. +Lint/AssignmentInCondition: + Details: grace period + Exclude: + - 'app/controllers/concerns/uploads_actions.rb' + - 'app/controllers/concerns/verifies_with_email.rb' + - 'app/controllers/omniauth_callbacks_controller.rb' + - 'app/controllers/projects/blob_controller.rb' + - 'app/controllers/projects/commit_controller.rb' + - 'app/controllers/projects/merge_requests/diffs_controller.rb' + - 'app/controllers/projects/settings/integrations_controller.rb' + - 'app/controllers/repositories/lfs_api_controller.rb' + - 'app/controllers/users/terms_controller.rb' + - 'app/finders/merge_requests/oldest_per_commit_finder.rb' + - 'app/finders/pending_todos_finder.rb' + - 'app/finders/repositories/changelog_commits_finder.rb' + - 'app/graphql/mutations/ci/runner/bulk_delete.rb' + - 'app/graphql/mutations/merge_requests/accept.rb' + - 'app/graphql/mutations/notes/create/note.rb' + - 'app/graphql/resolvers/deployments_resolver.rb' + - 'app/graphql/types/global_id_type.rb' + - 'app/helpers/blob_helper.rb' + - 'app/helpers/button_helper.rb' + - 'app/helpers/issuables_helper.rb' + - 'app/helpers/snippets_helper.rb' + - 'app/mailers/emails/service_desk.rb' + - 'app/mailers/notify.rb' + - 'app/models/blob_viewer/go_mod.rb' + - 'app/models/ci/build_metadata.rb' + - 'app/models/ci/runner.rb' + - 'app/models/clusters/platforms/kubernetes.rb' + - 'app/models/concerns/after_commit_queue.rb' + - 'app/models/concerns/atomic_internal_id.rb' + - 'app/models/concerns/bulk_insert_safe.rb' + - 'app/models/concerns/has_unique_internal_users.rb' + - 'app/models/concerns/subscribable.rb' + - 'app/models/design_management/design_collection.rb' + - 'app/models/diff_note.rb' + - 'app/models/merge_request.rb' + - 'app/models/merge_request_diff.rb' + - 'app/models/repository.rb' + - 'app/models/snippet_repository.rb' + - 'app/models/user.rb' + - 'app/presenters/ci/pipeline_presenter.rb' + - 'app/presenters/commit_status_presenter.rb' + - 'app/presenters/project_presenter.rb' + - 'app/serializers/fork_namespace_entity.rb' + - 'app/serializers/merge_request_poll_cached_widget_entity.rb' + - 'app/services/ci/create_pipeline_service.rb' + - 'app/services/ci/find_exposed_artifacts_service.rb' + - 'app/services/ci/runners/register_runner_service.rb' + - 'app/services/clusters/agents/authorize_proxy_user_service.rb' + - 'app/services/deployments/create_for_build_service.rb' + - 'app/services/deployments/create_service.rb' + - 'app/services/deployments/link_merge_requests_service.rb' + - 'app/services/deployments/update_environment_service.rb' + - 'app/services/design_management/on_success_callbacks.rb' + - 'app/services/environments/schedule_to_delete_review_apps_service.rb' + - 'app/services/groups/nested_create_service.rb' + - 'app/services/issuable_base_service.rb' + - 'app/services/issues/zoom_link_service.rb' + - 'app/services/lfs/file_transformer.rb' + - 'app/services/merge_requests/base_service.rb' + - 'app/services/merge_requests/mergeability_check_service.rb' + - 'app/services/metrics/dashboard/dynamic_embed_service.rb' + - 'app/services/packages/debian/parse_debian822_service.rb' + - 'app/services/pages/migrate_from_legacy_storage_service.rb' + - 'app/services/projects/operations/update_service.rb' + - 'app/services/projects/prometheus/alerts/notify_service.rb' + - 'app/services/projects/unlink_fork_service.rb' + - 'app/services/releases/update_service.rb' + - 'app/services/repositories/changelog_service.rb' + - 'app/services/system_notes/incident_service.rb' + - 'app/services/system_notes/merge_requests_service.rb' + - 'app/services/task_list_toggle_service.rb' + - 'app/services/tasks_to_be_done/base_service.rb' + - 'app/services/users/last_push_event_service.rb' + - 'app/services/users/refresh_authorized_projects_service.rb' + - 'app/services/users/update_service.rb' + - 'app/uploaders/file_mover.rb' + - 'app/uploaders/file_uploader.rb' + - 'app/validators/x509_certificate_credentials_validator.rb' + - 'app/workers/ci/build_finished_worker.rb' + - 'app/workers/clusters/agents/delete_expired_events_worker.rb' + - 'app/workers/clusters/agents/notify_git_push_worker.rb' + - 'app/workers/concerns/gitlab/bitbucket_server_import/object_importer.rb' + - 'app/workers/concerns/gitlab/bitbucket_server_import/stage_methods.rb' + - 'app/workers/concerns/gitlab/github_import/object_importer.rb' + - 'app/workers/concerns/gitlab/github_import/stage_methods.rb' + - 'app/workers/concerns/gitlab/notify_upon_death.rb' + - 'app/workers/deployments/hooks_worker.rb' + - 'app/workers/deployments/link_merge_request_worker.rb' + - 'app/workers/gitlab/github_gists_import/import_gist_worker.rb' + - 'app/workers/gitlab/github_import/stage/import_lfs_objects_worker.rb' + - 'app/workers/gitlab/import/advance_stage.rb' + - 'app/workers/ml/experiment_tracking/associate_ml_candidate_to_package_worker.rb' + - 'app/workers/new_note_worker.rb' + - 'app/workers/terraform/states/destroy_worker.rb' + - 'config/initializers/carrierwave_performance_patch.rb' + - 'config/initializers/peek.rb' + - 'config/initializers/validate_database_config.rb' + - 'config/initializers/zz_metrics.rb' + - 'db/post_migrate/20220919080303_delete_migrate_shared_vulnerability_scanners.rb' + - 'ee/app/controllers/concerns/gitlab_subscriptions/seat_count_alert.rb' + - 'ee/app/controllers/omniauth_kerberos_controller.rb' + - 'ee/app/controllers/users/identity_verification_controller.rb' + - 'ee/app/finders/ee/projects_finder.rb' + - 'ee/app/finders/incident_management/oncall_users_finder.rb' + - 'ee/app/graphql/mutations/boards/update_epic_user_preferences.rb' + - 'ee/app/graphql/mutations/incident_management/escalation_policy/base.rb' + - 'ee/app/models/ee/ci/build.rb' + - 'ee/app/models/ee/merge_request.rb' + - 'ee/app/models/ee/preloaders/single_hierarchy_project_group_plans_preloader.rb' + - 'ee/app/models/productivity_analytics.rb' + - 'ee/app/presenters/ee/ci/pipeline_presenter.rb' + - 'ee/app/services/app_sec/dast/profiles/create_associations_service.rb' + - 'ee/app/services/app_sec/dast/site_profiles/update_service.rb' + - 'ee/app/services/deployments/approval_service.rb' + - 'ee/app/services/dora/aggregate_metrics_service.rb' + - 'ee/app/services/ee/application_settings/update_service.rb' + - 'ee/app/services/ee/issues/clone_service.rb' + - 'ee/app/services/ee/issues/move_service.rb' + - 'ee/app/services/ee/lfs/unlock_file_service.rb' + - 'ee/app/services/ee/projects/operations/update_service.rb' + - 'ee/app/services/gitlab_subscriptions/fetch_subscription_plans_service.rb' + - 'ee/app/services/incident_management/issuable_resource_links/zoom_link_service.rb' + - 'ee/app/services/incident_management/pending_escalations/create_service.rb' + - 'ee/app/services/security/security_orchestration_policies/rule_schedule_service.rb' + - 'ee/app/services/security/security_orchestration_policies/validate_policy_service.rb' + - 'ee/app/services/vulnerabilities/starboard_vulnerability_create_service.rb' + - 'ee/app/validators/vulnerabilities/cvss_vector_validator.rb' + - 'ee/db/fixtures/development/20_burndown.rb' + - 'ee/lib/ee/api/entities/approval_state.rb' + - 'ee/lib/ee/gitlab/auth/ldap/sync/group.rb' + - 'ee/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules.rb' + - 'ee/lib/ee/gitlab/checks/diff_check.rb' + - 'ee/lib/ee/gitlab/repo_path.rb' + - 'ee/lib/gem_extensions/elasticsearch/model/indexing/instance_methods.rb' + - 'ee/lib/gitlab/group_plans_preloader.rb' + - 'ee/lib/gitlab/llm/content_parser.rb' + - 'ee/lib/gitlab/path_locks_finder.rb' + - 'ee/lib/gitlab/subscription_portal/clients/graphql.rb' + - 'ee/lib/system_check/geo/authorized_keys_check.rb' + - 'ee/spec/factories/protected_environments.rb' + - 'lib/api/base.rb' + - 'lib/api/integrations.rb' + - 'lib/banzai/filter/ascii_doc_sanitization_filter.rb' + - 'lib/banzai/filter/broadcast_message_placeholders_filter.rb' + - 'lib/banzai/filter/footnote_filter.rb' + - 'lib/banzai/filter/gollum_tags_filter.rb' + - 'lib/banzai/filter/inline_observability_filter.rb' + - 'lib/banzai/filter/references/abstract_reference_filter.rb' + - 'lib/banzai/filter/references/merge_request_reference_filter.rb' + - 'lib/banzai/filter/references/project_reference_filter.rb' + - 'lib/banzai/filter/references/user_reference_filter.rb' + - 'lib/banzai/filter/table_of_contents_filter.rb' + - 'lib/feature/definition.rb' + - 'lib/file_size_validator.rb' + - 'lib/gitlab/audit/type/definition.rb' + - 'lib/gitlab/authorized_keys.rb' + - 'lib/gitlab/background_migration/fix_projects_without_project_feature.rb' + - 'lib/gitlab/blob_helper.rb' + - 'lib/gitlab/buffered_io.rb' + - 'lib/gitlab/changelog/config.rb' + - 'lib/gitlab/changelog/generator.rb' + - 'lib/gitlab/chat/output.rb' + - 'lib/gitlab/checks/diff_check.rb' + - 'lib/gitlab/ci/ansi2html.rb' + - 'lib/gitlab/ci/ansi2json/style.rb' + - 'lib/gitlab/ci/build/rules.rb' + - 'lib/gitlab/ci/build/rules/rule.rb' + - 'lib/gitlab/ci/components/instance_path.rb' + - 'lib/gitlab/ci/config/external/rules.rb' + - 'lib/gitlab/ci/config/normalizer.rb' + - 'lib/gitlab/ci/parsers/coverage/sax_document.rb' + - 'lib/gitlab/ci/yaml_processor.rb' + - 'lib/gitlab/counters/buffered_counter.rb' + - 'lib/gitlab/data_builder/deployment.rb' + - 'lib/gitlab/database/background_migration/batched_migration_runner.rb' + - 'lib/gitlab/database/gitlab_schema.rb' + - 'lib/gitlab/database/load_balancing/configuration.rb' + - 'lib/gitlab/database/load_balancing/host.rb' + - 'lib/gitlab/database/load_balancing/load_balancer.rb' + - 'lib/gitlab/database/load_balancing/wal_tracking_receiver.rb' + - 'lib/gitlab/database/load_balancing/wal_tracking_sender.rb' + - 'lib/gitlab/database/partitioning/monthly_strategy.rb' + - 'lib/gitlab/database/partitioning/partition_manager.rb' + - 'lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb' + - 'lib/gitlab/database/shared_model.rb' + - 'lib/gitlab/diff/formatters/base_formatter.rb' + - 'lib/gitlab/diff/lines_unfolder.rb' + - 'lib/gitlab/diff/position.rb' + - 'lib/gitlab/diff/suggestions_parser.rb' + - 'lib/gitlab/email/handler/create_issue_handler.rb' + - 'lib/gitlab/email/handler/create_merge_request_handler.rb' + - 'lib/gitlab/email/handler/create_note_on_issuable_handler.rb' + - 'lib/gitlab/email/handler/service_desk_handler.rb' + - 'lib/gitlab/encoding_helper.rb' + - 'lib/gitlab/exception_log_formatter.rb' + - 'lib/gitlab/file_markdown_link_builder.rb' + - 'lib/gitlab/fogbugz_import/importer.rb' + - 'lib/gitlab/git/blame.rb' + - 'lib/gitlab/git/pre_receive_error.rb' + - 'lib/gitlab/git/repository.rb' + - 'lib/gitlab/gitaly_client/cleanup_service.rb' + - 'lib/gitlab/gitaly_client/operation_service.rb' + - 'lib/gitlab/gitaly_client/repository_service.rb' + - 'lib/gitlab/github_import/importer/issue_importer.rb' + - 'lib/gitlab/github_import/importer/label_links_importer.rb' + - 'lib/gitlab/github_import/importer/note_importer.rb' + - 'lib/gitlab/graphql/deprecations_base.rb' + - 'lib/gitlab/i18n/metadata_entry.rb' + - 'lib/gitlab/i18n/po_linter.rb' + - 'lib/gitlab/mail_room.rb' + - 'lib/gitlab/metrics/samplers/base_sampler.rb' + - 'lib/gitlab/metrics/subscribers/load_balancing.rb' + - 'lib/gitlab/metrics/transaction.rb' + - 'lib/gitlab/patch/global_id.rb' + - 'lib/gitlab/patch/sprockets_base_file_digest_key.rb' + - 'lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb' + - 'lib/gitlab/performance_bar/stats.rb' + - 'lib/gitlab/quick_actions/merge_request_actions.rb' + - 'lib/gitlab/slash_commands/global_slack_handler.rb' + - 'lib/gitlab/slash_commands/presenters/run.rb' + - 'lib/gitlab/string_regex_marker.rb' + - 'lib/gitlab/task_helpers.rb' + - 'lib/gitlab/usage/metric_definition.rb' + - 'lib/gitlab/usage_data/topology.rb' + - 'lib/gitlab/usage_data_counters/ci_template_unique_counter.rb' + - 'lib/gitlab/utils/merge_hash.rb' + - 'lib/gitlab/version_info.rb' + - 'lib/gitlab/webpack/dev_server_middleware.rb' + - 'lib/gitlab/wiki_pages/front_matter_parser.rb' + - 'lib/prometheus/pid_provider.rb' + - 'lib/tasks/gitlab/banzai.rake' + - 'qa/lib/slack/page/chat.rb' + - 'qa/qa/resource/registry_repository.rb' + - 'qa/qa/scenario/template.rb' + - 'qa/qa/vendor/jenkins/helpers.rb' + - 'rubocop/cop/gitlab/const_get_inherit_false.rb' + - 'rubocop/cop/migration/add_limit_to_text_columns.rb' + - 'rubocop/cop/migration/background_migration_missing_active_concern.rb' + - 'rubocop/cop/prefer_class_methods_over_module.rb' + - 'rubocop/cop/rspec/httparty_basic_auth.rb' + - 'scripts/lib/glfm/render_static_html.rb' + - 'scripts/lib/glfm/update_example_snapshots.rb' + - 'scripts/lint-docs-blueprints.rb' + - 'spec/factories/ci/processable.rb' + - 'spec/lib/gitlab/background_migration/backfill_root_storage_statistics_fork_storage_sizes_spec.rb' + - 'spec/models/packages/go/module_version_spec.rb' + - 'spec/models/project_feature_spec.rb' + - 'spec/requests/api/go_proxy_spec.rb' + - 'spec/services/members/invitation_reminder_email_service_spec.rb' + - 'spec/support/helpers/graphql_helpers.rb' + - 'spec/support/helpers/next_found_instance_of.rb' + - 'spec/support/matchers/request_urgency_matcher.rb' + - 'spec/support/shared_contexts/glfm/api_markdown_snapshot_shared_context.rb' + - 'tooling/danger/database.rb' diff --git a/.rubocop_todo/lint/redundant_safe_navigation.yml b/.rubocop_todo/lint/redundant_safe_navigation.yml new file mode 100644 index 00000000000..8c4b66313eb --- /dev/null +++ b/.rubocop_todo/lint/redundant_safe_navigation.yml @@ -0,0 +1,15 @@ +--- +# Cop supports --autocorrect. +Lint/RedundantSafeNavigation: + Details: grace period + Exclude: + - 'app/controllers/import/base_controller.rb' + - 'app/graphql/resolvers/users_resolver.rb' + - 'app/graphql/types/countable_connection_type.rb' + - 'app/helpers/search_helper.rb' + - 'app/models/deployment.rb' + - 'ee/app/graphql/ee/types/issue_connection_type.rb' + - 'ee/app/models/search/namespace_index_assignment.rb' + - 'lib/api/projects.rb' + - 'lib/sidebars/projects/menus/infrastructure_menu.rb' + - 'spec/lib/gitlab/redis/multi_store_spec.rb' diff --git a/.rubocop_todo/lint/redundant_string_coercion.yml b/.rubocop_todo/lint/redundant_string_coercion.yml new file mode 100644 index 00000000000..8d9bb93395b --- /dev/null +++ b/.rubocop_todo/lint/redundant_string_coercion.yml @@ -0,0 +1,7 @@ +--- +# Cop supports --autocorrect. +Lint/RedundantStringCoercion: + Details: grace period + Exclude: + - 'ee/bin/geo_log_cursor' + - 'ee/db/fixtures/development/31_devops_adoption.rb' diff --git a/.rubocop_todo/metrics/cyclomatic_complexity.yml b/.rubocop_todo/metrics/cyclomatic_complexity.yml index 414f4f6243c..e345c2be451 100644 --- a/.rubocop_todo/metrics/cyclomatic_complexity.yml +++ b/.rubocop_todo/metrics/cyclomatic_complexity.yml @@ -8,13 +8,12 @@ Metrics/CyclomaticComplexity: - 'app/models/concerns/issuable.rb' - 'app/services/projects/create_service.rb' - 'ee/app/controllers/ee/groups_controller.rb' - - 'ee/lib/elastic/latest/git_class_proxy.rb' - 'ee/lib/gitlab/ci/parsers/security/formatters/dependency_list.rb' + - 'ee/spec/support/shared_contexts/remote_development/remote_development_shared_contexts.rb' - 'lib/banzai/filter/references/abstract_reference_filter.rb' - 'lib/gitlab/conflict/file.rb' - 'lib/gitlab/database/query_analyzers/prevent_cross_database_modification.rb' - 'lib/gitlab/utils/merge_hash.rb' - 'lib/kramdown/parser/atlassian_document_format.rb' - - 'qa/qa/runtime/browser.rb' - 'qa/qa/support/repeater.rb' - 'sidekiq_cluster/cli.rb' diff --git a/.rubocop_todo/metrics/perceived_complexity.yml b/.rubocop_todo/metrics/perceived_complexity.yml index 51ec88c1582..2ad1c1d1f33 100644 --- a/.rubocop_todo/metrics/perceived_complexity.yml +++ b/.rubocop_todo/metrics/perceived_complexity.yml @@ -7,13 +7,12 @@ Metrics/PerceivedComplexity: - 'app/helpers/nav/top_nav_helper.rb' - 'app/services/projects/create_service.rb' - 'ee/app/controllers/ee/groups_controller.rb' - - 'ee/lib/elastic/latest/git_class_proxy.rb' + - 'ee/spec/support/shared_contexts/remote_development/remote_development_shared_contexts.rb' - 'lib/banzai/filter/references/abstract_reference_filter.rb' - 'lib/banzai/renderer.rb' - 'lib/gitlab/conflict/file.rb' - 'lib/gitlab/database/query_analyzers/prevent_cross_database_modification.rb' - 'lib/gitlab/utils/merge_hash.rb' - - 'qa/qa/runtime/browser.rb' - 'qa/qa/support/repeater.rb' - 'rubocop/cop/gitlab/mark_used_feature_flags.rb' - 'sidekiq_cluster/cli.rb' diff --git a/.rubocop_todo/naming/heredoc_delimiter_naming.yml b/.rubocop_todo/naming/heredoc_delimiter_naming.yml index 02cc7d2a85c..a8265e86ca0 100644 --- a/.rubocop_todo/naming/heredoc_delimiter_naming.yml +++ b/.rubocop_todo/naming/heredoc_delimiter_naming.yml @@ -91,7 +91,9 @@ Naming/HeredocDelimiterNaming: - 'spec/lib/gitlab/webpack/graphql_known_operations_spec.rb' - 'spec/lib/gitlab/webpack/manifest_spec.rb' - 'spec/lib/gitlab/word_diff/parser_spec.rb' + - 'spec/lib/json_web_token/rsa_token_spec.rb' - 'spec/models/ci/bridge_spec.rb' + - 'spec/models/commit_spec.rb' - 'spec/models/concerns/ci/maskable_spec.rb' - 'spec/models/integrations/asana_spec.rb' - 'spec/models/ssh_host_key_spec.rb' @@ -109,10 +111,11 @@ Naming/HeredocDelimiterNaming: - 'spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb' - 'spec/services/google_cloud/generate_pipeline_service_spec.rb' - 'spec/services/task_list_toggle_service_spec.rb' + - 'spec/support/helpers/repo_helpers.rb' + - 'spec/support/helpers/seed_repo.rb' - 'spec/support/helpers/stub_object_storage.rb' - 'spec/support/shared_examples/helm_commands_shared_examples.rb' - 'spec/support/shared_examples/models/taskable_shared_examples.rb' - 'spec/support/shared_examples/services/packages/debian/generate_distribution_shared_examples.rb' - - 'spec/support/test_reports/test_reports_helper.rb' - 'spec/tasks/gitlab/db/decomposition/rollback/bump_ci_sequences_rake_spec.rb' - 'spec/workers/post_receive_spec.rb' diff --git a/.rubocop_todo/rails/file_path.yml b/.rubocop_todo/rails/file_path.yml index 49182a51ea7..eef5e580e43 100644 --- a/.rubocop_todo/rails/file_path.yml +++ b/.rubocop_todo/rails/file_path.yml @@ -1,4 +1,5 @@ --- +# Cop supports --autocorrect. Rails/FilePath: Exclude: - 'app/controllers/help_controller.rb' @@ -12,7 +13,6 @@ Rails/FilePath: - 'config/initializers/1_settings.rb' - 'config/initializers/7_prometheus_metrics.rb' - 'config/initializers/lograge.rb' - - 'config/initializers_before_autoloader/001_fast_gettext.rb' - 'ee/app/helpers/ee/application_helper.rb' - 'ee/app/services/security/security_orchestration_policies/project_create_service.rb' - 'ee/lib/ee/feature/definition.rb' @@ -57,7 +57,6 @@ Rails/FilePath: - 'lib/system_check/app/systemd_unit_files_or_init_script_up_to_date_check.rb' - 'lib/system_check/app/uploads_directory_exists_check.rb' - 'lib/system_check/incoming_email/imap_authentication_check.rb' - - 'lib/tasks/gitlab/db.rake' - 'lib/tasks/gitlab/metrics_exporter.rake' - 'lib/tasks/gitlab/usage_data.rake' - 'lib/tasks/tanuki_emoji.rake' @@ -66,10 +65,8 @@ Rails/FilePath: - 'spec/config/object_store_settings_spec.rb' - 'spec/db/development/add_security_training_providers_spec.rb' - 'spec/db/development/create_base_work_item_types_spec.rb' - - 'spec/db/development/import_common_metrics_spec.rb' - 'spec/db/production/add_security_training_providers_spec.rb' - 'spec/db/production/create_base_work_item_types_spec.rb' - - 'spec/db/production/import_common_metrics_spec.rb' - 'spec/db/schema_spec.rb' - 'spec/factories/design_management/designs.rb' - 'spec/factories/design_management/versions.rb' @@ -109,6 +106,7 @@ Rails/FilePath: - 'spec/lib/gitlab/mail_room/mail_room_spec.rb' - 'spec/lib/gitlab/metrics/dashboard/finder_spec.rb' - 'spec/lib/gitlab/middleware/multipart/handler_spec.rb' + - 'spec/lib/gitlab/multi_destination_logger_spec.rb' - 'spec/lib/gitlab/project_transfer_spec.rb' - 'spec/lib/gitlab/sanitizers/svg_spec.rb' - 'spec/metrics_server/metrics_server_spec.rb' diff --git a/.rubocop_todo/rails/output_safety.yml b/.rubocop_todo/rails/output_safety.yml new file mode 100644 index 00000000000..960d4ef0818 --- /dev/null +++ b/.rubocop_todo/rails/output_safety.yml @@ -0,0 +1,158 @@ +--- +Rails/OutputSafety: + Details: grace period + Exclude: + - 'app/controllers/concerns/confirm_email_warning.rb' + - 'app/controllers/concerns/web_hooks/hook_actions.rb' + - 'app/controllers/groups_controller.rb' + - 'app/controllers/profiles/two_factor_auths_controller.rb' + - 'app/controllers/projects/mirrors_controller.rb' + - 'app/controllers/projects/performance_monitoring/dashboards_controller.rb' + - 'app/controllers/projects/pipeline_schedules_controller.rb' + - 'app/controllers/projects/protected_refs_controller.rb' + - 'app/controllers/search_controller.rb' + - 'app/graphql/types/ci/job_trace_type.rb' + - 'app/graphql/types/project_type.rb' + - 'app/helpers/admin/application_settings/settings_helper.rb' + - 'app/helpers/appearances_helper.rb' + - 'app/helpers/auth_helper.rb' + - 'app/helpers/broadcast_messages_helper.rb' + - 'app/helpers/commits_helper.rb' + - 'app/helpers/diff_helper.rb' + - 'app/helpers/dropdowns_helper.rb' + - 'app/helpers/emails_helper.rb' + - 'app/helpers/emoji_helper.rb' + - 'app/helpers/environment_helper.rb' + - 'app/helpers/external_link_helper.rb' + - 'app/helpers/form_helper.rb' + - 'app/helpers/groups/group_members_helper.rb' + - 'app/helpers/groups_helper.rb' + - 'app/helpers/import_helper.rb' + - 'app/helpers/issuables_helper.rb' + - 'app/helpers/issues_helper.rb' + - 'app/helpers/labels_helper.rb' + - 'app/helpers/markup_helper.rb' + - 'app/helpers/members_helper.rb' + - 'app/helpers/merge_requests_helper.rb' + - 'app/helpers/notify_helper.rb' + - 'app/helpers/page_layout_helper.rb' + - 'app/helpers/profiles_helper.rb' + - 'app/helpers/projects_helper.rb' + - 'app/helpers/reminder_emails_helper.rb' + - 'app/helpers/safe_format_helper.rb' + - 'app/helpers/search_helper.rb' + - 'app/helpers/sidebars_helper.rb' + - 'app/helpers/sourcegraph_helper.rb' + - 'app/helpers/tags_helper.rb' + - 'app/helpers/timeboxes_helper.rb' + - 'app/helpers/todos_helper.rb' + - 'app/helpers/tree_helper.rb' + - 'app/helpers/version_check_helper.rb' + - 'app/helpers/visibility_level_helper.rb' + - 'app/helpers/whats_new_helper.rb' + - 'app/mailers/notify.rb' + - 'app/models/concerns/restricted_signup.rb' + - 'app/models/integrations/apple_app_store.rb' + - 'app/models/integrations/asana.rb' + - 'app/models/integrations/bamboo.rb' + - 'app/models/integrations/bugzilla.rb' + - 'app/models/integrations/campfire.rb' + - 'app/models/integrations/clickup.rb' + - 'app/models/integrations/confluence.rb' + - 'app/models/integrations/custom_issue_tracker.rb' + - 'app/models/integrations/datadog.rb' + - 'app/models/integrations/discord.rb' + - 'app/models/integrations/ewm.rb' + - 'app/models/integrations/external_wiki.rb' + - 'app/models/integrations/google_play.rb' + - 'app/models/integrations/hangouts_chat.rb' + - 'app/models/integrations/irker.rb' + - 'app/models/integrations/jenkins.rb' + - 'app/models/integrations/mattermost.rb' + - 'app/models/integrations/pivotaltracker.rb' + - 'app/models/integrations/pumble.rb' + - 'app/models/integrations/redmine.rb' + - 'app/models/integrations/squash_tm.rb' + - 'app/models/integrations/telegram.rb' + - 'app/models/integrations/unify_circuit.rb' + - 'app/models/integrations/webex_teams.rb' + - 'app/models/integrations/youtrack.rb' + - 'app/presenters/ci/pipeline_presenter.rb' + - 'app/presenters/key_presenter.rb' + - 'app/presenters/project_presenter.rb' + - 'app/serializers/analytics/cycle_analytics/stage_entity.rb' + - 'app/serializers/build_details_entity.rb' + - 'app/serializers/entity_date_helper.rb' + - 'app/services/jira/requests/base.rb' + - 'app/services/projects/update_service.rb' + - 'app/services/security/ci_configuration/base_create_service.rb' + - 'app/services/system_notes/commit_service.rb' + - 'ee/app/components/namespaces/combined_storage_users/base_alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/base_alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/enforcement_alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/enforcement_at_limit_alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/non_owner_enforcement_alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/non_owner_notification_alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/notification_alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/usage_quota_alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/usage_quota_trial_alert_component.rb' + - 'ee/app/components/namespaces/storage/limit_alert_component.rb' + - 'ee/app/components/namespaces/storage/pre_enforcement_alert_component.rb' + - 'ee/app/components/namespaces/storage/repository_limit_alert_component.rb' + - 'ee/app/components/namespaces/storage/user_pre_enforcement_alert_component.rb' + - 'ee/app/controllers/admin/elasticsearch_controller.rb' + - 'ee/app/controllers/admin/geo/application_controller.rb' + - 'ee/app/controllers/admin/licenses_controller.rb' + - 'ee/app/controllers/ee/projects/issues_controller.rb' + - 'ee/app/controllers/ee/projects/mirrors_controller.rb' + - 'ee/app/controllers/ee/repositories/lfs_api_controller.rb' + - 'ee/app/helpers/billing_plans_helper.rb' + - 'ee/app/helpers/ee/application_helper.rb' + - 'ee/app/helpers/ee/geo_helper.rb' + - 'ee/app/helpers/ee/import_helper.rb' + - 'ee/app/helpers/ee/integrations_helper.rb' + - 'ee/app/helpers/ee/labels_helper.rb' + - 'ee/app/helpers/ee/members_helper.rb' + - 'ee/app/helpers/ee/mirror_helper.rb' + - 'ee/app/helpers/ee/search_helper.rb' + - 'ee/app/helpers/ee/users_helper.rb' + - 'ee/app/helpers/push_rules_helper.rb' + - 'ee/app/models/integrations/github.rb' + - 'ee/lib/ee/gitlab/namespace_storage_size_error_message.rb' + - 'ee/lib/gitlab/email/message/account_validation.rb' + - 'ee/lib/gitlab/expiring_subscription_message.rb' + - 'ee/lib/gitlab/licenses/submit_license_usage_data_banner.rb' + - 'ee/lib/gitlab/manual_quarterly_co_term_banner.rb' + - 'ee/spec/controllers/admin/licenses_controller_spec.rb' + - 'lib/banzai/filter/autolink_filter.rb' + - 'lib/banzai/filter/references/milestone_reference_filter.rb' + - 'lib/banzai/filter/spaced_link_filter.rb' + - 'lib/banzai/object_renderer.rb' + - 'lib/banzai/renderer.rb' + - 'lib/gitlab/asciidoc.rb' + - 'lib/gitlab/blame.rb' + - 'lib/gitlab/ci/trace/stream.rb' + - 'lib/gitlab/dependency_linker/base_linker.rb' + - 'lib/gitlab/dependency_linker/go_mod_linker.rb' + - 'lib/gitlab/dependency_linker/go_sum_linker.rb' + - 'lib/gitlab/diff/char_diff.rb' + - 'lib/gitlab/diff/highlight.rb' + - 'lib/gitlab/diff/inline_diff_marker.rb' + - 'lib/gitlab/diff/line.rb' + - 'lib/gitlab/diff/rendered/notebook/diff_file_helper.rb' + - 'lib/gitlab/email/message/in_product_marketing/helper.rb' + - 'lib/gitlab/email/message/in_product_marketing/trial.rb' + - 'lib/gitlab/email/message/in_product_marketing/verify.rb' + - 'lib/gitlab/highlight.rb' + - 'lib/gitlab/observability.rb' + - 'lib/gitlab/other_markup.rb' + - 'lib/gitlab/string_range_marker.rb' + - 'lib/gitlab/utils.rb' + - 'spec/helpers/application_helper_spec.rb' + - 'spec/helpers/notify_helper_spec.rb' + - 'spec/helpers/profiles_helper_spec.rb' + - 'spec/helpers/safe_format_helper_spec.rb' + - 'spec/helpers/sidebars_helper_spec.rb' + - 'spec/lib/banzai/filter/output_safety_spec.rb' + - 'spec/lib/gitlab/string_range_marker_spec.rb' + - 'spec/lib/gitlab/string_regex_marker_spec.rb' diff --git a/.rubocop_todo/rspec/context_wording.yml b/.rubocop_todo/rspec/context_wording.yml index a166e63ff77..ba82a9f7a1e 100644 --- a/.rubocop_todo/rspec/context_wording.yml +++ b/.rubocop_todo/rspec/context_wording.yml @@ -1,5 +1,6 @@ --- RSpec/ContextWording: + Details: grace period Exclude: - 'ee/spec/controllers/admin/application_settings_controller_spec.rb' - 'ee/spec/controllers/admin/audit_logs_controller_spec.rb' @@ -64,10 +65,6 @@ RSpec/ContextWording: - 'ee/spec/controllers/subscriptions_controller_spec.rb' - 'ee/spec/controllers/trial_registrations_controller_spec.rb' - 'ee/spec/controllers/users_controller_spec.rb' - - 'ee/spec/elastic/migrate/20220119120500_populate_commit_permissions_in_main_index_spec.rb' - - 'ee/spec/elastic/migrate/20220512150000_pause_indexing_for_unsupported_es_versions_spec.rb' - - 'ee/spec/elastic/migrate/20220613120500_migrate_commits_to_separate_index_spec.rb' - - 'ee/spec/elastic/migrate/20220713103500_delete_commits_from_original_index_spec.rb' - 'ee/spec/elastic/migrate/migration_shared_examples.rb' - 'ee/spec/elastic_integration/global_search_spec.rb' - 'ee/spec/features/admin/admin_audit_logs_spec.rb' @@ -87,6 +84,7 @@ RSpec/ContextWording: - 'ee/spec/features/boards/swimlanes/epics_swimlanes_filtering_spec.rb' - 'ee/spec/features/boards/swimlanes/epics_swimlanes_sidebar_labels_spec.rb' - 'ee/spec/features/boards/swimlanes/epics_swimlanes_spec.rb' + - 'ee/spec/features/boards/user_visits_board_spec.rb' - 'ee/spec/features/dashboards/todos_spec.rb' - 'ee/spec/features/discussion_comments/epic_quick_actions_spec.rb' - 'ee/spec/features/epic_boards/epic_boards_sidebar_spec.rb' @@ -125,7 +123,6 @@ RSpec/ContextWording: - 'ee/spec/features/issues/user_bulk_edits_issues_spec.rb' - 'ee/spec/features/labels_hierarchy_spec.rb' - 'ee/spec/features/markdown/markdown_spec.rb' - - 'ee/spec/features/markdown/metrics_spec.rb' - 'ee/spec/features/merge_request/merge_request_widget_blocking_mrs_spec.rb' - 'ee/spec/features/merge_request/user_approves_spec.rb' - 'ee/spec/features/merge_request/user_creates_merge_request_with_blocking_mrs_spec.rb' @@ -205,14 +202,12 @@ RSpec/ContextWording: - 'ee/spec/finders/security/vulnerabilities_finder_spec.rb' - 'ee/spec/finders/security/vulnerability_reads_finder_spec.rb' - 'ee/spec/finders/snippets_finder_spec.rb' - - 'ee/spec/finders/software_license_policies_finder_spec.rb' - 'ee/spec/finders/template_finder_spec.rb' - 'ee/spec/frontend/fixtures/dast_profiles.rb' - 'ee/spec/frontend/fixtures/on_demand_dast_scans.rb' - 'ee/spec/frontend/fixtures/search.rb' - 'ee/spec/graphql/ee/resolvers/board_list_issues_resolver_spec.rb' - 'ee/spec/graphql/ee/resolvers/namespace_projects_resolver_spec.rb' - - 'ee/spec/graphql/ee/types/projects/service_type_enum_spec.rb' - 'ee/spec/graphql/mutations/audit_events/streaming/headers/create_spec.rb' - 'ee/spec/graphql/mutations/audit_events/streaming/headers/destroy_spec.rb' - 'ee/spec/graphql/mutations/boards/epic_boards/create_spec.rb' @@ -243,7 +238,6 @@ RSpec/ContextWording: - 'ee/spec/graphql/resolvers/boards/board_list_epics_resolver_spec.rb' - 'ee/spec/graphql/resolvers/clusters/agents_resolver_spec.rb' - 'ee/spec/graphql/resolvers/compliance_management/merge_requests/compliance_violation_resolver_spec.rb' - - 'ee/spec/graphql/resolvers/dora_metrics_resolver_spec.rb' - 'ee/spec/graphql/resolvers/epics_resolver_spec.rb' - 'ee/spec/graphql/resolvers/incident_management/oncall_schedule_resolver_spec.rb' - 'ee/spec/graphql/resolvers/instance_security_dashboard/projects_resolver_spec.rb' @@ -254,6 +248,7 @@ RSpec/ContextWording: - 'ee/spec/graphql/resolvers/security_report_summary_resolver_spec.rb' - 'ee/spec/graphql/types/global_id_type_spec.rb' - 'ee/spec/graphql/types/incident_management/escalation_rule_input_type_spec.rb' + - 'ee/spec/graphql/types/incident_management/oncall_rotation_date_input_type_spec.rb' - 'ee/spec/graphql/types/issue_type_spec.rb' - 'ee/spec/graphql/types/project_type_spec.rb' - 'ee/spec/graphql/types/vulnerability_request_response_header_type_spec.rb' @@ -274,16 +269,15 @@ RSpec/ContextWording: - 'ee/spec/helpers/ee/operations_helper_spec.rb' - 'ee/spec/helpers/ee/personal_access_tokens_helper_spec.rb' - 'ee/spec/helpers/ee/projects/security/api_fuzzing_configuration_helper_spec.rb' - - 'ee/spec/helpers/groups/security_features_helper_spec.rb' - 'ee/spec/helpers/license_helper_spec.rb' - 'ee/spec/helpers/license_monitoring_helper_spec.rb' - - 'ee/spec/helpers/projects/security/discover_helper_spec.rb' - 'ee/spec/helpers/projects_helper_spec.rb' - 'ee/spec/helpers/roadmaps_helper_spec.rb' - 'ee/spec/helpers/security_helper_spec.rb' - 'ee/spec/helpers/subscriptions_helper_spec.rb' - 'ee/spec/helpers/timeboxes_helper_spec.rb' - 'ee/spec/helpers/vulnerabilities_helper_spec.rb' + - 'ee/spec/helpers/web_hooks/web_hooks_helper_spec.rb' - 'ee/spec/initializers/1_settings_spec.rb' - 'ee/spec/initializers/session_store_spec.rb' - 'ee/spec/lib/audit/details_spec.rb' @@ -308,7 +302,6 @@ RSpec/ContextWording: - 'ee/spec/lib/ee/gitlab/checks/push_rules/commit_check_spec.rb' - 'ee/spec/lib/ee/gitlab/ci/config/entry/needs_spec.rb' - 'ee/spec/lib/ee/gitlab/ci/matching/runner_matcher_spec.rb' - - 'ee/spec/lib/ee/gitlab/ci/pipeline/quota/activity_spec.rb' - 'ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb' - 'ee/spec/lib/ee/gitlab/ci/templates/templates_spec.rb' - 'ee/spec/lib/ee/gitlab/cleanup/orphan_job_artifact_files_batch_spec.rb' @@ -336,7 +329,6 @@ RSpec/ContextWording: - 'ee/spec/lib/gitlab/analytics/cycle_analytics/request_params_spec.rb' - 'ee/spec/lib/gitlab/auth/group_saml/gma_membership_enforcer_spec.rb' - 'ee/spec/lib/gitlab/auth/group_saml/identity_linker_spec.rb' - - 'ee/spec/lib/gitlab/auth/group_saml/sso_enforcer_spec.rb' - 'ee/spec/lib/gitlab/auth/group_saml/token_actor_spec.rb' - 'ee/spec/lib/gitlab/auth/ldap/access_spec.rb' - 'ee/spec/lib/gitlab/auth/ldap/adapter_spec.rb' @@ -367,8 +359,6 @@ RSpec/ContextWording: - 'ee/spec/lib/gitlab/code_owners/groups_loader_spec.rb' - 'ee/spec/lib/gitlab/code_owners/loader_spec.rb' - 'ee/spec/lib/gitlab/code_owners/users_loader_spec.rb' - - 'ee/spec/lib/gitlab/com_spec.rb' - - 'ee/spec/lib/gitlab/contribution_analytics/data_collector_spec.rb' - 'ee/spec/lib/gitlab/custom_file_templates_spec.rb' - 'ee/spec/lib/gitlab/elastic/bulk_indexer_spec.rb' - 'ee/spec/lib/gitlab/elastic/client_spec.rb' @@ -430,6 +420,7 @@ RSpec/ContextWording: - 'ee/spec/models/boards/epic_board_position_spec.rb' - 'ee/spec/models/ci/minutes/namespace_monthly_usage_spec.rb' - 'ee/spec/models/ci/minutes/project_monthly_usage_spec.rb' + - 'ee/spec/models/ci/pipeline_spec.rb' - 'ee/spec/models/ci/sources/project_spec.rb' - 'ee/spec/models/ci/subscriptions/project_spec.rb' - 'ee/spec/models/concerns/approval_rule_like_spec.rb' @@ -544,7 +535,6 @@ RSpec/ContextWording: - 'ee/spec/requests/api/ci/runner_spec.rb' - 'ee/spec/requests/api/commits_spec.rb' - 'ee/spec/requests/api/deployments_spec.rb' - - 'ee/spec/requests/api/dora/metrics_spec.rb' - 'ee/spec/requests/api/epic_issues_spec.rb' - 'ee/spec/requests/api/epic_links_spec.rb' - 'ee/spec/requests/api/epics_spec.rb' @@ -783,6 +773,7 @@ RSpec/ContextWording: - 'ee/spec/services/merge_requests/reload_merge_head_diff_service_spec.rb' - 'ee/spec/services/merge_requests/update_blocks_service_spec.rb' - 'ee/spec/services/milestones/update_service_spec.rb' + - 'ee/spec/services/package_metadata/ingestion/ingestion_service_spec.rb' - 'ee/spec/services/personal_access_tokens/revoke_invalid_tokens_spec.rb' - 'ee/spec/services/personal_access_tokens/rotation_verifier_service_spec.rb' - 'ee/spec/services/projects/alerting/notify_service_spec.rb' @@ -827,6 +818,7 @@ RSpec/ContextWording: - 'ee/spec/services/status_page/publish_attachments_service_spec.rb' - 'ee/spec/services/status_page/publish_details_service_spec.rb' - 'ee/spec/services/system_notes/epics_service_spec.rb' + - 'ee/spec/services/system_notes/vulnerabilities_service_spec.rb' - 'ee/spec/services/timebox_report_service_spec.rb' - 'ee/spec/services/todo_service_spec.rb' - 'ee/spec/services/upcoming_reconciliations/update_service_spec.rb' @@ -930,6 +922,7 @@ RSpec/ContextWording: - 'ee/spec/workers/post_receive_spec.rb' - 'ee/spec/workers/project_import_schedule_worker_spec.rb' - 'ee/spec/workers/requirements_management/process_requirements_reports_worker_spec.rb' + - 'ee/spec/workers/security/store_scans_worker_spec.rb' - 'ee/spec/workers/security/track_secure_scans_worker_spec.rb' - 'ee/spec/workers/sync_seat_link_worker_spec.rb' - 'qa/qa/specs/features/api/1_manage/user_access_termination_spec.rb' @@ -947,7 +940,6 @@ RSpec/ContextWording: - '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/qa/specs/features/ee/browser_ui/4_verify/new_discussion_not_dropping_merge_trains_mr_spec.rb' - 'qa/spec/git/repository_spec.rb' - 'qa/spec/page/element_spec.rb' - 'qa/spec/service/docker_run/gitlab_runner_spec.rb' @@ -958,6 +950,7 @@ RSpec/ContextWording: - 'qa/spec/support/page_error_checker_spec.rb' - 'spec/benchmarks/banzai_benchmark.rb' - 'spec/bin/feature_flag_spec.rb' + - 'spec/commands/metrics_server/metrics_server_spec.rb' - 'spec/commands/sidekiq_cluster/cli_spec.rb' - 'spec/components/diffs/overflow_warning_component_spec.rb' - 'spec/components/pajamas/alert_component_spec.rb' @@ -1006,7 +999,6 @@ RSpec/ContextWording: - 'spec/controllers/import/bulk_imports_controller_spec.rb' - 'spec/controllers/import/fogbugz_controller_spec.rb' - 'spec/controllers/import/github_controller_spec.rb' - - 'spec/controllers/import/gitlab_controller_spec.rb' - 'spec/controllers/jira_connect/events_controller_spec.rb' - 'spec/controllers/jira_connect/subscriptions_controller_spec.rb' - 'spec/controllers/ldap/omniauth_callbacks_controller_spec.rb' @@ -1071,6 +1063,7 @@ RSpec/ContextWording: - 'spec/controllers/projects/web_ide_terminals_controller_spec.rb' - 'spec/controllers/projects_controller_spec.rb' - 'spec/controllers/registrations_controller_spec.rb' + - 'spec/controllers/repositories/lfs_storage_controller_spec.rb' - 'spec/controllers/root_controller_spec.rb' - 'spec/controllers/search_controller_spec.rb' - 'spec/controllers/sessions_controller_spec.rb' @@ -1108,13 +1101,10 @@ RSpec/ContextWording: - 'spec/features/boards/sidebar_labels_in_namespaces_spec.rb' - 'spec/features/boards/sidebar_labels_spec.rb' - 'spec/features/boards/user_visits_board_spec.rb' - - 'spec/features/calendar_spec.rb' - - 'spec/features/clusters/cluster_health_dashboard_spec.rb' - 'spec/features/commits_spec.rb' - 'spec/features/dashboard/activity_spec.rb' - 'spec/features/dashboard/groups_list_spec.rb' - 'spec/features/dashboard/issues_filter_spec.rb' - - 'spec/features/dashboard/label_filter_spec.rb' - 'spec/features/dashboard/merge_requests_spec.rb' - 'spec/features/dashboard/projects_spec.rb' - 'spec/features/dashboard/shortcuts_spec.rb' @@ -1179,7 +1169,6 @@ RSpec/ContextWording: - 'spec/features/markdown/copy_as_gfm_spec.rb' - 'spec/features/markdown/keyboard_shortcuts_spec.rb' - 'spec/features/markdown/markdown_spec.rb' - - 'spec/features/markdown/metrics_spec.rb' - 'spec/features/merge_request/batch_comments_spec.rb' - 'spec/features/merge_request/close_reopen_report_toggle_spec.rb' - 'spec/features/merge_request/merge_request_discussion_lock_spec.rb' @@ -1193,7 +1182,6 @@ RSpec/ContextWording: - 'spec/features/merge_request/user_manages_subscription_spec.rb' - 'spec/features/merge_request/user_merges_merge_request_spec.rb' - 'spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb' - - 'spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb' - 'spec/features/merge_request/user_posts_diff_notes_spec.rb' - 'spec/features/merge_request/user_resolves_conflicts_spec.rb' - 'spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb' @@ -1312,7 +1300,6 @@ RSpec/ContextWording: - 'spec/features/users/show_spec.rb' - 'spec/features/users/snippets_spec.rb' - 'spec/features/users/terms_spec.rb' - - 'spec/finders/abuse_reports_finder_spec.rb' - 'spec/finders/admin/projects_finder_spec.rb' - 'spec/finders/alert_management/alerts_finder_spec.rb' - 'spec/finders/alert_management/http_integrations_finder_spec.rb' @@ -1411,7 +1398,6 @@ RSpec/ContextWording: - 'spec/graphql/resolvers/alert_management/integrations_resolver_spec.rb' - 'spec/graphql/resolvers/base_resolver_spec.rb' - 'spec/graphql/resolvers/blobs_resolver_spec.rb' - - 'spec/graphql/resolvers/ci/runner_status_resolver_spec.rb' - 'spec/graphql/resolvers/clusters/agent_activity_events_resolver_spec.rb' - 'spec/graphql/resolvers/clusters/agent_tokens_resolver_spec.rb' - 'spec/graphql/resolvers/clusters/agents_resolver_spec.rb' @@ -1445,6 +1431,7 @@ RSpec/ContextWording: - 'spec/graphql/resolvers/users/group_count_resolver_spec.rb' - 'spec/graphql/resolvers/users/participants_resolver_spec.rb' - 'spec/graphql/subscriptions/issuable_updated_spec.rb' + - 'spec/graphql/types/alert_management/prometheus_integration_type_spec.rb' - 'spec/graphql/types/base_field_spec.rb' - 'spec/graphql/types/global_id_type_spec.rb' - 'spec/graphql/types/issue_type_spec.rb' @@ -1467,13 +1454,11 @@ RSpec/ContextWording: - 'spec/helpers/commits_helper_spec.rb' - 'spec/helpers/diff_helper_spec.rb' - 'spec/helpers/emails_helper_spec.rb' - - 'spec/helpers/environments_helper_spec.rb' - 'spec/helpers/events_helper_spec.rb' - 'spec/helpers/git_helper_spec.rb' - 'spec/helpers/gitlab_routing_helper_spec.rb' - 'spec/helpers/groups/group_members_helper_spec.rb' - 'spec/helpers/groups_helper_spec.rb' - - 'spec/helpers/integrations_helper_spec.rb' - 'spec/helpers/jira_connect_helper_spec.rb' - 'spec/helpers/labels_helper_spec.rb' - 'spec/helpers/listbox_helper_spec.rb' @@ -1493,13 +1478,11 @@ RSpec/ContextWording: - 'spec/helpers/timeboxes_helper_spec.rb' - 'spec/helpers/todos_helper_spec.rb' - 'spec/helpers/tree_helper_spec.rb' - - 'spec/helpers/users/callouts_helper_spec.rb' - 'spec/helpers/users_helper_spec.rb' - 'spec/helpers/visibility_level_helper_spec.rb' - 'spec/helpers/web_hooks/web_hooks_helper_spec.rb' - 'spec/helpers/whats_new_helper_spec.rb' - 'spec/helpers/wiki_helper_spec.rb' - - 'spec/initializers/00_rails_disable_joins_spec.rb' - 'spec/initializers/1_acts_as_taggable_spec.rb' - 'spec/initializers/carrierwave_s3_encryption_headers_patch_spec.rb' - 'spec/initializers/enumerator_next_patch_spec.rb' @@ -1512,6 +1495,7 @@ RSpec/ContextWording: - 'spec/lib/api/entities/basic_project_details_spec.rb' - 'spec/lib/api/entities/clusters/agents/authorizations/ci_access_spec.rb' - 'spec/lib/api/entities/nuget/dependency_group_spec.rb' + - 'spec/lib/api/entities/nuget/metadatum_spec.rb' - 'spec/lib/api/entities/user_spec.rb' - 'spec/lib/api/every_api_endpoint_spec.rb' - 'spec/lib/api/helpers/caching_spec.rb' @@ -1533,6 +1517,7 @@ RSpec/ContextWording: - 'spec/lib/api/validations/validators/untrusted_regexp_spec.rb' - 'spec/lib/atlassian/jira_connect/jwt/asymmetric_spec.rb' - 'spec/lib/atlassian/jira_connect/jwt/symmetric_spec.rb' + - 'spec/lib/atlassian/jira_connect/serializers/build_entity_spec.rb' - 'spec/lib/atlassian/jira_connect/serializers/feature_flag_entity_spec.rb' - 'spec/lib/atlassian/jira_connect_spec.rb' - 'spec/lib/backup/gitaly_backup_spec.rb' @@ -1548,8 +1533,6 @@ RSpec/ContextWording: - 'spec/lib/banzai/filter/external_link_filter_spec.rb' - 'spec/lib/banzai/filter/front_matter_filter_spec.rb' - 'spec/lib/banzai/filter/gollum_tags_filter_spec.rb' - - 'spec/lib/banzai/filter/inline_metrics_redactor_filter_spec.rb' - - 'spec/lib/banzai/filter/markdown_filter_spec.rb' - 'spec/lib/banzai/filter/reference_redactor_filter_spec.rb' - 'spec/lib/banzai/filter/references/abstract_reference_filter_spec.rb' - 'spec/lib/banzai/filter/references/alert_reference_filter_spec.rb' @@ -1641,9 +1624,7 @@ RSpec/ContextWording: - 'spec/lib/gitlab/authorized_keys_spec.rb' - 'spec/lib/gitlab/avatar_cache_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_imported_issue_search_data_spec.rb' - - 'spec/lib/gitlab/background_migration/cleanup_draft_data_from_faulty_regex_spec.rb' - 'spec/lib/gitlab/background_migration/copy_column_using_background_migration_job_spec.rb' - - 'spec/lib/gitlab/background_migration/project_namespaces/backfill_project_namespaces_spec.rb' - 'spec/lib/gitlab/bitbucket_import/importer_spec.rb' - 'spec/lib/gitlab/bitbucket_server_import/importer_spec.rb' - 'spec/lib/gitlab/blame_spec.rb' @@ -1686,7 +1667,6 @@ RSpec/ContextWording: - 'spec/lib/gitlab/ci/config/external/file/local_spec.rb' - 'spec/lib/gitlab/ci/config/external/mapper_spec.rb' - 'spec/lib/gitlab/ci/config_spec.rb' - - 'spec/lib/gitlab/ci/jwt_spec.rb' - 'spec/lib/gitlab/ci/lint_spec.rb' - 'spec/lib/gitlab/ci/matching/runner_matcher_spec.rb' - 'spec/lib/gitlab/ci/parsers/security/common_spec.rb' @@ -1705,6 +1685,7 @@ RSpec/ContextWording: - 'spec/lib/gitlab/ci/reports/security/aggregated_report_spec.rb' - 'spec/lib/gitlab/ci/reports/test_suite_comparer_spec.rb' - 'spec/lib/gitlab/ci/runner_instructions_spec.rb' + - 'spec/lib/gitlab/ci/runner_releases_spec.rb' - 'spec/lib/gitlab/ci/runner_upgrade_check_spec.rb' - 'spec/lib/gitlab/ci/status/bridge/factory_spec.rb' - 'spec/lib/gitlab/ci/status/build/failed_spec.rb' @@ -1712,7 +1693,6 @@ RSpec/ContextWording: - 'spec/lib/gitlab/ci/status/factory_spec.rb' - 'spec/lib/gitlab/ci/templates/Jobs/code_quality_gitlab_ci_yaml_spec.rb' - 'spec/lib/gitlab/ci/templates/Jobs/sast_iac_gitlab_ci_yaml_spec.rb' - - 'spec/lib/gitlab/ci/templates/Jobs/sast_iac_latest_gitlab_ci_yaml_spec.rb' - 'spec/lib/gitlab/ci/templates/Jobs/test_gitlab_ci_yaml_spec.rb' - 'spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb' - 'spec/lib/gitlab/ci/templates/templates_spec.rb' @@ -1752,6 +1732,7 @@ RSpec/ContextWording: - 'spec/lib/gitlab/database/count/reltuples_count_strategy_spec.rb' - 'spec/lib/gitlab/database/count/tablesample_count_strategy_spec.rb' - 'spec/lib/gitlab/database/count_spec.rb' + - 'spec/lib/gitlab/database/gitlab_schema_spec.rb' - 'spec/lib/gitlab/database/load_balancing/connection_proxy_spec.rb' - 'spec/lib/gitlab/database/load_balancing/load_balancer_spec.rb' - 'spec/lib/gitlab/database/load_balancing/rack_middleware_spec.rb' @@ -1760,6 +1741,7 @@ RSpec/ContextWording: - 'spec/lib/gitlab/database/load_balancing/sidekiq_server_middleware_spec.rb' - 'spec/lib/gitlab/database/load_balancing_spec.rb' - 'spec/lib/gitlab/database/loose_foreign_keys_spec.rb' + - 'spec/lib/gitlab/database/migration_helpers/restrict_gitlab_schema_spec.rb' - 'spec/lib/gitlab/database/migration_helpers/v2_spec.rb' - 'spec/lib/gitlab/database/migration_helpers_spec.rb' - 'spec/lib/gitlab/database/migration_spec.rb' @@ -1791,7 +1773,6 @@ RSpec/ContextWording: - 'spec/lib/gitlab/database/schema_migrations/context_spec.rb' - 'spec/lib/gitlab/database/with_lock_retries_outside_transaction_spec.rb' - 'spec/lib/gitlab/database/with_lock_retries_spec.rb' - - 'spec/lib/gitlab/database_importers/common_metrics/importer_spec.rb' - 'spec/lib/gitlab/database_spec.rb' - 'spec/lib/gitlab/default_branch_spec.rb' - 'spec/lib/gitlab/deploy_key_access_spec.rb' @@ -1842,6 +1823,7 @@ RSpec/ContextWording: - 'spec/lib/gitlab/git/diff_collection_spec.rb' - 'spec/lib/gitlab/git/diff_spec.rb' - 'spec/lib/gitlab/git/merge_base_spec.rb' + - 'spec/lib/gitlab/git/pre_receive_error_spec.rb' - 'spec/lib/gitlab/git/raw_diff_change_spec.rb' - 'spec/lib/gitlab/git/repository_spec.rb' - 'spec/lib/gitlab/git/rugged_impl/use_rugged_spec.rb' @@ -1909,6 +1891,7 @@ RSpec/ContextWording: - 'spec/lib/gitlab/import_export/project/sample/relation_tree_restorer_spec.rb' - 'spec/lib/gitlab/import_export/project/tree_restorer_spec.rb' - 'spec/lib/gitlab/import_export/project/tree_saver_spec.rb' + - 'spec/lib/gitlab/import_export/references_configuration_spec.rb' - 'spec/lib/gitlab/import_export/version_checker_spec.rb' - 'spec/lib/gitlab/instrumentation/redis_base_spec.rb' - 'spec/lib/gitlab/instrumentation_helper_spec.rb' @@ -2031,6 +2014,7 @@ RSpec/ContextWording: - 'spec/lib/gitlab/ssh_public_key_spec.rb' - 'spec/lib/gitlab/submodule_links_spec.rb' - 'spec/lib/gitlab/suggestions/commit_message_spec.rb' + - 'spec/lib/gitlab/task_helpers_spec.rb' - 'spec/lib/gitlab/template/finders/global_template_finder_spec.rb' - 'spec/lib/gitlab/time_tracking_formatter_spec.rb' - 'spec/lib/gitlab/tracking/destinations/snowplow_spec.rb' @@ -2058,7 +2042,9 @@ RSpec/ContextWording: - 'spec/lib/gitlab/usage_data_counters/search_counter_spec.rb' - 'spec/lib/gitlab/usage_data_spec.rb' - 'spec/lib/gitlab/utils/lazy_attributes_spec.rb' + - 'spec/lib/gitlab/utils/markdown_spec.rb' - 'spec/lib/gitlab/utils/mime_type_spec.rb' + - 'spec/lib/gitlab/utils/sanitize_node_link_spec.rb' - 'spec/lib/gitlab/utils/usage_data_spec.rb' - 'spec/lib/gitlab/view/presenter/base_spec.rb' - 'spec/lib/gitlab/visibility_level_checker_spec.rb' @@ -2162,6 +2148,7 @@ RSpec/ContextWording: - 'spec/models/concerns/ci/artifactable_spec.rb' - 'spec/models/concerns/ci/has_ref_spec.rb' - 'spec/models/concerns/ci/has_status_spec.rb' + - 'spec/models/concerns/counter_attribute_spec.rb' - 'spec/models/concerns/deployment_platform_spec.rb' - 'spec/models/concerns/ignorable_columns_spec.rb' - 'spec/models/concerns/issuable_spec.rb' @@ -2171,9 +2158,9 @@ RSpec/ContextWording: - 'spec/models/concerns/noteable_spec.rb' - 'spec/models/concerns/nullify_if_blank_spec.rb' - 'spec/models/concerns/participable_spec.rb' - - 'spec/models/concerns/protected_ref_access_spec.rb' - 'spec/models/concerns/reactive_caching_spec.rb' - 'spec/models/concerns/resolvable_note_spec.rb' + - 'spec/models/concerns/sensitive_serializable_hash_spec.rb' - 'spec/models/concerns/token_authenticatable_spec.rb' - 'spec/models/concerns/triggerable_hooks_spec.rb' - 'spec/models/concerns/usage_statistics_spec.rb' @@ -2207,7 +2194,6 @@ RSpec/ContextWording: - 'spec/models/import_export_upload_spec.rb' - 'spec/models/import_failure_spec.rb' - 'spec/models/integration_spec.rb' - - 'spec/models/integrations/asana_spec.rb' - 'spec/models/integrations/bamboo_spec.rb' - 'spec/models/integrations/base_chat_notification_spec.rb' - 'spec/models/integrations/chat_message/issue_message_spec.rb' @@ -2334,7 +2320,6 @@ RSpec/ContextWording: - 'spec/presenters/gitlab/blame_presenter_spec.rb' - 'spec/presenters/merge_request_presenter_spec.rb' - 'spec/presenters/packages/conan/package_presenter_spec.rb' - - 'spec/presenters/packages/npm/package_presenter_spec.rb' - 'spec/presenters/project_presenter_spec.rb' - 'spec/presenters/projects/import_export/project_export_presenter_spec.rb' - 'spec/presenters/projects/security/configuration_presenter_spec.rb' @@ -2362,7 +2347,6 @@ RSpec/ContextWording: - 'spec/requests/api/ci/pipeline_schedules_spec.rb' - 'spec/requests/api/ci/pipelines_spec.rb' - 'spec/requests/api/ci/runner/jobs_artifacts_spec.rb' - - 'spec/requests/api/ci/runner/jobs_request_post_spec.rb' - 'spec/requests/api/ci/runner/runners_post_spec.rb' - 'spec/requests/api/ci/runner/runners_reset_spec.rb' - 'spec/requests/api/ci/runners_spec.rb' @@ -2457,7 +2441,6 @@ RSpec/ContextWording: - 'spec/requests/api/internal/kubernetes_spec.rb' - 'spec/requests/api/internal/lfs_spec.rb' - 'spec/requests/api/internal/mail_room_spec.rb' - - 'spec/requests/api/internal/pages_spec.rb' - 'spec/requests/api/internal/workhorse_spec.rb' - 'spec/requests/api/invitations_spec.rb' - 'spec/requests/api/issue_links_spec.rb' @@ -2493,6 +2476,7 @@ RSpec/ContextWording: - 'spec/requests/api/releases_spec.rb' - 'spec/requests/api/remote_mirrors_spec.rb' - 'spec/requests/api/repositories_spec.rb' + - 'spec/requests/api/resource_access_tokens_spec.rb' - 'spec/requests/api/rubygem_packages_spec.rb' - 'spec/requests/api/search_spec.rb' - 'spec/requests/api/settings_spec.rb' @@ -2572,6 +2556,8 @@ RSpec/ContextWording: - 'spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb' - 'spec/rubocop/cop/qa/element_with_pattern_spec.rb' - 'spec/rubocop/cop/qa/selector_usage_spec.rb' + - 'spec/rubocop/cop/rspec/be_success_matcher_spec.rb' + - 'spec/rubocop/cop/rspec/expect_gitlab_tracking_spec.rb' - 'spec/rubocop/cop/rspec/factory_bot/inline_association_spec.rb' - 'spec/scripts/pipeline_test_report_builder_spec.rb' - 'spec/serializers/analytics_build_entity_spec.rb' @@ -2579,7 +2565,6 @@ RSpec/ContextWording: - 'spec/serializers/deploy_keys/basic_deploy_key_entity_spec.rb' - 'spec/serializers/diff_file_base_entity_spec.rb' - 'spec/serializers/diffs_entity_spec.rb' - - 'spec/serializers/environment_entity_spec.rb' - 'spec/serializers/environment_serializer_spec.rb' - 'spec/serializers/group_child_entity_spec.rb' - 'spec/serializers/group_link/group_group_link_entity_spec.rb' @@ -2636,8 +2621,8 @@ RSpec/ContextWording: - 'spec/services/ci/update_build_queue_service_spec.rb' - 'spec/services/ci/update_pending_build_service_spec.rb' - 'spec/services/clusters/agent_tokens/track_usage_service_spec.rb' - - 'spec/services/clusters/agents/delete_expired_events_service_spec.rb' - 'spec/services/clusters/agents/authorizations/ci_access/refresh_service_spec.rb' + - 'spec/services/clusters/agents/delete_expired_events_service_spec.rb' - 'spec/services/clusters/build_kubernetes_namespace_service_spec.rb' - 'spec/services/clusters/create_service_spec.rb' - 'spec/services/clusters/kubernetes/create_or_update_namespace_service_spec.rb' @@ -2665,6 +2650,7 @@ RSpec/ContextWording: - 'spec/services/environments/schedule_to_delete_review_apps_service_spec.rb' - 'spec/services/environments/stop_service_spec.rb' - 'spec/services/error_tracking/list_projects_service_spec.rb' + - 'spec/services/event_create_service_spec.rb' - 'spec/services/events/destroy_service_spec.rb' - 'spec/services/feature_flags/update_service_spec.rb' - 'spec/services/files/create_service_spec.rb' @@ -2791,13 +2777,13 @@ RSpec/ContextWording: - 'spec/services/packages/maven/metadata/create_versions_xml_service_spec.rb' - 'spec/services/packages/maven/metadata/sync_service_spec.rb' - 'spec/services/packages/npm/create_package_service_spec.rb' - - 'spec/services/packages/nuget/metadata_extraction_service_spec.rb' - 'spec/services/packages/nuget/search_service_spec.rb' - 'spec/services/packages/nuget/update_package_from_metadata_service_spec.rb' - 'spec/services/packages/rubygems/dependency_resolver_service_spec.rb' - 'spec/services/packages/rubygems/process_gem_service_spec.rb' - 'spec/services/packages/terraform_module/create_package_service_spec.rb' - 'spec/services/pages/zip_directory_service_spec.rb' + - 'spec/services/pages_domains/obtain_lets_encrypt_certificate_service_spec.rb' - 'spec/services/personal_access_tokens/create_service_spec.rb' - 'spec/services/personal_access_tokens/revoke_service_spec.rb' - 'spec/services/post_receive_service_spec.rb' @@ -2892,14 +2878,7 @@ RSpec/ContextWording: - 'spec/services/wikis/create_attachment_service_spec.rb' - 'spec/services/work_items/create_service_spec.rb' - 'spec/services/work_items/parent_links/create_service_spec.rb' - - 'spec/support/banzai/reference_filter_shared_examples.rb' - - 'spec/support/prometheus/additional_metrics_shared_examples.rb' - - 'spec/support/redis/redis_shared_examples.rb' - - 'spec/support/services/clusters/create_service_shared.rb' - - 'spec/support/services/deploy_token_shared_examples.rb' - - 'spec/support/services/issuable_import_csv_service_shared_examples.rb' - - 'spec/support/services/issuable_update_service_shared_examples.rb' - - 'spec/support/services/migrate_to_ghost_user_service_shared_examples.rb' + - 'spec/support/helpers/cycle_analytics_helpers/test_generation.rb' - 'spec/support/shared_contexts/bulk_imports_requests_shared_context.rb' - 'spec/support/shared_contexts/changes_access_checks_shared_context.rb' - 'spec/support/shared_contexts/container_repositories_shared_context.rb' @@ -2919,13 +2898,11 @@ RSpec/ContextWording: - 'spec/support/shared_contexts/finders/group_projects_finder_shared_contexts.rb' - 'spec/support/shared_contexts/finders/issues_finder_shared_contexts.rb' - 'spec/support/shared_contexts/finders/merge_requests_finder_shared_contexts.rb' - - 'spec/support/shared_contexts/finders/packages/npm/package_finder_shared_context.rb' - 'spec/support/shared_contexts/finders/users_finder_shared_contexts.rb' - 'spec/support/shared_contexts/finders/work_items_finder_shared_contexts.rb' - 'spec/support/shared_contexts/fixtures/analytics_shared_context.rb' - 'spec/support/shared_contexts/graphql/requests/packages_shared_context.rb' - 'spec/support/shared_contexts/graphql/resolvers/runners_resolver_shared_context.rb' - - 'spec/support/shared_contexts/issuable/merge_request_shared_context.rb' - 'spec/support/shared_contexts/issuable/project_shared_context.rb' - 'spec/support/shared_contexts/json_response_shared_context.rb' - 'spec/support/shared_contexts/lib/api/helpers/packages/dependency_proxy_helpers_shared_context.rb' @@ -2968,7 +2945,6 @@ RSpec/ContextWording: - 'spec/support/shared_contexts/unique_ip_check_shared_context.rb' - 'spec/support/shared_contexts/upload_type_check_shared_context.rb' - 'spec/support/shared_contexts/url_shared_context.rb' - - 'spec/support/shared_examples/banzai/filters/inline_metrics_redactor_shared_examples.rb' - 'spec/support/shared_examples/boards/multiple_issue_boards_shared_examples.rb' - 'spec/support/shared_examples/controllers/clusters_controller_shared_examples.rb' - 'spec/support/shared_examples/controllers/githubish_import_controller_shared_examples.rb' @@ -2980,6 +2956,7 @@ RSpec/ContextWording: - 'spec/support/shared_examples/features/access_tokens_shared_examples.rb' - 'spec/support/shared_examples/features/archive_download_buttons_shared_examples.rb' - 'spec/support/shared_examples/features/board_sidebar_labels_examples.rb' + - 'spec/support/shared_examples/features/packages_shared_examples.rb' - 'spec/support/shared_examples/features/project_features_apply_to_issuables_shared_examples.rb' - 'spec/support/shared_examples/features/sidebar/sidebar_due_date_shared_examples.rb' - 'spec/support/shared_examples/features/sidebar/sidebar_labels_shared_examples.rb' @@ -3041,6 +3018,7 @@ RSpec/ContextWording: - 'spec/support/shared_examples/policies/project_policy_shared_examples.rb' - 'spec/support/shared_examples/policies/resource_access_token_shared_examples.rb' - 'spec/support/shared_examples/quick_actions/commit/tag_quick_action_shared_examples.rb' + - 'spec/support/shared_examples/quick_actions/issuable/close_quick_action_shared_examples.rb' - 'spec/support/shared_examples/quick_actions/issue/clone_quick_action_shared_examples.rb' - 'spec/support/shared_examples/quick_actions/issue/create_merge_request_quick_action_shared_examples.rb' - 'spec/support/shared_examples/quick_actions/issue/move_quick_action_shared_examples.rb' @@ -3060,7 +3038,6 @@ RSpec/ContextWording: - 'spec/support/shared_examples/requests/api/multiple_and_scoped_issue_boards_shared_examples.rb' - 'spec/support/shared_examples/requests/api/notes_shared_examples.rb' - 'spec/support/shared_examples/requests/api/npm_packages_shared_examples.rb' - - 'spec/support/shared_examples/requests/api/nuget_endpoints_shared_examples.rb' - 'spec/support/shared_examples/requests/api/nuget_packages_shared_examples.rb' - 'spec/support/shared_examples/requests/api/packages_shared_examples.rb' - 'spec/support/shared_examples/requests/api/pypi_packages_shared_examples.rb' @@ -3085,7 +3062,6 @@ RSpec/ContextWording: - 'spec/support/shared_examples/services/metrics/dashboard_shared_examples.rb' - 'spec/support/shared_examples/services/notification_service_shared_examples.rb' - 'spec/support/shared_examples/services/packages_shared_examples.rb' - - 'spec/support/shared_examples/services/projects/update_repository_storage_service_shared_examples.rb' - 'spec/support/shared_examples/services/repositories/housekeeping_shared_examples.rb' - 'spec/support/shared_examples/services/schedule_bulk_repository_shard_moves_shared_examples.rb' - 'spec/support/shared_examples/services/security/ci_configuration/create_service_shared_examples.rb' @@ -3111,7 +3087,6 @@ RSpec/ContextWording: - 'spec/tasks/gitlab/lfs/migrate_rake_spec.rb' - 'spec/tasks/gitlab/packages/migrate_rake_spec.rb' - 'spec/tasks/gitlab/storage_rake_spec.rb' - - 'spec/lib/gitlab/task_helpers_spec.rb' - 'spec/tasks/gitlab/terraform/migrate_rake_spec.rb' - 'spec/tasks/gitlab/workhorse_rake_spec.rb' - 'spec/tooling/danger/project_helper_spec.rb' @@ -3205,7 +3180,6 @@ RSpec/ContextWording: - 'spec/workers/integrations/create_external_cross_reference_worker_spec.rb' - 'spec/workers/issues/placement_worker_spec.rb' - 'spec/workers/merge_requests/delete_source_branch_worker_spec.rb' - - 'spec/workers/metrics/dashboard/prune_old_annotations_worker_spec.rb' - 'spec/workers/packages/composer/cache_update_worker_spec.rb' - 'spec/workers/packages/go/sync_packages_worker_spec.rb' - 'spec/workers/packages/maven/metadata/sync_worker_spec.rb' diff --git a/.rubocop_todo/rspec/factory_bot/excessive_create_list.yml b/.rubocop_todo/rspec/factory_bot/excessive_create_list.yml new file mode 100644 index 00000000000..5cff05f4163 --- /dev/null +++ b/.rubocop_todo/rspec/factory_bot/excessive_create_list.yml @@ -0,0 +1,50 @@ +--- +RSpec/FactoryBot/ExcessiveCreateList: + Details: grace period + Exclude: + - 'ee/spec/controllers/groups/hooks_controller_spec.rb' + - 'ee/spec/controllers/projects/vulnerability_feedback_controller_spec.rb' + - 'ee/spec/features/search/elastic/global_search_spec.rb' + - 'ee/spec/frontend/fixtures/on_demand_dast_scans.rb' + - 'ee/spec/graphql/types/dast_scanner_profile_type_spec.rb' + - 'ee/spec/graphql/types/dast_site_profile_type_spec.rb' + - 'ee/spec/models/audit_events/external_audit_event_destination_spec.rb' + - 'ee/spec/models/audit_events/instance_external_audit_event_destination_spec.rb' + - 'ee/spec/models/license_spec.rb' + - 'ee/spec/models/package_metadata/advisory_spec.rb' + - 'ee/spec/models/package_metadata/checkpoint_spec.rb' + - 'ee/spec/requests/projects/merge_requests_controller_spec.rb' + - 'ee/spec/services/ci/llm/generate_config_service_spec.rb' + - 'ee/spec/support/protected_tags/access_control_shared_examples.rb' + - 'ee/spec/support/shared_examples/features/protected_branches_access_control_shared_examples.rb' + - 'ee/spec/views/admin/application_settings/_elasticsearch_form.html.haml_spec.rb' + - 'spec/controllers/admin/clusters_controller_spec.rb' + - 'spec/controllers/autocomplete_controller_spec.rb' + - 'spec/controllers/explore/projects_controller_spec.rb' + - 'spec/controllers/groups/clusters_controller_spec.rb' + - 'spec/controllers/projects/clusters_controller_spec.rb' + - 'spec/controllers/projects/feature_flags_controller_spec.rb' + - 'spec/controllers/projects/hooks_controller_spec.rb' + - 'spec/docs_screenshots/container_registry_docs.rb' + - 'spec/features/boards/boards_spec.rb' + - 'spec/features/issues/csv_spec.rb' + - 'spec/features/issues/user_edits_issue_spec.rb' + - 'spec/features/issues/user_scrolls_to_deeplinked_note_spec.rb' + - 'spec/features/projects/container_registry_spec.rb' + - 'spec/features/projects/work_items/work_item_spec.rb' + - 'spec/features/users/overview_spec.rb' + - 'spec/frontend/fixtures/timelogs.rb' + - 'spec/helpers/issuables_helper_spec.rb' + - 'spec/lib/gitlab/database/background_migration/batched_migration_spec.rb' + - 'spec/lib/gitlab/database/consistency_checker_spec.rb' + - 'spec/models/project_spec.rb' + - 'spec/models/user_spec.rb' + - 'spec/requests/api/graphql/mutations/packages/destroy_files_spec.rb' + - 'spec/requests/api/project_packages_spec.rb' + - 'spec/services/database/consistency_check_service_spec.rb' + - 'spec/services/groups/transfer_service_spec.rb' + - 'spec/services/notification_service_spec.rb' + - 'spec/services/pages/migrate_from_legacy_storage_service_spec.rb' + - 'spec/services/todo_service_spec.rb' + - 'spec/support/shared_examples/services/notification_service_shared_examples.rb' + - 'spec/workers/ssh_keys/expired_notification_worker_spec.rb' diff --git a/.rubocop_todo/rspec/useless_dynamic_definition.yml b/.rubocop_todo/rspec/useless_dynamic_definition.yml new file mode 100644 index 00000000000..b3dabf433a0 --- /dev/null +++ b/.rubocop_todo/rspec/useless_dynamic_definition.yml @@ -0,0 +1,12 @@ +--- +RSpec/UselessDynamicDefinition: + Details: grace period + Exclude: + - 'ee/spec/factories/ci/builds.rb' + - 'ee/spec/factories/ci/job_artifacts.rb' + - 'ee/spec/factories/ci/pipelines.rb' + - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/count_security_scans_metric_spec.rb' + - 'ee/spec/support/shared_examples/lib/gitlab/elastic/search_results_shared_examples.rb' + - 'spec/models/ci/resource_group_spec.rb' + - 'spec/services/packages/nuget/update_package_from_metadata_service_spec.rb' + - 'spec/support/helpers/cycle_analytics_helpers/test_generation.rb' diff --git a/.rubocop_todo/style/redundant_parentheses.yml b/.rubocop_todo/style/redundant_parentheses.yml new file mode 100644 index 00000000000..540dcfa3ca7 --- /dev/null +++ b/.rubocop_todo/style/redundant_parentheses.yml @@ -0,0 +1,9 @@ +--- +# Cop supports --autocorrect. +Style/RedundantParentheses: + Details: grace period + Exclude: + - 'spec/graphql/types/ci/job_kind_enum_spec.rb' + - 'spec/lib/gitlab/import_export/command_line_util_spec.rb' + - 'spec/requests/verifies_with_email_spec.rb' + - 'spec/services/projects/create_service_spec.rb' @@ -415,7 +415,7 @@ group :development, :test do gem 'spring', '~> 4.1.0' gem 'spring-commands-rspec', '~> 1.0.4' - gem 'gitlab-styles', '~> 10.0.0', require: false + gem 'gitlab-styles', '~> 10.1.0', require: false gem 'haml_lint', '~> 0.40.0', require: false gem 'bundler-audit', '~> 0.7.0.1', require: false diff --git a/Gemfile.checksum b/Gemfile.checksum index 4b55e772a18..904ae5f00e0 100644 --- a/Gemfile.checksum +++ b/Gemfile.checksum @@ -215,7 +215,7 @@ {"name":"gitlab-mail_room","version":"0.0.23","platform":"ruby","checksum":"23564fa4dab24ec5011d4c64a801fc0228301d5b0f046a26a1d8e96e36c19997"}, {"name":"gitlab-markup","version":"1.9.0","platform":"ruby","checksum":"7eda045a08ec2d110084252fa13a8c9eac8bdac0e302035ca7db4b82bcbd7ed4"}, {"name":"gitlab-net-dns","version":"0.9.2","platform":"ruby","checksum":"f726d978479d43810819f12a45c0906d775a07e34df111bbe693fffbbef3059d"}, -{"name":"gitlab-styles","version":"10.0.0","platform":"ruby","checksum":"8a1b20f7b5f351605ff4ed4ec648ef37226f2774d1e1377ed99389448d6913f0"}, +{"name":"gitlab-styles","version":"10.1.0","platform":"ruby","checksum":"f42745f5397d042fe24cf2d0eb56c995b37f9f43d8fb79b834d197a1cafdc84a"}, {"name":"gitlab_chronic_duration","version":"0.10.6.2","platform":"ruby","checksum":"6dda4cfe7dca9b958f163ac8835c3d9cc70cf8df8cbb89bb2fbf9ba4375105fb"}, {"name":"gitlab_omniauth-ldap","version":"2.2.0","platform":"ruby","checksum":"bb4d20acb3b123ed654a8f6a47d3fac673ece7ed0b6992edb92dca14bad2838c"}, {"name":"gitlab_quality-test_tooling","version":"0.8.1","platform":"ruby","checksum":"01108f12c7b67aa0450ce76a4e669722f536250ff696abae9f126d072164bc0b"}, @@ -535,13 +535,14 @@ {"name":"rspec-support","version":"3.12.0","platform":"ruby","checksum":"dd4d44b247ff679b95b5607ac5641d197a5f9b1d33f916123cb98fc5f917c58b"}, {"name":"rspec_junit_formatter","version":"0.6.0","platform":"ruby","checksum":"40dde674e6ae4e6cc0ff560da25497677e34fefd2338cc467a8972f602b62b15"}, {"name":"rspec_profiling","version":"0.0.6","platform":"ruby","checksum":"7a45697f79dcec9a174a0e26703465f6bd52ee78e8d798741240bfcef38f6e6e"}, -{"name":"rubocop","version":"1.43.0","platform":"ruby","checksum":"d08127ff6d99b7217b9ac27b51be872270bc7f19151706d799e18a5e4777adc6"}, -{"name":"rubocop-ast","version":"1.24.1","platform":"ruby","checksum":"6dd194309d48ebb1c558329ffd46a04e2fdf1652d8cde574f963c392fe52bfdd"}, -{"name":"rubocop-capybara","version":"2.17.0","platform":"ruby","checksum":"bbdc757d091788fafc37a634c54e1a930489498a36f81321c5c50cf0a76498c0"}, +{"name":"rubocop","version":"1.50.2","platform":"ruby","checksum":"7cfeb0616f686ac61d049beae89f31446792d7e9f5728152657548f70aa78650"}, +{"name":"rubocop-ast","version":"1.29.0","platform":"ruby","checksum":"d1da2ab279a074baefc81758ac430c5768a8da8c7438dd4e5819ce5984d00ba1"}, +{"name":"rubocop-capybara","version":"2.18.0","platform":"ruby","checksum":"66b256755101f76dc455ba9694e2414bc957db5200401d204b00bc835401d605"}, +{"name":"rubocop-factory_bot","version":"2.23.1","platform":"ruby","checksum":"c19ee30c02e591f4293c07e943e22b7999c545d5010aac4d79621ee310850c4f"}, {"name":"rubocop-graphql","version":"0.19.0","platform":"ruby","checksum":"ba4b2fc91c9f0fda47e0870a6ae15a1e5525d6caffcb150dc88b00caaacc3e43"}, -{"name":"rubocop-performance","version":"1.16.0","platform":"ruby","checksum":"cc764f84bf37c6ef269973e686c3b33f258ffd612130e40856b25103de06efd8"}, -{"name":"rubocop-rails","version":"2.17.4","platform":"ruby","checksum":"8004149a14372d3d6cededd000357879fa7eb0421403a7a26bc717e2a98bbedb"}, -{"name":"rubocop-rspec","version":"2.18.1","platform":"ruby","checksum":"41c6455630fc98b809ebca047413389e2b7e3f68975028365c07bfea878db5ee"}, +{"name":"rubocop-performance","version":"1.18.0","platform":"ruby","checksum":"4c9d74f1b5bfaffb5b1cdb843279364198ac804e2644ae194615834dd011e02e"}, +{"name":"rubocop-rails","version":"2.20.2","platform":"ruby","checksum":"d20cbd613900fa22bcf85a7fba78ab68b21fc4f90b1e73c97284d40674332417"}, +{"name":"rubocop-rspec","version":"2.22.0","platform":"ruby","checksum":"2d7493222c81c78ad304ddd81aaf64b3543bcfac6d3d8706c220331921753a03"}, {"name":"ruby-fogbugz","version":"0.3.0","platform":"ruby","checksum":"5e04cde474648f498a71cf1e1a7ab42c66b953862fbe224f793ec0a7a1d5f657"}, {"name":"ruby-magic","version":"0.6.0","platform":"ruby","checksum":"7b2138877b7d23aff812c95564eba6473b74b815ef85beb0eb792e729a2b6101"}, {"name":"ruby-openai","version":"3.7.0","platform":"ruby","checksum":"fb735d4c055e282ade264cab9864944c05a8a10e0cddd45a0551e8a9851b1850"}, diff --git a/Gemfile.lock b/Gemfile.lock index c2de0e0deb6..d91aa6f584f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -639,12 +639,12 @@ GEM oauth2 (>= 1.4.4, < 3) gitlab-markup (1.9.0) gitlab-net-dns (0.9.2) - gitlab-styles (10.0.0) - rubocop (~> 1.43.0) + gitlab-styles (10.1.0) + rubocop (~> 1.50.2) rubocop-graphql (~> 0.18) rubocop-performance (~> 1.15) rubocop-rails (~> 2.17) - rubocop-rspec (~> 2.18) + rubocop-rspec (~> 2.22) gitlab_chronic_duration (0.10.6.2) numerizer (~> 0.2) gitlab_omniauth-ldap (2.2.0) @@ -1362,32 +1362,35 @@ GEM pg rails sqlite3 - rubocop (1.43.0) + rubocop (1.50.2) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.24.1, < 2.0) + rubocop-ast (>= 1.28.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.24.1) - parser (>= 3.1.1.0) - rubocop-capybara (2.17.0) + rubocop-ast (1.29.0) + parser (>= 3.2.1.0) + rubocop-capybara (2.18.0) rubocop (~> 1.41) + rubocop-factory_bot (2.23.1) + rubocop (~> 1.33) rubocop-graphql (0.19.0) rubocop (>= 0.87, < 2) - rubocop-performance (1.16.0) + rubocop-performance (1.18.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.17.4) + rubocop-rails (2.20.2) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - rubocop-rspec (2.18.1) + rubocop-rspec (2.22.0) rubocop (~> 1.33) rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) ruby-fogbugz (0.3.0) crack (~> 0.4) multipart-post (~> 2.0) @@ -1794,7 +1797,7 @@ DEPENDENCIES gitlab-net-dns (~> 0.9.2) gitlab-rspec! gitlab-sidekiq-fetcher! - gitlab-styles (~> 10.0.0) + gitlab-styles (~> 10.1.0) gitlab-utils! gitlab_chronic_duration (~> 0.10.6.2) gitlab_omniauth-ldap (~> 2.2.0) diff --git a/doc/ci/caching/index.md b/doc/ci/caching/index.md index 09ecf565a83..d14c9563642 100644 --- a/doc/ci/caching/index.md +++ b/doc/ci/caching/index.md @@ -297,25 +297,20 @@ In this example, the job's cache policy is: ### Cache Node.js dependencies If your project uses [npm](https://www.npmjs.com/) to install Node.js -dependencies, the following example defines `cache` globally so that all jobs inherit it. +dependencies, the following example defines a default `cache` so that all jobs inherit it. By default, npm stores cache data in the home folder (`~/.npm`). However, you [can't cache things outside of the project directory](../yaml/index.md#cachepaths). Instead, tell npm to use `./.npm`, and cache it per-branch: ```yaml -# -# https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates/Nodejs.gitlab-ci.yml -# -image: node:latest - -# Cache modules in between jobs -cache: - key: $CI_COMMIT_REF_SLUG - paths: - - .npm/ - -before_script: - - npm ci --cache .npm --prefer-offline +default: + image: node:latest + cache: # Cache modules in between jobs + key: $CI_COMMIT_REF_SLUG + paths: + - .npm/ + before_script: + - npm ci --cache .npm --prefer-offline test_async: script: @@ -328,13 +323,13 @@ You can use [`cache:key:files`](../yaml/index.md#cachekeyfiles) to compute the c key from a lock file like `package-lock.json` or `yarn.lock`, and reuse it in many jobs. ```yaml -# Cache modules using lock file -cache: - key: - files: - - package-lock.json - paths: - - .npm/ +default: + cache: # Cache modules using lock file + key: + files: + - package-lock.json + paths: + - .npm/ ``` If you're using [Yarn](https://yarnpkg.com/), you can use [`yarn-offline-mirror`](https://classic.yarnpkg.com/blog/2016/11/24/offline-mirror/) @@ -358,26 +353,21 @@ job: ### Cache PHP dependencies If your project uses [Composer](https://getcomposer.org/) to install -PHP dependencies, the following example defines `cache` globally so that +PHP dependencies, the following example defines a default `cache` so that all jobs inherit it. PHP libraries modules are installed in `vendor/` and are cached per-branch: ```yaml -# -# https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates/PHP.gitlab-ci.yml -# -image: php:7.2 - -# Cache libraries in between jobs -cache: - key: $CI_COMMIT_REF_SLUG - paths: - - vendor/ - -before_script: - # Install and run Composer - - curl --show-error --silent "https://getcomposer.org/installer" | php - - php composer.phar install +default: + image: php:7.2 + cache: # Cache libraries in between jobs + key: $CI_COMMIT_REF_SLUG + paths: + - vendor/ + before_script: + # Install and run Composer + - curl --show-error --silent "https://getcomposer.org/installer" | php + - php composer.phar install test: script: @@ -387,32 +377,24 @@ test: ### Cache Python dependencies If your project uses [pip](https://pip.pypa.io/en/stable/) to install -Python dependencies, the following example defines `cache` globally so that +Python dependencies, the following example defines a default `cache` so that all jobs inherit it. pip's cache is defined under `.cache/pip/` and is cached per-branch: ```yaml -# -# https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml -# -image: python:latest +default: + image: python:latest + cache: # Pip's cache doesn't store the python packages + paths: # https://pip.pypa.io/en/stable/topics/caching/ + - .cache/pip + before_script: + - python -V # Print out python version for debugging + - pip install virtualenv + - virtualenv venv + - source venv/bin/activate -# Change pip's cache directory to be inside the project directory since we can -# only cache local items. -variables: +variables: # Change pip's cache directory to be inside the project directory since we can only cache local items. PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" -# Pip's cache doesn't store the python packages -# https://pip.pypa.io/en/stable/topics/caching/ -cache: - paths: - - .cache/pip - -before_script: - - python -V # Print out python version for debugging - - pip install virtualenv - - virtualenv venv - - source venv/bin/activate - test: script: - python setup.py test @@ -423,25 +405,20 @@ test: ### Cache Ruby dependencies If your project uses [Bundler](https://bundler.io) to install -gem dependencies, the following example defines `cache` globally so that all +gem dependencies, the following example defines a default `cache` so that all jobs inherit it. Gems are installed in `vendor/ruby/` and are cached per-branch: ```yaml -# -# https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates/Ruby.gitlab-ci.yml -# -image: ruby:2.6 - -# Cache gems in between builds -cache: - key: $CI_COMMIT_REF_SLUG - paths: - - vendor/ruby - -before_script: - - ruby -v # Print out ruby version for debugging - - bundle config set --local path 'vendor/ruby' # The location to install the specified gems to - - bundle install -j $(nproc) # Install dependencies into ./vendor/ruby +default: + image: ruby:2.6 + cache: # Cache gems in between builds + key: $CI_COMMIT_REF_SLUG + paths: + - vendor/ruby + before_script: + - ruby -v # Print out ruby version for debugging + - bundle config set --local path 'vendor/ruby' # The location to install the specified gems to + - bundle install -j $(nproc) # Install dependencies into ./vendor/ruby rspec: script: @@ -456,13 +433,14 @@ For example, a testing job might not need the same gems as a job that deploys to production: ```yaml -cache: - key: - files: - - Gemfile.lock - prefix: $CI_JOB_NAME - paths: - - vendor/ruby +default: + cache: + key: + files: + - Gemfile.lock + prefix: $CI_JOB_NAME + paths: + - vendor/ruby test_job: stage: test @@ -572,18 +550,19 @@ stages: - build - test -before_script: - - echo "Hello" +default: + cache: + key: build-cache + paths: + - vendor/ + before_script: + - echo "Hello" job A: stage: build script: - mkdir vendor/ - echo "build" > vendor/hello.txt - cache: - key: build-cache - paths: - - vendor/ after_script: - echo "World" @@ -591,10 +570,6 @@ job B: stage: test script: - cat vendor/hello.txt - cache: - key: build-cache - paths: - - vendor/ ``` If one machine has one runner installed, then all jobs for your project @@ -602,6 +577,7 @@ run on the same host: 1. Pipeline starts. 1. `job A` runs. +1. The cache is extracted (if found). 1. `before_script` is executed. 1. `script` is executed. 1. `after_script` is executed. diff --git a/doc/ci/docker/docker_layer_caching.md b/doc/ci/docker/docker_layer_caching.md index 145ead9a212..861bea70cb7 100644 --- a/doc/ci/docker/docker_layer_caching.md +++ b/doc/ci/docker/docker_layer_caching.md @@ -28,19 +28,18 @@ with the `--cache-from` argument must be pulled This example `.gitlab-ci.yml` file shows how to use Docker caching: ```yaml -image: docker:20.10.16 - -services: - - docker:20.10.16-dind +default: + image: docker:20.10.16 + services: + - docker:20.10.16-dind + before_script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY variables: # Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled DOCKER_HOST: tcp://docker:2376 DOCKER_TLS_CERTDIR: "/certs" -before_script: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - build: stage: build script: @@ -50,7 +49,7 @@ build: - docker push $CI_REGISTRY_IMAGE:latest ``` -In the `script` section for the `build` stage: +In the `script` section for the `build` job: 1. The first command tries to pull the image from the registry so that it can be used as a cache for the `docker build` command. diff --git a/doc/ci/docker/using_docker_build.md b/doc/ci/docker/using_docker_build.md index c13c883d641..98312815e12 100644 --- a/doc/ci/docker/using_docker_build.md +++ b/doc/ci/docker/using_docker_build.md @@ -61,8 +61,9 @@ the Docker commands, but needs permission to do so. 1. In GitLab, add `docker info` to `.gitlab-ci.yml` to verify that Docker is working: ```yaml - before_script: - - docker info + default: + before_script: + - docker info build_image: script: @@ -155,7 +156,12 @@ To use Docker-in-Docker with TLS enabled: `docker:20.10.16-dind` service: ```yaml - image: docker:20.10.16 + default: + image: docker:20.10.16 + services: + - docker:20.10.16-dind + before_script: + - docker info variables: # When you use the dind service, you must instruct Docker to talk with @@ -174,12 +180,6 @@ To use Docker-in-Docker with TLS enabled: # container, thanks to volume mount from config.toml DOCKER_TLS_CERTDIR: "/certs" - services: - - docker:20.10.16-dind - - before_script: - - docker info - build: stage: build script: @@ -215,7 +215,12 @@ You can now use `docker` in the job script. You should include the `docker:20.10.16-dind` service: ```yaml -image: docker:20.10.16 +default: + image: docker:20.10.16 + services: + - docker:20.10.16-dind + before_script: + - docker info variables: # When using dind service, you must instruct docker to talk with the @@ -235,12 +240,6 @@ variables: # This instructs Docker not to start over TLS. DOCKER_TLS_CERTDIR: "" -services: - - docker:20.10.16-dind - -before_script: - - docker info - build: stage: build script: @@ -280,7 +279,12 @@ To use Docker-in-Docker with TLS enabled in Kubernetes: `docker:20.10.16-dind` service: ```yaml - image: docker:20.10.16 + default: + image: docker:20.10.16 + services: + - docker:20.10.16-dind + before_script: + - docker info variables: # When using dind service, you must instruct Docker to talk with @@ -307,12 +311,6 @@ To use Docker-in-Docker with TLS enabled in Kubernetes: DOCKER_TLS_VERIFY: 1 DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client" - services: - - docker:20.10.16-dind - - before_script: - - docker info - build: stage: build script: @@ -703,10 +701,10 @@ This issue can occur when the service's image name [includes a registry hostname](../../ci/services/index.md#available-settings-for-services). For example: ```yaml -image: docker:20.10.16 - -services: - - registry.hub.docker.com/library/docker:20.10.16-dind +default: + image: docker:20.10.16 + services: + - registry.hub.docker.com/library/docker:20.10.16-dind ``` A service's hostname is [derived from the full image name](../../ci/services/index.md#accessing-the-services). @@ -714,11 +712,11 @@ However, the shorter service hostname `docker` is expected. To allow service resolution and access, add an explicit alias for the service name `docker`: ```yaml -image: docker:20.10.16 - -services: - - name: registry.hub.docker.com/library/docker:20.10.16-dind - alias: docker +default: + image: docker:20.10.16 + services: + - name: registry.hub.docker.com/library/docker:20.10.16-dind + alias: docker ``` ### Error: `Error response from daemon: Get "https://registry-1.docker.io/v2/": unauthorized: incorrect username or password` diff --git a/doc/ci/examples/deployment/composer-npm-deploy.md b/doc/ci/examples/deployment/composer-npm-deploy.md index 20083413f66..b8243c2f2cb 100644 --- a/doc/ci/examples/deployment/composer-npm-deploy.md +++ b/doc/ci/examples/deployment/composer-npm-deploy.md @@ -131,28 +131,26 @@ Since this was a WordPress project, it includes real code snippets. Some further Our final `.gitlab-ci.yml` looks like this: ```yaml -image: tetraweb/php - -before_script: - - apt-get update - - apt-get install zip unzip - - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - - php composer-setup.php - - php -r "unlink('composer-setup.php');" - - php composer.phar install - - npm install - - npm run deploy - - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - - mkdir -p ~/.ssh - - eval $(ssh-agent -s) - - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - stage_deploy: + image: tetraweb/php artifacts: paths: - build/ only: - dev + before_script: + - apt-get update + - apt-get install zip unzip + - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + - php composer-setup.php + - php -r "unlink('composer-setup.php');" + - php composer.phar install + - npm install + - npm run deploy + - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' + - mkdir -p ~/.ssh + - eval $(ssh-agent -s) + - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' script: - ssh-add <(echo "$STAGING_PRIVATE_KEY") - ssh -p22 server_user@server_host "mkdir htdocs/wp-content/themes/_tmp" diff --git a/doc/ci/examples/php.md b/doc/ci/examples/php.md index a83bcf69491..244c1e379da 100644 --- a/doc/ci/examples/php.md +++ b/doc/ci/examples/php.md @@ -90,12 +90,12 @@ Finally, commit your files and push them to GitLab to see your build succeeding The final `.gitlab-ci.yml` should look similar to this: ```yaml -# Select image from https://hub.docker.com/_/php -image: php:5.6 - -before_script: - # Install dependencies - - bash ci/docker_install.sh > /dev/null +default: + # Select image from https://hub.docker.com/_/php + image: php:5.6 + before_script: + # Install dependencies + - bash ci/docker_install.sh > /dev/null test:app: script: @@ -108,9 +108,10 @@ Testing against multiple versions of PHP is super easy. Just add another job with a different Docker image version and the runner does the rest: ```yaml -before_script: - # Install dependencies - - bash ci/docker_install.sh > /dev/null +default: + before_script: + # Install dependencies + - bash ci/docker_install.sh > /dev/null # We test PHP5.6 test:5.6: @@ -206,10 +207,9 @@ Instead of PHPUnit, you can use any other tool to run unit tests. For example you can use [`atoum`](https://github.com/atoum/atoum): ```yaml -before_script: - - wget http://downloads.atoum.org/nightly/mageekguy.atoum.phar - test:atoum: + before_script: + - wget http://downloads.atoum.org/nightly/mageekguy.atoum.phar script: - php mageekguy.atoum.phar ``` @@ -224,18 +224,18 @@ To execute Composer before running your tests, add the following to your # Composer stores all downloaded packages in the vendor/ directory. # Do not use the following if the vendor/ directory is committed to # your git repository. -cache: - paths: - - vendor/ - -before_script: - # Install composer dependencies - - wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig - - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - - php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" - - php composer-setup.php - - php -r "unlink('composer-setup.php'); unlink('installer.sig');" - - php composer.phar install +default: + cache: + paths: + - vendor/ + before_script: + # Install composer dependencies + - wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig + - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + - php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" + - php composer-setup.php + - php -r "unlink('composer-setup.php'); unlink('installer.sig');" + - php composer.phar install ``` ## Access private packages or dependencies diff --git a/doc/ci/migration/circleci.md b/doc/ci/migration/circleci.md index 17cdb4f7e3e..8242bbd748f 100644 --- a/doc/ci/migration/circleci.md +++ b/doc/ci/migration/circleci.md @@ -249,18 +249,14 @@ jobs: Example of the same pipeline using `cache` in GitLab CI/CD: ```yaml -image: node:latest - -# Cache modules in between jobs -cache: - key: $CI_COMMIT_REF_SLUG - paths: - - .npm/ - -before_script: - - npm ci --cache .npm --prefer-offline - test_async: + image: node:latest + cache: # Cache modules in between jobs + key: $CI_COMMIT_REF_SLUG + paths: + - .npm/ + before_script: + - npm ci --cache .npm --prefer-offline script: - node ./specs/start.js ./specs/async.spec.js ``` diff --git a/doc/ci/runners/saas/windows_saas_runner.md b/doc/ci/runners/saas/windows_saas_runner.md index 450af236599..8ec44b8c275 100644 --- a/doc/ci/runners/saas/windows_saas_runner.md +++ b/doc/ci/runners/saas/windows_saas_runner.md @@ -57,16 +57,15 @@ Below is a sample `.gitlab-ci.yml` file that shows how to start using the runner tags: - shared-windows - windows-1809 + before_script: + - Set-Variable -Name "time" -Value (date -Format "%H:%m") + - echo ${time} + - echo "started by ${GITLAB_USER_NAME}" stages: - build - test -before_script: - - Set-Variable -Name "time" -Value (date -Format "%H:%m") - - echo ${time} - - echo "started by ${GITLAB_USER_NAME}" - build: extends: - .shared_windows_runners diff --git a/doc/ci/services/index.md b/doc/ci/services/index.md index 2e7e89fc601..efcb1cac755 100644 --- a/doc/ci/services/index.md +++ b/doc/ci/services/index.md @@ -240,18 +240,17 @@ variables: PGDATA: "/var/lib/postgresql/data" POSTGRES_INITDB_ARGS: "--encoding=UTF8 --data-checksums" -services: - - name: postgres:11.7 - alias: db - entrypoint: ["docker-entrypoint.sh"] - command: ["postgres"] - -image: - name: ruby:2.6 - entrypoint: ["/bin/bash"] - -before_script: - - bundle install +default: + services: + - name: postgres:11.7 + alias: db + entrypoint: ["docker-entrypoint.sh"] + command: ["postgres"] + image: + name: ruby:2.6 + entrypoint: ["/bin/bash"] + before_script: + - bundle install test: script: @@ -321,28 +320,26 @@ Before the new extended Docker configuration options, you would need to: - Create your own image based on the `super/sql:latest` image. - Add the default command. -- Use the image in the job's configuration: +- Use the image in the job's configuration. - ```dockerfile - # my-super-sql:latest image's Dockerfile + - `my-super-sql:latest` image's Dockerfile: - FROM super/sql:latest - CMD ["/usr/bin/super-sql", "run"] - ``` + ```dockerfile + FROM super/sql:latest + CMD ["/usr/bin/super-sql", "run"] + ``` - ```yaml - # .gitlab-ci.yml + - In the job in the `.gitlab-ci.yml`: - services: - - my-super-sql:latest - ``` + ```yaml + services: + - my-super-sql:latest + ``` After the new extended Docker configuration options, you can set a `command` in the `.gitlab-ci.yml` file instead: ```yaml -# .gitlab-ci.yml - services: - name: super/sql:latest command: ["/usr/bin/super-sql", "run"] diff --git a/doc/ci/ssh_keys/index.md b/doc/ci/ssh_keys/index.md index ab767697cbc..09a85168f9b 100644 --- a/doc/ci/ssh_keys/index.md +++ b/doc/ci/ssh_keys/index.md @@ -93,7 +93,7 @@ to access it. In this case, you can use an SSH key pair. # - git config --global user.name "User name" ``` - The [`before_script`](../yaml/index.md#before_script) can be set globally + The [`before_script`](../yaml/index.md#before_script) can be set as a default or per-job. 1. Make sure the private server's [SSH host keys are verified](#verifying-the-ssh-host-keys). diff --git a/doc/user/group/manage.md b/doc/user/group/manage.md index 1de2f075592..3cc70f136d2 100644 --- a/doc/user/group/manage.md +++ b/doc/user/group/manage.md @@ -434,11 +434,8 @@ for the ability to set merge request approval rules for groups is tracked in WARNING: This feature is in [Beta](../../policy/experiment-beta-support.md#beta). -Due to high demand, this feature may have unscheduled downtime and Code Suggestions in IDEs may be delayed. -Code Suggestions may produce -[low-quality or incomplete suggestions](../project/repository/code_suggestions.md#model-accuracy-and-quality). Beta users should read about the [known limitations](../project/repository/code_suggestions.md#known-limitations). -We look forward to hearing your feedback. +We look forward to hearing your [feedback](../project/repository/code_suggestions.md#feedback). You can give all users in a group and its subgroups access to [Code Suggestions](../project/repository/code_suggestions.md). diff --git a/doc/user/infrastructure/iac/mr_integration.md b/doc/user/infrastructure/iac/mr_integration.md index b2e02cd7375..26bb1d16510 100644 --- a/doc/user/infrastructure/iac/mr_integration.md +++ b/doc/user/infrastructure/iac/mr_integration.md @@ -95,19 +95,17 @@ To manually configure a GitLab Terraform Report artifact: ```yaml default: image: registry.gitlab.com/gitlab-org/terraform-images/stable:latest - cache: key: example-production paths: - ${TF_ROOT}/.terraform + before_script: + - cd ${TF_ROOT} variables: TF_ROOT: ${CI_PROJECT_DIR}/environments/example/production TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/example-production -before_script: - - cd ${TF_ROOT} - stages: - prepare - validate @@ -161,7 +159,6 @@ default: entrypoint: - '/usr/bin/env' - 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' - cache: paths: - .terraform diff --git a/doc/user/packages/container_registry/build_and_push_images.md b/doc/user/packages/container_registry/build_and_push_images.md index aa86b87660b..4d74e029cdd 100644 --- a/doc/user/packages/container_registry/build_and_push_images.md +++ b/doc/user/packages/container_registry/build_and_push_images.md @@ -152,9 +152,12 @@ registry and used by subsequent stages, downloading the container image when nee `latest` and deployed using an application-specific deploy script: ```yaml -image: docker:20.10.16 -services: - - docker:20.10.16-dind +default: + image: docker:20.10.16 + services: + - docker:20.10.16-dind + before_script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY stages: - build @@ -169,9 +172,6 @@ variables: CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest -before_script: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - build: stage: build script: diff --git a/doc/user/project/repository/code_suggestions.md b/doc/user/project/repository/code_suggestions.md index 702249ab975..ab6c18d718b 100644 --- a/doc/user/project/repository/code_suggestions.md +++ b/doc/user/project/repository/code_suggestions.md @@ -19,7 +19,6 @@ type: index, reference WARNING: This feature is in [Beta](../../../policy/experiment-beta-support.md#beta). -Code Suggestions may produce [low-quality or incomplete suggestions](#model-accuracy-and-quality). Beta users should read about the [known limitations](#known-limitations). We look forward to hearing your [feedback](#feedback). Write code more efficiently by using generative AI to suggest code while you're developing. @@ -42,8 +41,6 @@ Learn about [data usage when using Code Suggestions](#code-suggestions-data-usag ## Supported languages -Code Suggestions may produce [low-quality or incomplete suggestions](#model-accuracy-and-quality). - The best results from Code Suggestions are expected [for languages the Google Vertex AI Codey APIs](https://cloud.google.com/vertex-ai/docs/generative-ai/code/code-models-overview#supported_coding_languages) directly support: - C++ @@ -182,9 +179,7 @@ Suggestions are best when writing new code. Editing existing functions or 'fill GitLab is making improvements to the Code Suggestions to improve the quality. AI is non-deterministic, so you may not get the same suggestion every time with the same input. This feature is currently in [Beta](../../../policy/experiment-beta-support.md#beta). -Code Suggestions depends on both Google Vertex AI Codey APIs and the GitLab Code Suggestions service. We expect a -high demand for this Beta feature, which may cause degraded performance or unexpected downtime -of the feature. We have built this feature to gracefully degrade and have controls in place to allow us to +Code Suggestions depends on both Google Vertex AI Codey APIs and the GitLab Code Suggestions service. We have built this feature to gracefully degrade and have controls in place to allow us to mitigate abuse or misuse. GitLab may disable this feature for any or all customers at any time at our discretion. ## Code Suggestions data usage diff --git a/rubocop/cop/rspec/factory_bot/strategy_in_callback.rb b/rubocop/cop/rspec/factory_bot/strategy_in_callback.rb index 3153d54887e..534a145b13a 100644 --- a/rubocop/cop/rspec/factory_bot/strategy_in_callback.rb +++ b/rubocop/cop/rspec/factory_bot/strategy_in_callback.rb @@ -7,7 +7,7 @@ module RuboCop module RSpec module FactoryBot class StrategyInCallback < RuboCop::Cop::Base - include RuboCop::RSpec::FactoryBot::Language + include RuboCop::FactoryBot::Language MSG = 'Prefer inline `association` over `%{type}`. ' \ 'See https://docs.gitlab.com/ee/development/testing_guide/best_practices.html#factories' diff --git a/spec/lib/banzai/filter/image_link_filter_spec.rb b/spec/lib/banzai/filter/image_link_filter_spec.rb index 5238f05f4bd..6c9e798790f 100644 --- a/spec/lib/banzai/filter/image_link_filter_spec.rb +++ b/spec/lib/banzai/filter/image_link_filter_spec.rb @@ -40,14 +40,22 @@ RSpec.describe Banzai::Filter::ImageLinkFilter, feature_category: :team_planning end it 'keep the data-canonical-src' do - doc = filter(%q(<img src="http://assets.example.com/6cd/4d7" data-canonical-src="http://example.com/test.png" />), context) + doc = filter( + %q(<img src="http://assets.example.com/6cd/4d7" data-canonical-src="http://example.com/test.png" />), + context + ) expect(doc.at_css('img')['src']).to eq doc.at_css('a')['href'] expect(doc.at_css('img')['data-canonical-src']).to eq doc.at_css('a')['data-canonical-src'] end it 'moves the data-diagram* attributes' do - doc = filter(%q(<img class="plantuml" src="http://localhost:8080/png/U9npoazIqBLJ24uiIbImKl18pSd91m0rkGMq" data-diagram="plantuml" data-diagram-src="data:text/plain;base64,Qm9iIC0+IFNhcmEgOiBIZWxsbw==">), context) + # rubocop:disable Layout/LineLength + doc = filter( + %q(<img class="plantuml" src="http://localhost:8080/png/U9npoazIqBLJ24uiIbImKl18pSd91m0rkGMq" data-diagram="plantuml" data-diagram-src="data:text/plain;base64,Qm9iIC0+IFNhcmEgOiBIZWxsbw==">), + context + ) + # rubocop:enable Layout/LineLength expect(doc.at_css('a')['data-diagram']).to eq "plantuml" expect(doc.at_css('a')['data-diagram-src']).to eq "data:text/plain;base64,Qm9iIC0+IFNhcmEgOiBIZWxsbw==" |