From 0a412bceb98cd7acd46701d75dbad9683cb33baf Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 10 Aug 2022 15:11:53 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitlab/CODEOWNERS | 2 +- .haml-lint.yml | 3 + .rubocop.yml | 4 + .../rescued_exceptions_variable_name.yml | 197 ------------------ .rubocop_todo/style/empty_else.yml | 9 +- .rubocop_todo/style/format_string.yml | 43 +++- .rubocop_todo/style/guard_clause.yml | 73 +++++-- .rubocop_todo/style/if_inside_else.yml | 10 +- .rubocop_todo/style/if_unless_modifier.yml | 135 ++++++------ .../style/missing_respond_to_missing.yml | 3 - .rubocop_todo/style/next.yml | 8 +- .../style/percent_literal_delimiters.yml | 86 +++++--- .../style/redundant_interpolation.yml | 27 ++- .../style/redundant_regexp_escape.yml | 15 +- Gemfile | 5 +- Gemfile.lock | 19 +- .../boards/components/board_card_inner.vue | 9 +- .../components/validate/ci_validate.vue | 2 +- .../components/blob_content_viewer.vue | 57 ++++- .../source_viewer/components/chunk_line.vue | 12 +- .../user_avatar/user_avatar_image.vue | 11 +- .../user_avatar/user_avatar_image_new.vue | 12 +- .../user_avatar/user_avatar_link.vue | 11 +- .../user_avatar/user_avatar_link_new.vue | 7 +- .../user_avatar/user_avatar_list.vue | 2 +- .../components/work_item_detail.vue | 29 ++- .../concerns/integrations/base_data_fields.rb | 1 - .../concerns/integrations/has_data_fields.rb | 2 +- app/models/project.rb | 7 + app/models/users/group_callout.rb | 3 +- app/presenters/ci/build_runner_presenter.rb | 3 +- .../merge_requests/create_pipeline_service.rb | 3 +- .../layouts/nav/sidebar/_admin.html.haml | 6 +- app/views/profiles/keys/index.html.haml | 6 + .../projects/runners/_group_runners.html.haml | 6 +- app/views/search/_results.html.haml | 2 +- ...i_stop_expanding_file_vars_for_runners.yml | 8 + ...acker_data_service_id_to_integration_id.rb | 13 ++ ...22123318_update_delayed_deletion_period.rb | 27 +++ ...pipelines_in_the_parent_project_setting.rb | 8 + ...00_cleanup_jira_tracker_data_service_id.rb | 13 ++ db/schema_migrations/20220712144843 | 1 + db/schema_migrations/20220712144900 | 1 + db/schema_migrations/20220722123318 | 1 + db/schema_migrations/20220805154101 | 1 + db/structure.sql | 14 +- .../geo/replication/docker_registry.md | 2 +- doc/api/groups.md | 1 + doc/api/projects.md | 7 + doc/ci/pipelines/merge_request_pipelines.md | 7 +- doc/update/package/convert_to_ee.md | 2 +- .../vulnerability_report/pipeline.md | 6 +- doc/user/ssh.md | 6 +- lib/api/entities/project.rb | 1 + lib/api/helpers/projects_helpers.rb | 2 + lib/api/members.rb | 2 +- lib/gitlab/ci/variables/collection.rb | 35 ++-- lib/gitlab/ci/variables/collection/item.rb | 4 + locale/gitlab.pot | 52 +++-- spec/factories/ci/variables.rb | 1 + spec/features/boards/boards_spec.rb | 2 +- spec/features/runners_spec.rb | 6 +- .../add_context_commits_modal_spec.js | 4 +- spec/frontend/boards/board_card_inner_spec.js | 6 +- .../components/integration_overrides_spec.js | 2 +- spec/frontend/notes/deprecated_notes_spec.js | 20 +- .../projects/graphs/code_coverage_spec.js | 4 +- .../components/validate/ci_validate_spec.js | 4 +- .../components/blob_content_viewer_spec.js | 89 ++++++-- .../components/chunk_line_spec.js | 5 +- .../user_avatar/user_avatar_image_new_spec.js | 45 ++-- .../user_avatar/user_avatar_image_spec.js | 66 +++--- .../user_avatar/user_avatar_link_new_spec.js | 1 + .../user_avatar/user_avatar_link_old_spec.js | 1 + .../user_avatar/user_avatar_link_spec.js | 66 +++--- ..._data_deployment_type_based_on_url_spec.rb | 6 +- .../gitlab/ci/variables/collection_spec.rb | 32 +-- ..._data_deployment_type_based_on_url_spec.rb | 4 +- spec/models/data_list_spec.rb | 2 +- spec/models/integration_spec.rb | 2 +- spec/models/project_spec.rb | 6 + .../ci/build_runner_presenter_spec.rb | 63 ++++-- spec/requests/api/members_spec.rb | 27 +++ spec/requests/api/project_attributes.yml | 1 + spec/requests/api/projects_spec.rb | 2 + .../bulk_update_integration_service_spec.rb | 2 +- .../create_pipeline_service_spec.rb | 10 + 87 files changed, 894 insertions(+), 629 deletions(-) delete mode 100644 .rubocop_todo/naming/rescued_exceptions_variable_name.yml create mode 100644 config/feature_flags/development/ci_stop_expanding_file_vars_for_runners.yml create mode 100644 db/migrate/20220712144843_rename_jira_tracker_data_service_id_to_integration_id.rb create mode 100644 db/migrate/20220722123318_update_delayed_deletion_period.rb create mode 100644 db/migrate/20220805154101_add_allow_run_pipelines_in_the_parent_project_setting.rb create mode 100644 db/post_migrate/20220712144900_cleanup_jira_tracker_data_service_id.rb create mode 100644 db/schema_migrations/20220712144843 create mode 100644 db/schema_migrations/20220712144900 create mode 100644 db/schema_migrations/20220722123318 create mode 100644 db/schema_migrations/20220805154101 diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index dcf788dbcdb..712ac059ac5 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -601,7 +601,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/operations/feature_flags.md @rdickenson /doc/operations/product_analytics.md @claytoncornell /doc/policy/alpha-beta-support.md @axil -/doc/policy/maintenance.md @axil +/doc/policy/maintenance.md @axil @gitlab-org/delivery /doc/raketasks/ @axil /doc/raketasks/generate_sample_prometheus_data.md @msedlakjakubowski /doc/raketasks/migrate_snippets.md @aqualls diff --git a/.haml-lint.yml b/.haml-lint.yml index 7db3d64409b..7d772831b2c 100644 --- a/.haml-lint.yml +++ b/.haml-lint.yml @@ -129,10 +129,13 @@ linters: - Rails/RequestReferer - Style/ColonMethodCall - Style/ConditionalAssignment + - Style/FormatString - Style/HashSyntax + - Style/IfInsideElse - Style/IdenticalConditionalBranches - Style/NegatedIf - Style/NestedTernaryOperator + - Style/RedundantInterpolation - Style/SelfAssignment - Style/StringConcatenation - Style/TernaryParentheses diff --git a/.rubocop.yml b/.rubocop.yml index a348e799d89..8d3abf142b9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -435,6 +435,10 @@ Naming/PredicateName: - 'spec/**/*' - 'ee/spec/**/*' +# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/93828#note_1050812797 +Naming/RescuedExceptionsVariableName: + Enabled: false + RSpec/FactoriesInMigrationSpecs: Enabled: true Include: diff --git a/.rubocop_todo/naming/rescued_exceptions_variable_name.yml b/.rubocop_todo/naming/rescued_exceptions_variable_name.yml deleted file mode 100644 index 45b4c966fbe..00000000000 --- a/.rubocop_todo/naming/rescued_exceptions_variable_name.yml +++ /dev/null @@ -1,197 +0,0 @@ ---- -# Cop supports --auto-correct. -Naming/RescuedExceptionsVariableName: - Exclude: - - 'app/models/ci/pipeline_artifact.rb' - - 'app/models/concerns/database_event_tracking.rb' - - 'app/services/branches/delete_service.rb' - - 'app/services/branches/validate_new_service.rb' - - 'app/services/ci/job_artifacts/create_service.rb' - - 'app/services/ci/parse_dotenv_artifact_service.rb' - - 'app/services/ci/register_job_service.rb' - - 'app/services/ci/stuck_builds/drop_helpers.rb' - - 'app/services/clusters/applications/prometheus_update_service.rb' - - 'app/services/commits/change_service.rb' - - 'app/services/commits/create_service.rb' - - 'app/services/dependency_proxy/head_manifest_service.rb' - - 'app/services/dependency_proxy/request_token_service.rb' - - 'app/services/design_management/copy_design_collection/copy_service.rb' - - 'app/services/git/base_hooks_service.rb' - - 'app/services/google_cloud/create_cloudsql_instance_service.rb' - - 'app/services/google_cloud/setup_cloudsql_instance_service.rb' - - 'app/services/grafana/proxy_service.rb' - - 'app/services/groups/update_shared_runners_service.rb' - - 'app/services/issues/relative_position_rebalancing_service.rb' - - 'app/services/jira/requests/base.rb' - - 'app/services/jira_import/start_import_service.rb' - - 'app/services/jira_import/users_importer.rb' - - 'app/services/lfs/lock_file_service.rb' - - 'app/services/lfs/locks_finder_service.rb' - - 'app/services/lfs/push_service.rb' - - 'app/services/lfs/unlock_file_service.rb' - - 'app/services/merge_requests/merge_to_ref_service.rb' - - 'app/services/merge_requests/mergeability_check_service.rb' - - 'app/services/metrics/dashboard/base_service.rb' - - 'app/services/metrics/dashboard/panel_preview_service.rb' - - 'app/services/projects/cleanup_service.rb' - - 'app/services/projects/destroy_service.rb' - - 'app/services/projects/hashed_storage/base_repository_service.rb' - - 'app/services/projects/transfer_service.rb' - - 'app/services/prometheus/proxy_service.rb' - - 'app/services/quick_actions/interpret_service.rb' - - 'app/services/resource_access_tokens/revoke_service.rb' - - 'app/services/tags/create_service.rb' - - 'app/services/tags/destroy_service.rb' - - 'app/services/users/validate_manual_otp_service.rb' - - 'app/services/users/validate_push_otp_service.rb' - - 'app/services/verify_pages_domain_service.rb' - - 'app/services/web_hooks/log_destroy_service.rb' - - 'app/validators/js_regex_validator.rb' - - 'app/workers/concerns/limited_capacity/worker.rb' - - 'app/workers/concerns/packages/cleanup_artifact_worker.rb' - - 'app/workers/gitlab/jira_import/import_issue_worker.rb' - - 'app/workers/gitlab_service_ping_worker.rb' - - 'app/workers/issuable_export_csv_worker.rb' - - 'app/workers/namespaces/root_statistics_worker.rb' - - 'app/workers/namespaces/schedule_aggregation_worker.rb' - - 'app/workers/packages/go/sync_packages_worker.rb' - - 'app/workers/project_destroy_worker.rb' - - 'app/workers/projects/git_garbage_collect_worker.rb' - - 'app/workers/projects/inactive_projects_deletion_notification_worker.rb' - - 'app/workers/remove_expired_members_worker.rb' - - 'app/workers/users/create_statistics_worker.rb' - - 'config/initializers/enumerator_next_patch.rb' - - 'config/initializers/rspec_profiling.rb' - - 'config/initializers/wikicloth_redos_patch.rb' - - 'db/post_migrate/20210606143426_add_index_for_container_registry_access_level.rb' - - 'db/post_migrate/20211206162601_cleanup_after_add_primary_email_to_emails_if_user_confirmed.rb' - - 'db/post_migrate/20220318111729_cleanup_after_fixing_issue_when_admin_changed_primary_email.rb' - - 'db/post_migrate/20220504083836_cleanup_after_fixing_regression_with_new_users_emails.rb' - - 'ee/app/finders/projects/integrations/jira/by_ids_finder.rb' - - 'ee/app/graphql/mutations/issues/promote_to_epic.rb' - - 'ee/app/graphql/mutations/issues/set_epic.rb' - - 'ee/app/helpers/ee/kerberos_spnego_helper.rb' - - 'ee/app/models/concerns/geo/replicable_model.rb' - - 'ee/app/models/integrations/github.rb' - - 'ee/app/services/app_sec/dast/profiles/create_service.rb' - - 'ee/app/services/app_sec/dast/profiles/update_service.rb' - - 'ee/app/services/app_sec/dast/scans/create_service.rb' - - 'ee/app/services/app_sec/dast/site_validations/find_or_create_service.rb' - - 'ee/app/services/app_sec/dast/site_validations/revoke_service.rb' - - 'ee/app/services/app_sec/fuzzing/coverage/corpuses/create_service.rb' - - 'ee/app/services/arkose/user_verification_service.rb' - - 'ee/app/services/ci/sync_reports_to_approval_rules_service.rb' - - 'ee/app/services/elastic/process_bookkeeping_service.rb' - - 'ee/app/services/geo/file_registry_removal_service.rb' - - 'ee/app/services/geo/framework_repository_sync_service.rb' - - 'ee/app/services/geo/move_repository_service.rb' - - 'ee/app/services/geo/repository_base_sync_service.rb' - - 'ee/app/services/gitlab_subscriptions/preview_billable_user_change_service.rb' - - 'ee/app/services/incident_management/oncall_rotations/create_service.rb' - - 'ee/app/services/incident_management/oncall_rotations/edit_service.rb' - - 'ee/app/services/namespaces/free_user_cap/deactivate_members_over_limit_service.rb' - - 'ee/app/services/namespaces/free_user_cap/remove_group_group_links_outside_hierarchy_service.rb' - - 'ee/app/services/namespaces/free_user_cap/remove_project_group_links_outside_hierarchy_service.rb' - - 'ee/app/services/namespaces/free_user_cap/update_prevent_sharing_outside_hierarchy_service.rb' - - 'ee/app/services/projects/licenses/create_policy_service.rb' - - 'ee/app/services/projects/licenses/update_policy_service.rb' - - 'ee/app/services/security/ingestion/ingest_report_service.rb' - - 'ee/app/services/security/ingestion/tasks/update_vulnerability_uuids.rb' - - 'ee/app/services/security/orchestration/assign_service.rb' - - 'ee/app/services/security/store_grouped_scans_service.rb' - - 'ee/app/services/security/store_scan_service.rb' - - 'ee/app/services/security/token_revocation_service.rb' - - 'ee/app/services/software_license_policies/create_service.rb' - - 'ee/app/services/software_license_policies/update_service.rb' - - 'ee/app/workers/adjourned_project_deletion_worker.rb' - - 'ee/app/workers/geo/file_removal_worker.rb' - - 'ee/app/workers/geo/repositories_clean_up_worker.rb' - - 'ee/app/workers/geo/scheduler/scheduler_worker.rb' - - 'ee/app/workers/namespaces/free_user_cap/remediation_worker.rb' - - 'ee/app/workers/refresh_license_compliance_checks_worker.rb' - - 'ee/app/workers/repository_update_mirror_worker.rb' - - 'ee/app/workers/sync_seat_link_request_worker.rb' - - 'ee/lib/ee/gitlab/background_migration/populate_uuids_for_security_findings.rb' - - 'ee/lib/elastic/instance_proxy_util.rb' - - 'ee/lib/gitlab/audit/auditor.rb' - - 'ee/lib/gitlab/auth/smartcard/base.rb' - - 'ee/lib/gitlab/ci/parsers/license_compliance/license_scanning.rb' - - 'ee/lib/gitlab/elastic/bulk_indexer.rb' - - 'ee/lib/gitlab/spdx/catalogue_gateway.rb' - - 'ee/lib/tasks/gitlab/seed/metrics.rake' - - 'lib/api/helpers.rb' - - 'lib/api/helpers/label_helpers.rb' - - 'lib/api/issues.rb' - - 'lib/api/project_milestones.rb' - - 'lib/api/projects.rb' - - 'lib/api/repositories.rb' - - 'lib/api/v3/github.rb' - - 'lib/gitaly/server.rb' - - 'lib/gitlab/auth/ldap/adapter.rb' - - 'lib/gitlab/auth/otp/strategies/forti_authenticator/manual_otp.rb' - - 'lib/gitlab/auth/otp/strategies/forti_authenticator/push_otp.rb' - - 'lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb' - - 'lib/gitlab/background_task.rb' - - 'lib/gitlab/ci/config/external/file/artifact.rb' - - 'lib/gitlab/ci/pipeline/chain/config/process.rb' - - 'lib/gitlab/ci/pipeline/chain/validate/external.rb' - - 'lib/gitlab/ci/reports/codequality_reports.rb' - - 'lib/gitlab/database/background_migration/batched_job.rb' - - 'lib/gitlab/database/background_migration/batched_migration_wrapper.rb' - - 'lib/gitlab/database/batch_counter.rb' - - 'lib/gitlab/database/load_balancing/load_balancer.rb' - - 'lib/gitlab/database/load_balancing/service_discovery.rb' - - 'lib/gitlab/database/lock_writes_manager.rb' - - 'lib/gitlab/database/reindexing/grafana_notifier.rb' - - 'lib/gitlab/git/keep_around.rb' - - 'lib/gitlab/gitaly_client/call.rb' - - 'lib/gitlab/gitaly_client/commit_service.rb' - - 'lib/gitlab/gitaly_client/operation_service.rb' - - 'lib/gitlab/gitaly_client/ref_service.rb' - - 'lib/gitlab/gitaly_client/repository_service.rb' - - 'lib/gitlab/hashed_storage/migrator.rb' - - 'lib/gitlab/health_checks/base_abstract_check.rb' - - 'lib/gitlab/import_export/merge_request_parser.rb' - - 'lib/gitlab/instrumentation/redis_interceptor.rb' - - 'lib/gitlab/issuables_count_for_state.rb' - - 'lib/gitlab/jira_import/issues_importer.rb' - - 'lib/gitlab/json.rb' - - 'lib/gitlab/jwt_token.rb' - - 'lib/gitlab/kubernetes/namespace.rb' - - 'lib/gitlab/metrics/dashboard/stages/panel_ids_inserter.rb' - - 'lib/gitlab/metrics/rack_middleware.rb' - - 'lib/gitlab/middleware/handle_ip_spoof_attack_error.rb' - - 'lib/gitlab/prometheus/queries/validate_query.rb' - - 'lib/gitlab/prometheus_client.rb' - - 'lib/gitlab/sanitizers/exif.rb' - - 'lib/gitlab/sidekiq_logging/structured_logger.rb' - - 'lib/gitlab/tcp_checker.rb' - - 'lib/gitlab/template_parser/parser.rb' - - 'lib/gitlab/tracking.rb' - - 'lib/gitlab/url_blocker.rb' - - 'lib/gitlab/usage/metrics/aggregates/aggregate.rb' - - 'lib/gitlab/usage/service_ping/instrumented_payload.rb' - - 'lib/gitlab/usage_data.rb' - - 'lib/gitlab/utils/usage_data.rb' - - 'lib/gitlab/verify/batch_verifier.rb' - - 'lib/gitlab/wiki_pages/front_matter_parser.rb' - - 'lib/microsoft_teams/notifier.rb' - - 'lib/system_check/incoming_email/imap_authentication_check.rb' - - 'lib/tasks/gitlab/db/validate_config.rake' - - 'lib/tasks/gitlab/setup.rake' - - 'lib/tasks/gitlab/storage.rake' - - 'lib/tasks/lint.rake' - - 'qa/qa/resource/user_gpg.rb' - - 'scripts/review_apps/automated_cleanup.rb' - - 'scripts/trigger-build.rb' - - 'spec/commands/metrics_server/metrics_server_spec.rb' - - 'spec/db/docs_spec.rb' - - 'spec/lib/bulk_imports/network_error_spec.rb' - - 'spec/lib/gitlab/database/load_balancing/host_spec.rb' - - 'spec/lib/gitlab/database/load_balancing/load_balancer_spec.rb' - - 'spec/lib/gitlab/error_tracking_spec.rb' - - 'spec/lib/gitlab/sanitizers/exception_message_spec.rb' - - 'spec/support/capybara.rb' - - 'spec/support/helpers/capybara_helpers.rb' - - 'tooling/lib/tooling/helm3_client.rb' - - 'tooling/lib/tooling/kubernetes_client.rb' diff --git a/.rubocop_todo/style/empty_else.yml b/.rubocop_todo/style/empty_else.yml index ed840856e19..f211d022dcd 100644 --- a/.rubocop_todo/style/empty_else.yml +++ b/.rubocop_todo/style/empty_else.yml @@ -1,9 +1,6 @@ --- # Cop supports --auto-correct. Style/EmptyElse: - # Offense count: 59 - # Temporarily disabled due to too many offenses - Enabled: false Exclude: - 'app/controllers/concerns/issuable_collections_action.rb' - 'app/controllers/concerns/sends_blob.rb' @@ -15,8 +12,8 @@ Style/EmptyElse: - 'app/graphql/mutations/concerns/mutations/spam_protection.rb' - 'app/graphql/resolvers/group_milestones_resolver.rb' - 'app/graphql/types/ci/detailed_status_type.rb' + - 'app/graphql/types/packages/package_base_type.rb' - 'app/graphql/types/packages/package_file_type.rb' - - 'app/graphql/types/packages/package_type.rb' - 'app/helpers/submodule_helper.rb' - 'app/models/commit.rb' - 'app/models/legacy_diff_discussion.rb' @@ -27,6 +24,7 @@ Style/EmptyElse: - 'app/models/resource_timebox_event.rb' - 'app/services/award_emojis/add_service.rb' - 'app/services/merge_requests/update_service.rb' + - 'app/workers/gitlab/github_import/stage/import_issue_events_worker.rb' - 'app/workers/post_receive.rb' - 'config/initializers/doorkeeper_openid_connect.rb' - 'ee/app/controllers/admin/audit_logs_controller.rb' @@ -38,13 +36,14 @@ Style/EmptyElse: - 'ee/app/services/epics/tree_reorder_service.rb' - 'ee/app/services/gitlab_subscriptions/check_future_renewal_service.rb' - 'ee/app/services/projects/update_mirror_service.rb' - - 'ee/app/workers/audit_events/audit_event_streaming_worker.rb' - 'ee/app/workers/gitlab_subscriptions/notify_seats_exceeded_worker.rb' - 'ee/db/fixtures/development/20_vulnerabilities.rb' - 'ee/lib/elastic/latest/note_instance_proxy.rb' + - 'ee/lib/gitlab/analytics/cycle_analytics/summary/change_failure_rate.rb' - 'ee/lib/gitlab/geo/oauth/logout_token.rb' - 'lib/api/subscriptions.rb' - 'lib/gitlab/auth/o_auth/provider.rb' + - 'lib/gitlab/ci/variables/collection.rb' - 'lib/gitlab/database/load_balancing/sidekiq_server_middleware.rb' - 'lib/gitlab/database/sha256_attribute.rb' - 'lib/gitlab/diff/parser.rb' diff --git a/.rubocop_todo/style/format_string.yml b/.rubocop_todo/style/format_string.yml index caa293b31ae..66522603da2 100644 --- a/.rubocop_todo/style/format_string.yml +++ b/.rubocop_todo/style/format_string.yml @@ -1,9 +1,6 @@ --- # Cop supports --auto-correct. Style/FormatString: - # Offense count: 769 - # Temporarily disabled due to too many offenses - Enabled: false Exclude: - 'app/components/diffs/overflow_warning_component.rb' - 'app/controllers/admin/application_settings_controller.rb' @@ -21,6 +18,7 @@ Style/FormatString: - 'app/controllers/concerns/membership_actions.rb' - 'app/controllers/concerns/redirects_for_missing_path_on_tree.rb' - 'app/controllers/concerns/spammable_actions/akismet_mark_as_spam_action.rb' + - 'app/controllers/concerns/verifies_with_email.rb' - 'app/controllers/groups/settings/ci_cd_controller.rb' - 'app/controllers/import/bitbucket_server_controller.rb' - 'app/controllers/import/bulk_imports_controller.rb' @@ -37,6 +35,8 @@ Style/FormatString: - 'app/controllers/profiles/preferences_controller.rb' - 'app/controllers/profiles/two_factor_auths_controller.rb' - 'app/controllers/profiles_controller.rb' + - 'app/controllers/projects/google_cloud/deployments_controller.rb' + - 'app/controllers/projects/google_cloud/service_accounts_controller.rb' - 'app/controllers/projects/issues_controller.rb' - 'app/controllers/projects/merge_requests_controller.rb' - 'app/controllers/projects/performance_monitoring/dashboards_controller.rb' @@ -56,15 +56,18 @@ Style/FormatString: - 'app/helpers/colors_helper.rb' - 'app/helpers/emails_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/invite_members_helper.rb' - 'app/helpers/issuables_helper.rb' - 'app/helpers/issues_helper.rb' + - 'app/helpers/members_helper.rb' - 'app/helpers/merge_requests_helper.rb' - 'app/helpers/mirror_helper.rb' - 'app/helpers/preferences_helper.rb' - 'app/helpers/profiles_helper.rb' + - 'app/helpers/projects/project_members_helper.rb' - 'app/helpers/projects_helper.rb' - 'app/helpers/registrations_helper.rb' - 'app/helpers/reminder_emails_helper.rb' @@ -83,6 +86,7 @@ Style/FormatString: - 'app/mailers/emails/profile.rb' - 'app/models/application_setting.rb' - 'app/models/application_setting_implementation.rb' + - 'app/models/concerns/integrations/has_issue_tracker_fields.rb' - 'app/models/concerns/limitable.rb' - 'app/models/concerns/metric_image_uploading.rb' - 'app/models/concerns/spammable.rb' @@ -108,6 +112,7 @@ Style/FormatString: - 'app/models/integrations/external_wiki.rb' - 'app/models/integrations/flowdock.rb' - 'app/models/integrations/hangouts_chat.rb' + - 'app/models/integrations/irker.rb' - 'app/models/integrations/jenkins.rb' - 'app/models/integrations/jira.rb' - 'app/models/integrations/mattermost.rb' @@ -119,6 +124,8 @@ Style/FormatString: - 'app/models/integrations/webex_teams.rb' - 'app/models/integrations/youtrack.rb' - 'app/models/integrations/zentao.rb' + - 'app/models/merge_request.rb' + - 'app/models/merge_request_diff.rb' - 'app/models/milestone.rb' - 'app/models/pages_domain.rb' - 'app/models/project.rb' @@ -129,6 +136,7 @@ Style/FormatString: - 'app/models/user.rb' - 'app/models/wiki.rb' - 'app/models/wiki_page.rb' + - 'app/models/work_items/parent_link.rb' - 'app/presenters/ci/pipeline_presenter.rb' - 'app/presenters/merge_request_presenter.rb' - 'app/presenters/project_presenter.rb' @@ -152,6 +160,7 @@ Style/FormatString: - 'app/services/gravatar_service.rb' - 'app/services/groups/transfer_service.rb' - 'app/services/import/bitbucket_server_service.rb' + - 'app/services/import/fogbugz_service.rb' - 'app/services/import/github_service.rb' - 'app/services/issuable_links/create_service.rb' - 'app/services/issues/clone_service.rb' @@ -169,7 +178,10 @@ Style/FormatString: - 'app/services/projects/create_from_template_service.rb' - 'app/services/projects/import_service.rb' - 'app/services/system_notes/design_management_service.rb' + - 'app/services/timelogs/create_service.rb' - 'app/services/users/banned_user_base_service.rb' + - 'app/services/work_items/parent_links/create_service.rb' + - 'app/services/work_items/widgets/hierarchy_service/base_service.rb' - 'app/validators/addressable_url_validator.rb' - 'app/validators/any_field_validator.rb' - 'app/validators/array_members_validator.rb' @@ -180,6 +192,13 @@ Style/FormatString: - 'config/initializers/rack_lineprof.rb' - 'danger/roulette/Dangerfile' - 'ee/app/components/billing/plan_component.rb' + - 'ee/app/components/namespaces/free_user_cap/alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/personable.rb' + - 'ee/app/components/namespaces/free_user_cap/personal_alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/personal_preview_alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/personal_usage_quota_limitations_alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/preview_alert_component.rb' + - 'ee/app/components/namespaces/free_user_cap/usage_quota_alert_component.rb' - 'ee/app/controllers/admin/elasticsearch_controller.rb' - 'ee/app/controllers/admin/geo/application_controller.rb' - 'ee/app/controllers/admin/geo/projects_controller.rb' @@ -190,6 +209,7 @@ Style/FormatString: - 'ee/app/controllers/ee/repositories/git_http_client_controller.rb' - 'ee/app/controllers/ee/repositories/lfs_api_controller.rb' - 'ee/app/controllers/groups/saml_group_links_controller.rb' + - 'ee/app/controllers/groups/settings/reporting_controller.rb' - 'ee/app/controllers/groups/sso_controller.rb' - 'ee/app/controllers/projects/requirements_management/requirements_controller.rb' - 'ee/app/controllers/subscriptions/groups_controller.rb' @@ -197,9 +217,11 @@ Style/FormatString: - '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/groups/reporting_helper.rb' - 'ee/app/helpers/ee/groups/settings_helper.rb' - 'ee/app/helpers/ee/groups_helper.rb' - 'ee/app/helpers/ee/import_helper.rb' + - 'ee/app/helpers/ee/members_helper.rb' - 'ee/app/helpers/ee/profiles_helper.rb' - 'ee/app/helpers/ee/projects_helper.rb' - 'ee/app/helpers/ee/timeboxes_helper.rb' @@ -207,6 +229,7 @@ Style/FormatString: - 'ee/app/helpers/groups/sso_helper.rb' - 'ee/app/helpers/trial_registrations/reassurances_helper.rb' - 'ee/app/helpers/vulnerabilities_helper.rb' + - 'ee/app/mailers/ee/emails/admin_notification.rb' - 'ee/app/mailers/emails/namespace_storage_usage_mailer.rb' - 'ee/app/models/ci/minutes/notification.rb' - 'ee/app/models/dast/profile.rb' @@ -214,8 +237,10 @@ Style/FormatString: - 'ee/app/models/dast_site_profile.rb' - 'ee/app/models/dast_site_validation.rb' - 'ee/app/models/ee/member.rb' + - 'ee/app/models/ee/namespace/storage/notification.rb' - 'ee/app/models/geo/upload_registry.rb' - 'ee/app/models/integrations/github.rb' + - 'ee/app/models/iterations/cadence.rb' - 'ee/app/models/namespace_limit.rb' - 'ee/app/models/users_security_dashboard_project.rb' - 'ee/app/services/app_sec/dast/profiles/build_config_service.rb' @@ -227,6 +252,7 @@ Style/FormatString: - 'ee/app/services/concerns/incident_management/oncall_rotations/shared_rotation_logic.rb' - 'ee/app/services/dora/aggregate_metrics_service.rb' - 'ee/app/services/ee/projects/create_from_template_service.rb' + - 'ee/app/services/group_saml/saml_group_links/create_service.rb' - 'ee/app/services/incident_management/escalation_policies/base_service.rb' - 'ee/app/services/issues/build_from_vulnerability_service.rb' - 'ee/app/services/merge_requests/create_from_vulnerability_data_service.rb' @@ -236,15 +262,18 @@ Style/FormatString: - 'ee/app/services/vulnerabilities/destroy_dismissal_feedback_service.rb' - 'ee/app/services/vulnerabilities/dismiss_service.rb' - 'ee/app/services/vulnerabilities/finding_dismiss_service.rb' + - 'ee/app/services/vulnerabilities/findings/create_from_security_finding_service.rb' - 'ee/app/services/vulnerabilities/historical_statistics/adjustment_service.rb' - 'ee/app/services/vulnerabilities/statistics/adjustment_service.rb' - 'ee/app/services/vulnerability_external_issue_links/create_service.rb' + - 'ee/app/validators/user_existence_validator.rb' - 'ee/lib/audit/details.rb' - 'ee/lib/ee/audit/project_changes_auditor.rb' - 'ee/lib/ee/audit/project_setting_changes_auditor.rb' - 'ee/lib/ee/gitlab/checks/push_rules/branch_check.rb' - 'ee/lib/ee/gitlab/checks/push_rules/commit_check.rb' - 'ee/lib/ee/gitlab/ci/pipeline/chain/validate/security_orchestration_policy.rb' + - 'ee/lib/ee/gitlab/namespace_storage_size_error_message.rb' - 'ee/lib/ee/gitlab/quick_actions/epic_actions.rb' - 'ee/lib/ee/gitlab/quick_actions/issue_actions.rb' - 'ee/lib/ee/gitlab/quick_actions/issue_and_merge_request_actions.rb' @@ -256,11 +285,13 @@ Style/FormatString: - 'ee/lib/gitlab/auth/group_saml/response_check.rb' - 'ee/lib/gitlab/expiring_subscription_message.rb' - 'ee/lib/gitlab/geo.rb' + - 'ee/lib/gitlab/licenses/submit_license_usage_data_banner.rb' - 'ee/lib/gitlab/manual_quarterly_co_term_banner.rb' - 'ee/lib/gitlab/vulnerabilities/container_scanning_vulnerability.rb' - 'ee/lib/tasks/gitlab/elastic.rake' - 'ee/spec/controllers/admin/licenses_controller_spec.rb' - 'ee/spec/controllers/groups/security/policies_controller_spec.rb' + - 'ee/spec/features/admin/admin_settings_spec.rb' - 'ee/spec/features/admin/admin_users_spec.rb' - 'ee/spec/features/groups/analytics/cycle_analytics/filters_and_data_spec.rb' - 'ee/spec/features/groups/analytics/cycle_analytics/multiple_value_streams_spec.rb' @@ -273,6 +304,7 @@ Style/FormatString: - 'lib/gitlab/ci/ansi2json/line.rb' - 'lib/gitlab/ci/badge/coverage/template.rb' - 'lib/gitlab/ci/config/entry/tags.rb' + - 'lib/gitlab/ci/parsers/sbom/cyclonedx.rb' - 'lib/gitlab/ci/status/build/waiting_for_approval.rb' - 'lib/gitlab/config_checker/external_database_checker.rb' - 'lib/gitlab/config_checker/puma_rugged_checker.rb' @@ -293,6 +325,7 @@ Style/FormatString: - 'lib/gitlab/email/message/in_product_marketing/verify.rb' - 'lib/gitlab/exceptions_app.rb' - 'lib/gitlab/github_import/importer/pull_request_merged_by_importer.rb' + - 'lib/gitlab/github_import/importer/single_endpoint_issue_events_importer.rb' - 'lib/gitlab/github_import/issuable_finder.rb' - 'lib/gitlab/github_import/label_finder.rb' - 'lib/gitlab/github_import/milestone_finder.rb' @@ -307,6 +340,7 @@ Style/FormatString: - 'lib/gitlab/log_timestamp_formatter.rb' - 'lib/gitlab/metrics/dashboard/errors.rb' - 'lib/gitlab/metrics/dashboard/validator/errors.rb' + - 'lib/gitlab/pages/cache_control.rb' - 'lib/gitlab/quick_actions/command_definition.rb' - 'lib/gitlab/quick_actions/commit_actions.rb' - 'lib/gitlab/quick_actions/issuable_actions.rb' @@ -318,11 +352,11 @@ Style/FormatString: - 'lib/gitlab/version_info.rb' - 'lib/peek/views/detailed_view.rb' - 'lib/tasks/test.rake' - - 'qa/qa/service/docker_run/gitlab_runner.rb' - 'spec/controllers/graphql_controller_spec.rb' - 'spec/factories/lfs_objects.rb' - 'spec/features/admin/admin_users_spec.rb' - 'spec/features/groups/import_export/connect_instance_spec.rb' + - 'spec/features/issues/form_spec.rb' - 'spec/finders/serverless_domain_finder_spec.rb' - 'spec/graphql/resolvers/projects/jira_projects_resolver_spec.rb' - 'spec/helpers/profiles_helper_spec.rb' @@ -345,6 +379,7 @@ Style/FormatString: - 'spec/support/shared_examples/services/jira/requests/base_shared_examples.rb' - 'spec/support/shared_examples/views/registration_features_prompt_shared_examples.rb' - 'spec/validators/any_field_validator_spec.rb' + - 'spec/views/errors/omniauth_error.html.haml_spec.rb' - 'spec/views/groups/edit.html.haml_spec.rb' - 'spec/views/profiles/keys/_form.html.haml_spec.rb' - 'spec/views/profiles/notifications/show.html.haml_spec.rb' diff --git a/.rubocop_todo/style/guard_clause.yml b/.rubocop_todo/style/guard_clause.yml index 7ee19ee164e..b07c29ca1df 100644 --- a/.rubocop_todo/style/guard_clause.yml +++ b/.rubocop_todo/style/guard_clause.yml @@ -1,8 +1,5 @@ --- Style/GuardClause: - # Offense count: 1014 - # Temporarily disabled due to too many offenses - Enabled: false Exclude: - 'app/controllers/admin/users_controller.rb' - 'app/controllers/application_controller.rb' @@ -28,6 +25,7 @@ Style/GuardClause: - 'app/controllers/dashboard/todos_controller.rb' - 'app/controllers/groups/application_controller.rb' - 'app/controllers/groups_controller.rb' + - 'app/controllers/ide_controller.rb' - 'app/controllers/import/gitea_controller.rb' - 'app/controllers/import/github_controller.rb' - 'app/controllers/import/gitlab_controller.rb' @@ -46,12 +44,14 @@ Style/GuardClause: - 'app/controllers/projects/google_cloud/base_controller.rb' - 'app/controllers/projects/imports_controller.rb' - 'app/controllers/projects/issues_controller.rb' + - 'app/controllers/projects/pipelines/tests_controller.rb' - 'app/controllers/projects/repositories_controller.rb' - 'app/controllers/projects/settings/operations_controller.rb' - 'app/controllers/projects/tree_controller.rb' - 'app/controllers/registrations_controller.rb' - 'app/controllers/repositories/git_http_controller.rb' - 'app/controllers/repositories/lfs_api_controller.rb' + - 'app/controllers/repositories/lfs_storage_controller.rb' - 'app/controllers/search_controller.rb' - 'app/controllers/sessions_controller.rb' - 'app/controllers/users/terms_controller.rb' @@ -65,6 +65,7 @@ Style/GuardClause: - 'app/graphql/mutations/design_management/delete.rb' - 'app/graphql/mutations/notes/create/note.rb' - 'app/graphql/mutations/notes/reposition_image_diff_note.rb' + - 'app/graphql/mutations/packages/destroy_files.rb' - 'app/graphql/resolvers/blobs_resolver.rb' - 'app/graphql/resolvers/board_list_issues_resolver.rb' - 'app/graphql/resolvers/concerns/board_item_filterable.rb' @@ -72,8 +73,8 @@ Style/GuardClause: - 'app/graphql/resolvers/concerns/time_frame_arguments.rb' - 'app/graphql/resolvers/projects/jira_projects_resolver.rb' - 'app/graphql/types/ci/job_type.rb' + - 'app/graphql/types/permission_types/base_permission_type.rb' - 'app/helpers/admin/user_actions_helper.rb' - - 'app/helpers/appearances_helper.rb' - 'app/helpers/application_helper.rb' - 'app/helpers/events_helper.rb' - 'app/helpers/issues_helper.rb' @@ -121,17 +122,18 @@ Style/GuardClause: - 'app/models/design_management/design_collection.rb' - 'app/models/diff_viewer/base.rb' - 'app/models/environment.rb' - - 'app/models/error_tracking/error_event.rb' - 'app/models/error_tracking/project_error_tracking_setting.rb' - 'app/models/experiment_subject.rb' - 'app/models/external_pull_request.rb' - 'app/models/generic_commit_status.rb' + - 'app/models/grafana_integration.rb' - 'app/models/integrations/bamboo.rb' - 'app/models/integrations/base_issue_tracker.rb' - 'app/models/integrations/base_third_party_wiki.rb' - 'app/models/integrations/confluence.rb' - 'app/models/integrations/datadog.rb' - 'app/models/integrations/emails_on_push.rb' + - 'app/models/integrations/field.rb' - 'app/models/integrations/harbor.rb' - 'app/models/integrations/jenkins.rb' - 'app/models/integrations/jira.rb' @@ -142,8 +144,6 @@ Style/GuardClause: - 'app/models/member.rb' - 'app/models/members/project_member.rb' - 'app/models/merge_request.rb' - - 'app/models/merge_request_assignee.rb' - - 'app/models/merge_request_reviewer.rb' - 'app/models/namespace.rb' - 'app/models/namespace_setting.rb' - 'app/models/operations/feature_flags/strategy.rb' @@ -161,6 +161,7 @@ Style/GuardClause: - 'app/models/project_import_state.rb' - 'app/models/project_label.rb' - 'app/models/project_setting.rb' + - 'app/models/protected_branch.rb' - 'app/models/protected_branch/push_access_level.rb' - 'app/models/repository.rb' - 'app/models/sent_notification.rb' @@ -170,6 +171,8 @@ Style/GuardClause: - 'app/models/user.rb' - 'app/models/users/in_product_marketing_email.rb' - 'app/models/wiki.rb' + - 'app/models/work_item.rb' + - 'app/models/work_items/parent_link.rb' - 'app/presenters/ci/pipeline_presenter.rb' - 'app/presenters/merge_request_presenter.rb' - 'app/presenters/project_presenter.rb' @@ -177,15 +180,19 @@ Style/GuardClause: - 'app/services/bulk_imports/file_download_service.rb' - 'app/services/ci/create_web_ide_terminal_service.rb' - 'app/services/ci/daily_build_group_report_result_service.rb' + - 'app/services/ci/job_artifacts/destroy_batch_service.rb' - 'app/services/ci/parse_dotenv_artifact_service.rb' - 'app/services/ci/pipelines/add_job_service.rb' - 'app/services/ci/play_build_service.rb' - 'app/services/ci/retry_job_service.rb' + - 'app/services/ci/runners/reconcile_existing_runner_versions_service.rb' + - 'app/services/ci/runners/register_runner_service.rb' - 'app/services/ci/update_build_queue_service.rb' - 'app/services/clusters/agent_tokens/track_usage_service.rb' - 'app/services/clusters/aws/fetch_credentials_service.rb' - 'app/services/commits/commit_patch_service.rb' - 'app/services/commits/create_service.rb' + - 'app/services/concerns/alert_management/alert_processing.rb' - 'app/services/concerns/ci/job_token_scope/edit_scope_validations.rb' - 'app/services/concerns/rate_limited_service.rb' - 'app/services/concerns/update_repository_storage_methods.rb' @@ -205,12 +212,12 @@ Style/GuardClause: - 'app/services/import/gitlab_projects/file_acquisition_strategies/remote_file.rb' - 'app/services/import/validate_remote_git_endpoint_service.rb' - 'app/services/issuable/bulk_update_service.rb' - - 'app/services/issuable/clone/base_service.rb' - 'app/services/issuable/common_system_notes_service.rb' - 'app/services/issuable_base_service.rb' - 'app/services/issues/clone_service.rb' - 'app/services/issues/move_service.rb' - 'app/services/issues/update_service.rb' + - 'app/services/markdown_content_rewriter_service.rb' - 'app/services/merge_requests/add_spent_time_service.rb' - 'app/services/merge_requests/base_service.rb' - 'app/services/merge_requests/build_service.rb' @@ -238,10 +245,10 @@ Style/GuardClause: - 'app/services/projects/import_export/export_service.rb' - 'app/services/projects/import_service.rb' - 'app/services/projects/lfs_pointers/lfs_object_download_list_service.rb' - - 'app/services/projects/update_pages_service.rb' - 'app/services/projects/update_repository_storage_service.rb' - 'app/services/projects/update_service.rb' - 'app/services/protected_branches/legacy_api_update_service.rb' + - 'app/services/repositories/changelog_service.rb' - 'app/services/snippets/repository_validation_service.rb' - 'app/services/todo_service.rb' - 'app/services/users/build_service.rb' @@ -268,20 +275,24 @@ Style/GuardClause: - 'app/validators/rsa_key_validator.rb' - 'app/validators/top_level_group_validator.rb' - 'app/validators/x509_certificate_credentials_validator.rb' - - 'app/workers/cleanup_container_repository_worker.rb' - 'app/workers/clusters/agents/delete_expired_events_worker.rb' - 'app/workers/concerns/application_worker.rb' - 'app/workers/container_registry/migration/guard_worker.rb' - 'app/workers/deployments/hooks_worker.rb' - 'app/workers/deployments/link_merge_request_worker.rb' - 'app/workers/gitlab/github_import/refresh_import_jid_worker.rb' + - 'app/workers/google_cloud/create_cloudsql_instance_worker.rb' + - 'app/workers/packages/cleanup/execute_policy_worker.rb' - 'app/workers/packages/maven/metadata/sync_worker.rb' + - 'app/workers/projects/import_export/relation_export_worker.rb' - 'app/workers/repository_update_remote_mirror_worker.rb' + - 'app/workers/terraform/states/destroy_worker.rb' - 'config/initializers/0_inject_enterprise_edition_module.rb' - 'config/initializers/carrierwave_patch.rb' - 'config/initializers/devise_dynamic_password_length_validation.rb' - 'config/initializers/google_api_client_patch.rb' - 'config/initializers/postgresql_cte.rb' + - 'config/initializers/wikicloth_redos_patch.rb' - 'config/object_store_settings.rb' - 'danger/feature_flag/Dangerfile' - 'db/migrate/20210302212623_rename_vuln_fingerprints_indexes.rb' @@ -315,6 +326,7 @@ Style/GuardClause: - 'ee/app/finders/ee/template_finder.rb' - 'ee/app/finders/iterations_finder.rb' - 'ee/app/finders/security/vulnerabilities_finder.rb' + - 'ee/app/graphql/mutations/concerns/mutations/shared_epic_arguments.rb' - 'ee/app/graphql/mutations/iterations/create.rb' - 'ee/app/graphql/mutations/iterations/update.rb' - 'ee/app/graphql/mutations/projects/set_locked.rb' @@ -322,13 +334,16 @@ Style/GuardClause: - 'ee/app/graphql/resolvers/epics_resolver.rb' - 'ee/app/graphql/resolvers/iterations_resolver.rb' - 'ee/app/helpers/ee/application_helper.rb' + - 'ee/app/helpers/ee/auth_helper.rb' - 'ee/app/helpers/ee/award_emoji_helper.rb' - 'ee/app/helpers/ee/nav/new_dropdown_helper.rb' - 'ee/app/helpers/ee/nav/top_nav_helper.rb' + - 'ee/app/helpers/ee/projects/pipeline_helper.rb' - 'ee/app/helpers/ee/projects_helper.rb' - 'ee/app/models/allowed_email_domain.rb' - 'ee/app/models/app_sec/fuzzing/coverage/corpus.rb' - 'ee/app/models/approval_merge_request_rule_source.rb' + - 'ee/app/models/audit_events/external_audit_event_destination.rb' - 'ee/app/models/concerns/app_sec/dast/buildable.rb' - 'ee/app/models/concerns/ee/protected_ref_access.rb' - 'ee/app/models/concerns/elastic/application_versioned_search.rb' @@ -338,6 +353,7 @@ Style/GuardClause: - 'ee/app/models/dast_site_profile.rb' - 'ee/app/models/ee/application_setting.rb' - 'ee/app/models/ee/epic.rb' + - 'ee/app/models/ee/group_group_link.rb' - 'ee/app/models/ee/group_member.rb' - 'ee/app/models/ee/incident_management/issuable_escalation_status.rb' - 'ee/app/models/ee/issue.rb' @@ -347,6 +363,7 @@ Style/GuardClause: - 'ee/app/models/ee/merge_request.rb' - 'ee/app/models/ee/namespace.rb' - 'ee/app/models/ee/project.rb' + - 'ee/app/models/ee/project_group_link.rb' - 'ee/app/models/ee/project_member.rb' - 'ee/app/models/ee/user.rb' - 'ee/app/models/elasticsearch_indexed_project.rb' @@ -361,6 +378,7 @@ Style/GuardClause: - 'ee/app/models/namespace_limit.rb' - 'ee/app/models/preloaders/environments/protected_environment_preloader.rb' - 'ee/app/models/protected_environment.rb' + - 'ee/app/models/sbom/occurrence.rb' - 'ee/app/models/users_security_dashboard_project.rb' - 'ee/app/models/vulnerabilities/feedback.rb' - 'ee/app/presenters/ee/merge_request_presenter.rb' @@ -384,8 +402,8 @@ Style/GuardClause: - 'ee/app/services/ee/groups/update_service.rb' - 'ee/app/services/ee/issuable/common_system_notes_service.rb' - 'ee/app/services/ee/issues/base_service.rb' + - 'ee/app/services/ee/issues/clone_service.rb' - 'ee/app/services/ee/merge_requests/merge_base_service.rb' - - 'ee/app/services/ee/merge_requests/post_merge_service.rb' - 'ee/app/services/ee/merge_requests/refresh_service.rb' - 'ee/app/services/ee/namespace_settings/update_service.rb' - 'ee/app/services/ee/projects/create_service.rb' @@ -409,11 +427,12 @@ Style/GuardClause: - 'ee/app/services/merge_trains/refresh_merge_request_service.rb' - 'ee/app/services/merge_trains/refresh_service.rb' - 'ee/app/services/namespaces/storage/email_notification_service.rb' - - 'ee/app/services/projects/slack_application_install_service.rb' - 'ee/app/services/projects/update_mirror_service.rb' - 'ee/app/services/security/override_uuids_service.rb' - 'ee/app/services/timebox_report_service.rb' + - 'ee/app/services/vulnerabilities/security_finding/create_issue_service.rb' - 'ee/app/validators/host_validator.rb' + - 'ee/app/validators/user_existence_validator.rb' - 'ee/app/workers/ee/ci/build_finished_worker.rb' - 'ee/app/workers/ee/post_receive.rb' - 'ee/app/workers/elastic/migration_worker.rb' @@ -462,6 +481,7 @@ Style/GuardClause: - 'ee/lib/omni_auth/strategies/group_saml.rb' - 'ee/spec/features/billings/billing_plans_spec.rb' - 'ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_spec.rb' + - 'ee/spec/support/ci/minutes_helpers.rb' - 'ee/spec/workers/update_max_seats_used_for_gitlab_com_subscriptions_worker_spec.rb' - 'haml_lint/linter/documentation_links.rb' - 'lib/api/commits.rb' @@ -481,6 +501,7 @@ Style/GuardClause: - 'lib/banzai/filter/wiki_link_filter/rewriter.rb' - 'lib/bulk_imports/clients/graphql.rb' - 'lib/bulk_imports/clients/http.rb' + - 'lib/bulk_imports/pipeline/runner.rb' - 'lib/bulk_imports/projects/pipelines/project_pipeline.rb' - 'lib/container_registry/client.rb' - 'lib/feature/definition.rb' @@ -525,21 +546,24 @@ Style/GuardClause: - 'lib/gitlab/ci/reports/codequality_reports_comparer.rb' - 'lib/gitlab/ci/reports/security/vulnerability_reports_comparer.rb' - 'lib/gitlab/ci/runner/backoff.rb' + - 'lib/gitlab/ci/runner_upgrade_check.rb' - 'lib/gitlab/ci/trace.rb' - 'lib/gitlab/ci/trace/archive.rb' - 'lib/gitlab/ci/trace/stream.rb' - 'lib/gitlab/ci/yaml_processor.rb' - 'lib/gitlab/config/entry/validators.rb' + - 'lib/gitlab/daemon.rb' - 'lib/gitlab/database/background_migration/batch_optimizer.rb' - 'lib/gitlab/database/background_migration/batched_migration_wrapper.rb' - 'lib/gitlab/database/consistency_checker.rb' - - 'lib/gitlab/database/load_balancing/configuration.rb' - 'lib/gitlab/database/load_balancing/load_balancer.rb' + - 'lib/gitlab/database/lock_writes_manager.rb' - 'lib/gitlab/database/migration_helpers.rb' - 'lib/gitlab/database/migration_helpers/v2.rb' - 'lib/gitlab/database/partitioning/partition_manager.rb' - 'lib/gitlab/database/partitioning/sliding_list_strategy.rb' - 'lib/gitlab/database/postgresql_adapter/force_disconnectable_mixin.rb' + - 'lib/gitlab/database/query_analyzers/gitlab_schemas_validate_connection.rb' - 'lib/gitlab/database/query_analyzers/restrict_allowed_schemas.rb' - 'lib/gitlab/diff/file.rb' - 'lib/gitlab/diff/highlight.rb' @@ -550,7 +574,6 @@ Style/GuardClause: - 'lib/gitlab/email/hook/email_template_interceptor.rb' - 'lib/gitlab/email/receiver.rb' - 'lib/gitlab/endpoint_attributes/config.rb' - - 'lib/gitlab/error_tracking.rb' - 'lib/gitlab/event_store/event.rb' - 'lib/gitlab/event_store/store.rb' - 'lib/gitlab/exception_log_formatter.rb' @@ -571,10 +594,7 @@ Style/GuardClause: - 'lib/gitlab/github_import/object_counter.rb' - 'lib/gitlab/gitlab_import/client.rb' - 'lib/gitlab/gitlab_import/importer.rb' - - 'lib/gitlab/graphql/pagination/keyset/conditions/not_null_condition.rb' - - 'lib/gitlab/graphql/pagination/keyset/conditions/null_condition.rb' - - 'lib/gitlab/graphql/pagination/keyset/order_info.rb' - - 'lib/gitlab/graphql/pagination/keyset/query_builder.rb' + - 'lib/gitlab/graphql/query_analyzers/ast/recursion_analyzer.rb' - 'lib/gitlab/i18n/metadata_entry.rb' - 'lib/gitlab/i18n/po_linter.rb' - 'lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb' @@ -583,14 +603,19 @@ Style/GuardClause: - 'lib/gitlab/import_export/command_line_util.rb' - 'lib/gitlab/import_export/group/tree_restorer.rb' - 'lib/gitlab/import_export/importer.rb' + - 'lib/gitlab/import_export/project/relation_factory.rb' - 'lib/gitlab/import_export/repo_restorer.rb' - 'lib/gitlab/import_export/snippet_repo_restorer.rb' - 'lib/gitlab/import_export/version_checker.rb' + - 'lib/gitlab/instrumentation/global_search_api.rb' + - 'lib/gitlab/instrumentation/rate_limiting_gates.rb' - 'lib/gitlab/instrumentation/redis_cluster_validator.rb' - 'lib/gitlab/instrumentation/uploads.rb' + - 'lib/gitlab/issuable/clone/copy_resource_events_service.rb' - 'lib/gitlab/legacy_github_import/client.rb' - 'lib/gitlab/legacy_github_import/issuable_formatter.rb' - 'lib/gitlab/marginalia.rb' + - 'lib/gitlab/memory/watchdog.rb' - 'lib/gitlab/metrics/samplers/ruby_sampler.rb' - 'lib/gitlab/metrics/subscribers/action_cable.rb' - 'lib/gitlab/metrics/subscribers/active_record.rb' @@ -598,6 +623,7 @@ Style/GuardClause: - 'lib/gitlab/metrics/subscribers/rails_cache.rb' - 'lib/gitlab/metrics/web_transaction.rb' - 'lib/gitlab/middleware/read_only/controller.rb' + - 'lib/gitlab/pages/deployment_update.rb' - 'lib/gitlab/pagination/gitaly_keyset_pager.rb' - 'lib/gitlab/pagination/keyset/column_order_definition.rb' - 'lib/gitlab/pagination/keyset/in_operator_optimization/array_scope_columns.rb' @@ -626,6 +652,7 @@ Style/GuardClause: - 'lib/gitlab/ssh_public_key.rb' - 'lib/gitlab/url_blocker.rb' - 'lib/gitlab/usage/metric_definition.rb' + - 'lib/gitlab/usage/metrics/instrumentations/count_bulk_imports_entities_metric.rb' - 'lib/gitlab/usage_data_counters/ci_template_unique_counter.rb' - 'lib/gitlab/utils.rb' - 'lib/gitlab/utils/override.rb' @@ -633,6 +660,7 @@ Style/GuardClause: - 'lib/mattermost/session.rb' - 'lib/release_highlights/validator/entry.rb' - 'lib/safe_zip/entry.rb' + - 'lib/service_ping/devops_report.rb' - 'lib/system_check/app/systemd_unit_files_or_init_script_up_to_date_check.rb' - 'lib/system_check/incoming_email/mail_room_running_check.rb' - 'lib/tasks/config_lint.rake' @@ -647,22 +675,22 @@ Style/GuardClause: - 'qa/qa/page/component/snippet.rb' - 'qa/qa/page/mattermost/login.rb' - 'qa/qa/page/page_concern.rb' + - 'qa/qa/page/project/settings/deploy_tokens.rb' - 'qa/qa/resource/api_fabricator.rb' - 'qa/qa/resource/package.rb' + - 'qa/qa/resource/project.rb' - 'qa/qa/resource/registry_repository.rb' - 'qa/qa/resource/reusable.rb' - 'qa/qa/resource/user_gpg.rb' - 'qa/qa/runtime/feature.rb' - 'qa/qa/runtime/search.rb' - 'qa/qa/service/cluster_provider/gcloud.rb' - - 'qa/qa/service/docker_run/gitlab_runner.rb' - 'qa/qa/specs/features/browser_ui/1_manage/login/register_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/11_fulfillment/purchase/free_trial_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/1_manage/group/group_audit_logs_1_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/1_manage/group/group_file_template_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/1_manage/project/project_audit_logs_spec.rb' + - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/group_file_template_spec.rb' - 'qa/qa/specs/helpers/feature_flag.rb' - - 'qa/qa/support/page_error_checker.rb' + - 'qa/qa/vendor/jenkins/job.rb' - 'rubocop/cop/api/grape_array_missing_coerce.rb' - 'rubocop/cop/gitlab/duplicate_spec_location.rb' - 'rubocop/cop/gitlab/event_store_subscriber.rb' @@ -702,6 +730,7 @@ Style/GuardClause: - 'spec/support/import_export/export_file_helper.rb' - 'spec/support/shared_examples/features/packages_shared_examples.rb' - 'spec/support/shared_examples/services/packages/debian/generate_distribution_shared_examples.rb' + - 'spec/tooling/lib/tooling/find_codeowners_spec.rb' - 'spec/workers/container_expiration_policies/cleanup_container_repository_worker_spec.rb' - 'tooling/lib/tooling/helm3_client.rb' - 'tooling/lib/tooling/image.rb' diff --git a/.rubocop_todo/style/if_inside_else.yml b/.rubocop_todo/style/if_inside_else.yml index 3ce6e5ec704..40b71d7de04 100644 --- a/.rubocop_todo/style/if_inside_else.yml +++ b/.rubocop_todo/style/if_inside_else.yml @@ -1,17 +1,13 @@ --- Style/IfInsideElse: - # Offense count: 43 - # Temporarily disabled due to too many offenses - Enabled: false Exclude: - 'app/controllers/application_controller.rb' - 'app/controllers/passwords_controller.rb' - 'app/finders/projects_finder.rb' - - 'app/finders/user_recent_events_finder.rb' - 'app/helpers/diff_helper.rb' + - 'app/helpers/issuables_helper.rb' - 'app/helpers/members_helper.rb' - 'app/helpers/search_helper.rb' - - 'app/models/ci/build.rb' - 'app/models/namespace.rb' - 'app/presenters/project_presenter.rb' - 'app/services/system_notes/commit_service.rb' @@ -22,6 +18,7 @@ Style/IfInsideElse: - 'ee/app/controllers/ee/registrations/welcome_controller.rb' - 'ee/app/controllers/groups/omniauth_callbacks_controller.rb' - 'ee/app/models/ee/namespace.rb' + - 'ee/app/models/iterations/cadence.rb' - 'ee/app/models/protected_environments/authorizable.rb' - 'ee/app/policies/ee/group_policy.rb' - 'ee/app/services/app_sec/dast/site_profiles/audit/update_service.rb' @@ -30,12 +27,15 @@ Style/IfInsideElse: - 'ee/app/services/geo/repository_base_sync_service.rb' - 'ee/app/services/gitlab_subscriptions/fetch_subscription_plans_service.rb' - 'ee/app/services/vulnerability_external_issue_links/create_service.rb' + - 'ee/app/workers/elastic/project_transfer_worker.rb' + - 'ee/app/workers/project_import_schedule_worker.rb' - 'ee/lib/gitlab/geo/base_batcher.rb' - 'lib/api/projects.rb' - 'lib/gitlab/auth.rb' - 'lib/gitlab/conflict/file.rb' - 'lib/gitlab/sql/pattern.rb' - 'lib/gitlab/usage/service_ping/payload_keys_processor.rb' + - 'lib/service_ping/build_payload.rb' - 'lib/tasks/gitlab/cleanup.rake' - 'lib/tasks/gitlab/shell.rake' - 'qa/qa/resource/protected_branch.rb' diff --git a/.rubocop_todo/style/if_unless_modifier.yml b/.rubocop_todo/style/if_unless_modifier.yml index 60ef4238ebd..00c570680d8 100644 --- a/.rubocop_todo/style/if_unless_modifier.yml +++ b/.rubocop_todo/style/if_unless_modifier.yml @@ -1,14 +1,10 @@ --- # Cop supports --auto-correct. Style/IfUnlessModifier: - # Offense count: 1937 - # Temporarily disabled due to too many offenses - Enabled: false Exclude: - 'app/channels/graphql_channel.rb' - 'app/controllers/admin/application_settings_controller.rb' - 'app/controllers/admin/projects_controller.rb' - - 'app/controllers/admin/runners_controller.rb' - 'app/controllers/admin/users_controller.rb' - 'app/controllers/application_controller.rb' - 'app/controllers/concerns/controller_with_cross_project_access_check.rb' @@ -25,6 +21,8 @@ Style/IfUnlessModifier: - 'app/controllers/concerns/paginated_collection.rb' - 'app/controllers/concerns/record_user_last_activity.rb' - 'app/controllers/concerns/sorting_preference.rb' + - 'app/controllers/concerns/uploads_actions.rb' + - 'app/controllers/concerns/verifies_with_email.rb' - 'app/controllers/concerns/wiki_actions.rb' - 'app/controllers/concerns/with_performance_bar.rb' - 'app/controllers/explore/projects_controller.rb' @@ -33,9 +31,9 @@ Style/IfUnlessModifier: - 'app/controllers/groups_controller.rb' - 'app/controllers/import/fogbugz_controller.rb' - 'app/controllers/import/gitea_controller.rb' + - 'app/controllers/import/github_controller.rb' - 'app/controllers/import/gitlab_controller.rb' - 'app/controllers/import/manifest_controller.rb' - - 'app/controllers/jira_connect/application_controller.rb' - 'app/controllers/jwt_controller.rb' - 'app/controllers/omniauth_callbacks_controller.rb' - 'app/controllers/profiles/emails_controller.rb' @@ -53,12 +51,15 @@ Style/IfUnlessModifier: - 'app/controllers/projects/issues_controller.rb' - 'app/controllers/projects/merge_requests/diffs_controller.rb' - 'app/controllers/projects/merge_requests_controller.rb' + - 'app/controllers/projects/pipelines/tests_controller.rb' - 'app/controllers/projects/protected_refs_controller.rb' - 'app/controllers/projects/releases_controller.rb' - 'app/controllers/projects/runners_controller.rb' + - 'app/controllers/projects_controller.rb' - 'app/controllers/registrations_controller.rb' - 'app/controllers/repositories/git_http_controller.rb' - 'app/controllers/repositories/lfs_api_controller.rb' + - 'app/controllers/repositories/lfs_storage_controller.rb' - 'app/controllers/sessions_controller.rb' - 'app/controllers/users/terms_controller.rb' - 'app/finders/autocomplete/users_finder.rb' @@ -92,7 +93,6 @@ Style/IfUnlessModifier: - 'app/graphql/mutations/release_asset_links/delete.rb' - 'app/graphql/mutations/release_asset_links/update.rb' - 'app/graphql/mutations/todos/mark_all_done.rb' - - 'app/graphql/mutations/work_items/create.rb' - 'app/graphql/resolvers/blobs_resolver.rb' - 'app/graphql/resolvers/ci/runner_jobs_resolver.rb' - 'app/graphql/resolvers/concerns/board_item_filterable.rb' @@ -105,7 +105,6 @@ Style/IfUnlessModifier: - 'app/graphql/resolvers/timelog_resolver.rb' - 'app/graphql/types/ci/job_type.rb' - 'app/helpers/admin/user_actions_helper.rb' - - 'app/helpers/appearances_helper.rb' - 'app/helpers/blob_helper.rb' - 'app/helpers/button_helper.rb' - 'app/helpers/ci/status_helper.rb' @@ -116,7 +115,6 @@ Style/IfUnlessModifier: - 'app/helpers/events_helper.rb' - 'app/helpers/form_helper.rb' - 'app/helpers/groups_helper.rb' - - 'app/helpers/issuables_description_templates_helper.rb' - 'app/helpers/issuables_helper.rb' - 'app/helpers/issues_helper.rb' - 'app/helpers/lazy_image_tag_helper.rb' @@ -135,6 +133,7 @@ Style/IfUnlessModifier: - 'app/helpers/selects_helper.rb' - 'app/helpers/snippets_helper.rb' - 'app/helpers/sorting_helper.rb' + - 'app/helpers/storage_helper.rb' - 'app/helpers/submodule_helper.rb' - 'app/helpers/tab_helper.rb' - 'app/helpers/timeboxes_helper.rb' @@ -153,6 +152,7 @@ Style/IfUnlessModifier: - 'app/models/ci/build.rb' - 'app/models/ci/build_trace_chunk.rb' - 'app/models/ci/job_artifact.rb' + - 'app/models/ci/pending_build.rb' - 'app/models/ci/pipeline.rb' - 'app/models/ci/runner.rb' - 'app/models/ci/running_build.rb' @@ -170,7 +170,6 @@ Style/IfUnlessModifier: - 'app/models/concerns/ci/artifactable.rb' - 'app/models/concerns/counter_attribute.rb' - 'app/models/concerns/deprecated_assignee.rb' - - 'app/models/concerns/diff_positionable_note.rb' - 'app/models/concerns/group_descendant.rb' - 'app/models/concerns/has_wiki_page_meta_attributes.rb' - 'app/models/concerns/id_in_ordered.rb' @@ -178,10 +177,10 @@ Style/IfUnlessModifier: - 'app/models/concerns/issuable.rb' - 'app/models/concerns/issuable_link.rb' - 'app/models/concerns/issue_available_features.rb' - - 'app/models/concerns/limitable.rb' - 'app/models/concerns/mentionable.rb' - 'app/models/concerns/noteable.rb' - 'app/models/concerns/routable.rb' + - 'app/models/concerns/sha_attribute.rb' - 'app/models/concerns/timebox.rb' - 'app/models/concerns/token_authenticatable_strategies/base.rb' - 'app/models/concerns/token_authenticatable_strategies/digest.rb' @@ -195,6 +194,7 @@ Style/IfUnlessModifier: - 'app/models/error_tracking/project_error_tracking_setting.rb' - 'app/models/external_pull_request.rb' - 'app/models/generic_commit_status.rb' + - 'app/models/grafana_integration.rb' - 'app/models/group.rb' - 'app/models/integrations/asana.rb' - 'app/models/integrations/bamboo.rb' @@ -205,6 +205,7 @@ Style/IfUnlessModifier: - 'app/models/integrations/jira.rb' - 'app/models/integrations/pushover.rb' - 'app/models/integrations/teamcity.rb' + - 'app/models/issue.rb' - 'app/models/issue_email_participant.rb' - 'app/models/label_note.rb' - 'app/models/list.rb' @@ -217,7 +218,6 @@ Style/IfUnlessModifier: - 'app/models/namespace.rb' - 'app/models/namespace_setting.rb' - 'app/models/namespaces/traversal/linear.rb' - - 'app/models/namespaces/traversal/linear_scopes.rb' - 'app/models/network/graph.rb' - 'app/models/note.rb' - 'app/models/notification_setting.rb' @@ -239,7 +239,6 @@ Style/IfUnlessModifier: - 'app/models/remote_mirror.rb' - 'app/models/repository.rb' - 'app/models/route.rb' - - 'app/models/sent_notification.rb' - 'app/models/service_desk_setting.rb' - 'app/models/snippet_input_action.rb' - 'app/models/state_note.rb' @@ -247,6 +246,8 @@ Style/IfUnlessModifier: - 'app/models/synthetic_note.rb' - 'app/models/user.rb' - 'app/models/wiki.rb' + - 'app/models/work_items/parent_link.rb' + - 'app/policies/project_policy.rb' - 'app/presenters/blob_presenter.rb' - 'app/presenters/ci/pipeline_presenter.rb' - 'app/presenters/merge_request_presenter.rb' @@ -266,7 +267,6 @@ Style/IfUnlessModifier: - 'app/services/boards/lists/base_create_service.rb' - 'app/services/boards/lists/list_service.rb' - 'app/services/branches/validate_new_service.rb' - - 'app/services/bulk_imports/file_decompression_service.rb' - 'app/services/ci/create_pipeline_service.rb' - 'app/services/ci/create_web_ide_terminal_service.rb' - 'app/services/ci/job_token_scope/remove_project_service.rb' @@ -276,6 +276,8 @@ Style/IfUnlessModifier: - 'app/services/ci/register_job_service.rb' - 'app/services/ci/retry_job_service.rb' - 'app/services/ci/run_scheduled_build_service.rb' + - 'app/services/ci/runners/reconcile_existing_runner_versions_service.rb' + - 'app/services/ci/runners/register_runner_service.rb' - 'app/services/ci/update_build_state_service.rb' - 'app/services/clusters/applications/base_service.rb' - 'app/services/clusters/applications/prometheus_update_service.rb' @@ -299,6 +301,7 @@ Style/IfUnlessModifier: - 'app/services/error_tracking/collect_error_service.rb' - 'app/services/git/process_ref_changes_service.rb' - 'app/services/google_cloud/generate_pipeline_service.rb' + - 'app/services/google_cloud/setup_cloudsql_instance_service.rb' - 'app/services/groups/create_service.rb' - 'app/services/groups/transfer_service.rb' - 'app/services/groups/update_statistics_service.rb' @@ -314,7 +317,6 @@ Style/IfUnlessModifier: - 'app/services/issues/relative_position_rebalancing_service.rb' - 'app/services/issues/update_service.rb' - 'app/services/lfs/lock_file_service.rb' - - 'app/services/members/approve_access_request_service.rb' - 'app/services/members/destroy_service.rb' - 'app/services/members/update_service.rb' - 'app/services/merge_requests/add_context_service.rb' @@ -322,7 +324,6 @@ Style/IfUnlessModifier: - 'app/services/merge_requests/build_service.rb' - 'app/services/merge_requests/handle_assignees_change_service.rb' - 'app/services/merge_requests/merge_base_service.rb' - - 'app/services/merge_requests/mergeability/run_checks_service.rb' - 'app/services/merge_requests/mergeability_check_service.rb' - 'app/services/merge_requests/push_options_handler_service.rb' - 'app/services/merge_requests/refresh_service.rb' @@ -371,8 +372,8 @@ Style/IfUnlessModifier: - 'app/services/projects/overwrite_project_service.rb' - 'app/services/projects/participants_service.rb' - 'app/services/projects/transfer_service.rb' - - 'app/services/projects/update_pages_service.rb' - 'app/services/projects/update_repository_storage_service.rb' + - 'app/services/protected_branches/cache_service.rb' - 'app/services/resource_access_tokens/create_service.rb' - 'app/services/resource_events/change_labels_service.rb' - 'app/services/snippets/create_service.rb' @@ -388,6 +389,8 @@ Style/IfUnlessModifier: - 'app/services/users/respond_to_terms_service.rb' - 'app/services/wikis/create_attachment_service.rb' - 'app/services/work_items/create_service.rb' + - 'app/services/work_items/parent_links/create_service.rb' + - 'app/services/work_items/task_list_reference_removal_service.rb' - 'app/services/work_items/task_list_reference_replacement_service.rb' - 'app/uploaders/file_mover.rb' - 'app/uploaders/object_storage.rb' @@ -408,17 +411,20 @@ Style/IfUnlessModifier: - 'app/views/projects/merge_requests/index.atom.builder' - 'app/workers/authorized_project_update/user_refresh_from_replica_worker.rb' - 'app/workers/auto_devops/disable_worker.rb' - - 'app/workers/cleanup_container_repository_worker.rb' - 'app/workers/concerns/application_worker.rb' - 'app/workers/concerns/packages/cleanup_artifact_worker.rb' - 'app/workers/concerns/project_start_import.rb' + - 'app/workers/concerns/waitable_worker.rb' - 'app/workers/concerns/worker_attributes.rb' - 'app/workers/database/batched_background_migration/single_database_worker.rb' + - 'app/workers/delete_container_repository_worker.rb' - 'app/workers/file_hook_worker.rb' + - 'app/workers/google_cloud/create_cloudsql_instance_worker.rb' - 'app/workers/issues/rebalancing_worker.rb' - 'app/workers/merge_request_mergeability_check_worker.rb' - 'app/workers/object_storage/migrate_uploads_worker.rb' - 'app/workers/process_commit_worker.rb' + - 'app/workers/projects/import_export/relation_export_worker.rb' - 'app/workers/remove_expired_members_worker.rb' - 'app/workers/repository_fork_worker.rb' - 'app/workers/repository_update_remote_mirror_worker.rb' @@ -429,11 +435,10 @@ Style/IfUnlessModifier: - 'config/initializers/1_settings.rb' - 'config/initializers/6_validations.rb' - 'config/initializers/8_devise.rb' - - 'config/initializers/active_record_data_types.rb' - 'config/initializers/active_record_transaction_patches.rb' - - 'config/initializers/content_security_policy.rb' - 'config/initializers/default_url_options.rb' - 'config/initializers/direct_upload_support.rb' + - 'config/initializers/doorkeeper.rb' - 'config/initializers/geo.rb' - 'config/initializers/google_api_client.rb' - 'config/initializers/google_api_client_patch.rb' @@ -449,7 +454,6 @@ Style/IfUnlessModifier: - 'config/initializers/zz_metrics.rb' - 'config/initializers_before_autoloader/002_sidekiq.rb' - 'config/routes.rb' - - 'config/settings.rb' - 'danger/database/Dangerfile' - 'danger/pipeline/Dangerfile' - 'danger/specs/Dangerfile' @@ -465,7 +469,8 @@ Style/IfUnlessModifier: - 'db/post_migrate/20211021140426_remove_geo_upload_deprecated_fields.rb' - 'db/post_migrate/20220128155814_fix_approval_rules_code_owners_rule_type_index.rb' - 'db/post_migrate/20220131000001_schedule_trace_expiry_removal.rb' - - 'ee/app/controllers/admin/audit_logs_controller.rb' + - 'db/post_migrate/20220523171107_drop_deploy_tokens_token_column.rb' + - 'ee/app/components/namespaces/storage/limit_alert.rb' - 'ee/app/controllers/admin/elasticsearch_controller.rb' - 'ee/app/controllers/admin/emails_controller.rb' - 'ee/app/controllers/admin/geo/application_controller.rb' @@ -495,10 +500,11 @@ Style/IfUnlessModifier: - 'ee/app/finders/merge_trains_finder.rb' - 'ee/app/finders/security/pipeline_vulnerabilities_finder.rb' - 'ee/app/finders/security/vulnerabilities_finder.rb' - - 'ee/app/graphql/ee/mutations/issues/create.rb' - 'ee/app/graphql/ee/resolvers/base_issues_resolver.rb' - 'ee/app/graphql/mutations/audit_events/external_audit_event_destinations/create.rb' - 'ee/app/graphql/mutations/audit_events/external_audit_event_destinations/destroy.rb' + - 'ee/app/graphql/mutations/boards/scoped_board_mutation.rb' + - 'ee/app/graphql/mutations/dast_site_profiles/create.rb' - 'ee/app/graphql/mutations/iterations/update.rb' - 'ee/app/graphql/mutations/projects/set_locked.rb' - 'ee/app/graphql/resolvers/analytics/devops_adoption/enabled_namespaces_resolver.rb' @@ -506,38 +512,37 @@ Style/IfUnlessModifier: - 'ee/app/graphql/resolvers/boards/epic_lists_resolver.rb' - 'ee/app/graphql/resolvers/iterations/cadences_resolver.rb' - 'ee/app/helpers/billing_plans_helper.rb' - - 'ee/app/helpers/ee/application_helper.rb' - 'ee/app/helpers/ee/dashboard_helper.rb' - - 'ee/app/helpers/ee/environments_helper.rb' - 'ee/app/helpers/ee/integrations_helper.rb' - 'ee/app/helpers/ee/issues_helper.rb' - 'ee/app/helpers/ee/labels_helper.rb' - 'ee/app/helpers/ee/merge_requests_helper.rb' - 'ee/app/helpers/ee/notes_helper.rb' - 'ee/app/helpers/ee/personal_access_tokens_helper.rb' + - 'ee/app/helpers/ee/projects/pipeline_helper.rb' - 'ee/app/helpers/ee/projects_helper.rb' - 'ee/app/models/allowed_email_domain.rb' - 'ee/app/models/app_sec/fuzzing/coverage/corpus.rb' + - 'ee/app/models/approval_project_rule.rb' - 'ee/app/models/concerns/ee/protected_ref_access.rb' - 'ee/app/models/concerns/elastic/application_versioned_search.rb' - - 'ee/app/models/concerns/geo/replicable_model.rb' - 'ee/app/models/concerns/geo/verifiable_replicator.rb' - 'ee/app/models/concerns/security/scan_execution_policy.rb' - 'ee/app/models/dast_site_profile.rb' - 'ee/app/models/ee/application_setting.rb' + - 'ee/app/models/ee/ci/job_artifact.rb' + - 'ee/app/models/ee/group.rb' - 'ee/app/models/ee/group_member.rb' - 'ee/app/models/ee/issue.rb' - 'ee/app/models/ee/iteration.rb' - 'ee/app/models/ee/key.rb' - 'ee/app/models/ee/list.rb' - - 'ee/app/models/ee/member.rb' - 'ee/app/models/ee/milestone_release.rb' - 'ee/app/models/ee/namespace.rb' - 'ee/app/models/ee/project.rb' - 'ee/app/models/ee/project_feature.rb' - 'ee/app/models/ee/project_team.rb' - 'ee/app/models/ee/user.rb' - - 'ee/app/models/ee/vulnerability.rb' - 'ee/app/models/geo/project_registry.rb' - 'ee/app/models/geo/tracking_base.rb' - 'ee/app/models/incident_management/escalation_rule.rb' @@ -553,6 +558,7 @@ Style/IfUnlessModifier: - 'ee/app/serializers/vulnerabilities/finding_serializer.rb' - 'ee/app/services/analytics/cycle_analytics/aggregator_service.rb' - 'ee/app/services/analytics/cycle_analytics/validations.rb' + - 'ee/app/services/app_sec/dast/pipelines/find_latest_service.rb' - 'ee/app/services/app_sec/dast/profiles/build_config_service.rb' - 'ee/app/services/app_sec/dast/profiles/create_associations_service.rb' - 'ee/app/services/app_sec/dast/scan_configs/build_service.rb' @@ -563,7 +569,6 @@ Style/IfUnlessModifier: - 'ee/app/services/app_sec/dast/site_profiles/destroy_service.rb' - 'ee/app/services/app_sec/dast/site_profiles/update_service.rb' - 'ee/app/services/app_sec/fuzzing/api/ci_configuration_create_service.rb' - - 'ee/app/services/audit_events/runner_audit_event_service.rb' - 'ee/app/services/auto_merge/add_to_merge_train_when_pipeline_succeeds_service.rb' - 'ee/app/services/billable_members/destroy_service.rb' - 'ee/app/services/boards/epic_boards/create_service.rb' @@ -571,6 +576,7 @@ Style/IfUnlessModifier: - 'ee/app/services/boards/epics/create_service.rb' - 'ee/app/services/ci/minutes/update_project_and_namespace_usage_service.rb' - 'ee/app/services/ci/subscribe_bridge_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/deployments/auto_rollback_service.rb' @@ -580,15 +586,13 @@ Style/IfUnlessModifier: - 'ee/app/services/ee/audit_event_service.rb' - 'ee/app/services/ee/boards/base_service.rb' - 'ee/app/services/ee/boards/issues/move_service.rb' + - 'ee/app/services/ee/ci/runners/reset_registration_token_service.rb' - 'ee/app/services/ee/commits/create_service.rb' - 'ee/app/services/ee/deploy_keys/create_service.rb' - 'ee/app/services/ee/groups/update_service.rb' - 'ee/app/services/ee/ip_restrictions/update_service.rb' - 'ee/app/services/ee/issuable_base_service.rb' - 'ee/app/services/ee/issues/base_service.rb' - - 'ee/app/services/ee/issues/clone_service.rb' - - 'ee/app/services/ee/issues/move_service.rb' - - 'ee/app/services/ee/merge_requests/base_service.rb' - 'ee/app/services/ee/merge_requests/refresh_service.rb' - 'ee/app/services/ee/merge_requests/update_service.rb' - 'ee/app/services/ee/milestones/update_service.rb' @@ -597,16 +601,18 @@ Style/IfUnlessModifier: - 'ee/app/services/ee/projects/destroy_service.rb' - 'ee/app/services/ee/projects/gitlab_projects_import_service.rb' - 'ee/app/services/ee/protected_branches/create_service.rb' - - 'ee/app/services/ee/resource_events/change_labels_service.rb' - 'ee/app/services/ee/todo_service.rb' - 'ee/app/services/ee/users/update_service.rb' - 'ee/app/services/elastic/indexing_control_service.rb' - 'ee/app/services/elastic/process_bookkeeping_service.rb' - 'ee/app/services/epics/base_service.rb' - 'ee/app/services/epics/create_service.rb' + - 'ee/app/services/epics/epic_links/create_service.rb' + - 'ee/app/services/epics/epic_links/update_service.rb' - 'ee/app/services/epics/update_dates_service.rb' - 'ee/app/services/epics/update_service.rb' - 'ee/app/services/external_status_checks/create_service.rb' + - 'ee/app/services/geo/file_registry_removal_service.rb' - 'ee/app/services/geo/metrics_update_service.rb' - 'ee/app/services/geo/move_repository_service.rb' - 'ee/app/services/geo/prune_event_log_service.rb' @@ -624,7 +630,6 @@ Style/IfUnlessModifier: - 'ee/app/services/merge_requests/update_blocks_service.rb' - 'ee/app/services/merge_trains/refresh_merge_request_service.rb' - 'ee/app/services/projects/mark_for_deletion_service.rb' - - 'ee/app/services/projects/slack_application_install_service.rb' - 'ee/app/services/projects/update_mirror_service.rb' - 'ee/app/services/resource_events/change_weight_service.rb' - 'ee/app/services/security/dependency_list_service.rb' @@ -648,17 +653,18 @@ Style/IfUnlessModifier: - 'ee/app/services/vulnerability_feedback/destroy_service.rb' - 'ee/app/services/vulnerability_feedback_module/update_service.rb' - 'ee/app/validators/host_validator.rb' + - 'ee/app/validators/password/complexity_validator.rb' - 'ee/app/workers/app_sec/dast/profile_schedule_worker.rb' - 'ee/app/workers/audit_events/audit_event_streaming_worker.rb' - 'ee/app/workers/concerns/elastic/migration_helper.rb' - 'ee/app/workers/ee/ci/build_finished_worker.rb' - - 'ee/app/workers/ee/post_receive.rb' + - 'ee/app/workers/elastic/project_transfer_worker.rb' - 'ee/app/workers/epics/new_epic_issue_worker.rb' - 'ee/app/workers/geo/secondary/registry_consistency_worker.rb' - 'ee/app/workers/security/orchestration_policy_rule_schedule_namespace_worker.rb' - 'ee/db/geo/migrate/20170627195211_add_index_to_project_registry.rb' - 'ee/db/geo/migrate/20180402170913_add_missing_on_primary_to_job_artifact_registry..rb' - - 'ee/lib/analytics/devops_adoption/snapshot_calculator.rb' + - 'ee/elastic/migrate/20220119120500_populate_commit_permissions_in_main_index.rb' - 'ee/lib/api/epics.rb' - 'ee/lib/api/merge_request_approval_rules.rb' - 'ee/lib/api/protected_environments.rb' @@ -678,7 +684,6 @@ Style/IfUnlessModifier: - 'ee/lib/ee/container_registry/client.rb' - 'ee/lib/ee/gitlab/auth/ldap/access.rb' - 'ee/lib/ee/gitlab/auth/ldap/group.rb' - - 'ee/lib/ee/gitlab/background_migration/drop_invalid_remediations.rb' - 'ee/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_check_progress.rb' - 'ee/lib/ee/gitlab/checks/diff_check.rb' - 'ee/lib/ee/gitlab/checks/push_rules/tag_check.rb' @@ -712,7 +717,7 @@ Style/IfUnlessModifier: - 'ee/lib/gitlab/geo/replication/blob_downloader.rb' - 'ee/lib/gitlab/geo/replicator.rb' - 'ee/lib/gitlab/graphql/aggregations/epics/lazy_epic_aggregate.rb' - - 'ee/lib/gitlab/graphql/aggregations/issues/lazy_links_aggregate.rb' + - 'ee/lib/gitlab/graphql/aggregations/issuables/lazy_links_aggregate.rb' - 'ee/lib/gitlab/graphql/aggregations/security_orchestration_policies/lazy_dast_profile_aggregate.rb' - 'ee/lib/gitlab/graphql/aggregations/vulnerabilities/lazy_user_notes_count_aggregate.rb' - 'ee/lib/gitlab/graphql/aggregations/vulnerability_statistics/lazy_aggregate.rb' @@ -740,7 +745,6 @@ Style/IfUnlessModifier: - 'ee/spec/graphql/types/pipeline_security_report_finding_type_spec.rb' - 'ee/spec/helpers/ee/users/callouts_helper_spec.rb' - 'ee/spec/lib/gitlab/analytics/cycle_analytics/data_collector_spec.rb' - - 'ee/spec/lib/gitlab/elastic/project_search_results_spec.rb' - 'ee/spec/lib/gitlab/elastic/search_results_spec.rb' - 'ee/spec/lib/gitlab/geo/replication/blob_downloader_spec.rb' - 'ee/spec/models/concerns/elastic/note_spec.rb' @@ -765,7 +769,6 @@ Style/IfUnlessModifier: - 'lib/api/ci/pipeline_schedules.rb' - 'lib/api/ci/runner.rb' - 'lib/api/ci/runners.rb' - - 'lib/api/ci/secure_files.rb' - 'lib/api/commits.rb' - 'lib/api/debian_project_packages.rb' - 'lib/api/deployments.rb' @@ -774,7 +777,6 @@ Style/IfUnlessModifier: - 'lib/api/entities/member_access.rb' - 'lib/api/entities/project_import_status.rb' - 'lib/api/feature_flags.rb' - - 'lib/api/feature_flags_user_lists.rb' - 'lib/api/files.rb' - 'lib/api/groups.rb' - 'lib/api/helm_packages.rb' @@ -790,14 +792,15 @@ Style/IfUnlessModifier: - 'lib/api/helpers/projects_helpers.rb' - 'lib/api/helpers/users_helpers.rb' - 'lib/api/helpers/version.rb' + - 'lib/api/helpers/web_hooks_helpers.rb' - 'lib/api/internal/base.rb' - 'lib/api/internal/container_registry/migration.rb' + - 'lib/api/internal/error_tracking.rb' - 'lib/api/invitations.rb' - 'lib/api/maven_packages.rb' - 'lib/api/merge_requests.rb' - 'lib/api/nuget_project_packages.rb' - 'lib/api/pages_domains.rb' - - 'lib/api/project_clusters.rb' - 'lib/api/project_snippets.rb' - 'lib/api/projects.rb' - 'lib/api/projects_relation_builder.rb' @@ -839,6 +842,7 @@ Style/IfUnlessModifier: - 'lib/generators/gitlab/usage_metric_generator.rb' - 'lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher.rb' - 'lib/gitlab/analytics/cycle_analytics/request_params.rb' + - 'lib/gitlab/application_context.rb' - 'lib/gitlab/auth.rb' - 'lib/gitlab/auth/auth_finders.rb' - 'lib/gitlab/auth/ldap/adapter.rb' @@ -860,6 +864,7 @@ Style/IfUnlessModifier: - 'lib/gitlab/checks/matching_merge_request.rb' - 'lib/gitlab/checks/push_check.rb' - 'lib/gitlab/checks/push_file_count_check.rb' + - 'lib/gitlab/checks/tag_check.rb' - 'lib/gitlab/ci/ansi2html.rb' - 'lib/gitlab/ci/ansi2json/converter.rb' - 'lib/gitlab/ci/ansi2json/style.rb' @@ -875,7 +880,6 @@ Style/IfUnlessModifier: - 'lib/gitlab/ci/config/entry/jobs.rb' - 'lib/gitlab/ci/config/entry/needs.rb' - 'lib/gitlab/ci/config/entry/policy.rb' - - 'lib/gitlab/ci/config/entry/processable.rb' - 'lib/gitlab/ci/config/entry/product/matrix.rb' - 'lib/gitlab/ci/config/extendable/entry.rb' - 'lib/gitlab/ci/config/external/file/base.rb' @@ -911,6 +915,7 @@ Style/IfUnlessModifier: - 'lib/gitlab/content_security_policy/config_loader.rb' - 'lib/gitlab/cross_project_access/check_info.rb' - 'lib/gitlab/data_builder/deployment.rb' + - 'lib/gitlab/data_builder/pipeline.rb' - 'lib/gitlab/database/as_with_materialized.rb' - 'lib/gitlab/database/background_migration/batched_job.rb' - 'lib/gitlab/database/background_migration/batched_migration_wrapper.rb' @@ -931,8 +936,6 @@ Style/IfUnlessModifier: - 'lib/gitlab/database/reindexing/reindex_concurrently.rb' - 'lib/gitlab/database/transaction/observer.rb' - 'lib/gitlab/database/with_lock_retries.rb' - - 'lib/gitlab/diff/formatters/base_formatter.rb' - - 'lib/gitlab/diff/rendered/notebook/diff_file.rb' - 'lib/gitlab/email/handler/service_desk_handler.rb' - 'lib/gitlab/email/message/in_product_marketing/base.rb' - 'lib/gitlab/email/message/repository_push.rb' @@ -941,7 +944,6 @@ Style/IfUnlessModifier: - 'lib/gitlab/encrypted_command_base.rb' - 'lib/gitlab/encrypted_configuration.rb' - 'lib/gitlab/endpoint_attributes/config.rb' - - 'lib/gitlab/error_tracking.rb' - 'lib/gitlab/error_tracking/context_payload_generator.rb' - 'lib/gitlab/error_tracking/processor/sidekiq_processor.rb' - 'lib/gitlab/etag_caching/middleware.rb' @@ -959,7 +961,6 @@ Style/IfUnlessModifier: - 'lib/gitlab/git_access.rb' - 'lib/gitlab/git_access_project.rb' - 'lib/gitlab/git_access_snippet.rb' - - 'lib/gitlab/git_access_wiki.rb' - 'lib/gitlab/gitaly_client.rb' - 'lib/gitlab/gitaly_client/blob_service.rb' - 'lib/gitlab/gitaly_client/operation_service.rb' @@ -970,15 +971,11 @@ Style/IfUnlessModifier: - 'lib/gitlab/gitlab_import/client.rb' - 'lib/gitlab/gitlab_import/importer.rb' - 'lib/gitlab/golang.rb' - - 'lib/gitlab/graphql/pagination/keyset/conditions/base_condition.rb' - - 'lib/gitlab/graphql/pagination/keyset/conditions/not_null_condition.rb' - 'lib/gitlab/graphql/pagination/keyset/connection.rb' - - 'lib/gitlab/graphql/pagination/keyset/generic_keyset_pagination.rb' - - 'lib/gitlab/graphql/pagination/keyset/order_info.rb' - - 'lib/gitlab/graphql/pagination/keyset/query_builder.rb' - 'lib/gitlab/graphql/queries.rb' - 'lib/gitlab/hashed_storage/rake_helper.rb' - 'lib/gitlab/hotlinking_detector.rb' + - 'lib/gitlab/http.rb' - 'lib/gitlab/http_io.rb' - 'lib/gitlab/i18n/po_linter.rb' - 'lib/gitlab/import/import_failure_service.rb' @@ -986,12 +983,13 @@ Style/IfUnlessModifier: - 'lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb' - 'lib/gitlab/import_export/base/relation_factory.rb' - 'lib/gitlab/import_export/fast_hash_serializer.rb' - - 'lib/gitlab/import_export/file_importer.rb' - 'lib/gitlab/import_export/group/tree_restorer.rb' - 'lib/gitlab/import_export/json/legacy_writer.rb' - 'lib/gitlab/import_export/merge_request_parser.rb' - 'lib/gitlab/import_export/project/export_task.rb' + - 'lib/gitlab/import_export/project/relation_factory.rb' - 'lib/gitlab/import_export/project/tree_restorer.rb' + - 'lib/gitlab/instrumentation/rate_limiting_gates.rb' - 'lib/gitlab/instrumentation/redis_interceptor.rb' - 'lib/gitlab/jira_import.rb' - 'lib/gitlab/jira_import/base_importer.rb' @@ -999,6 +997,7 @@ Style/IfUnlessModifier: - 'lib/gitlab/legacy_github_import/importer.rb' - 'lib/gitlab/legacy_github_import/issuable_formatter.rb' - 'lib/gitlab/legacy_github_import/project_creator.rb' + - 'lib/gitlab/lograge/custom_options.rb' - 'lib/gitlab/mail_room.rb' - 'lib/gitlab/mail_room/authenticator.rb' - 'lib/gitlab/manifest_import/manifest.rb' @@ -1010,19 +1009,19 @@ Style/IfUnlessModifier: - 'lib/gitlab/metrics/dashboard/stages/metric_endpoint_inserter.rb' - 'lib/gitlab/metrics/dashboard/stages/variable_endpoint_inserter.rb' - 'lib/gitlab/metrics/methods.rb' - - 'lib/gitlab/metrics/rails_slis.rb' + - 'lib/gitlab/metrics/subscribers/rack_attack.rb' - 'lib/gitlab/metrics/web_transaction.rb' - 'lib/gitlab/middleware/compressed_json.rb' - 'lib/gitlab/middleware/multipart.rb' - 'lib/gitlab/middleware/same_site_cookies.rb' - 'lib/gitlab/object_hierarchy.rb' - 'lib/gitlab/omniauth_initializer.rb' + - 'lib/gitlab/pages/deployment_update.rb' - 'lib/gitlab/pagination/keyset/in_operator_optimization/query_builder.rb' - 'lib/gitlab/patch/database_config.rb' - 'lib/gitlab/patch/prependable.rb' - 'lib/gitlab/popen.rb' - 'lib/gitlab/query_limiting/active_support_subscriber.rb' - - 'lib/gitlab/quick_actions/command_definition.rb' - 'lib/gitlab/quick_actions/extractor.rb' - 'lib/gitlab/quick_actions/issuable_actions.rb' - 'lib/gitlab/quick_actions/issue_and_merge_request_actions.rb' @@ -1043,11 +1042,9 @@ Style/IfUnlessModifier: - 'lib/gitlab/sidekiq_middleware/server_metrics.rb' - 'lib/gitlab/slash_commands/presenters/issue_show.rb' - 'lib/gitlab/suggestions/suggestion_set.rb' - - 'lib/gitlab/template/gitlab_ci_yml_template.rb' - 'lib/gitlab/template_parser/eval_state.rb' - 'lib/gitlab/untrusted_regexp.rb' - 'lib/gitlab/url_blocker.rb' - - 'lib/gitlab/usage/metrics/aggregates/aggregate.rb' - 'lib/gitlab/usage_data.rb' - 'lib/gitlab/usage_data_counters/base_counter.rb' - 'lib/gitlab/usage_data_counters/hll_redis_counter.rb' @@ -1083,13 +1080,12 @@ Style/IfUnlessModifier: - 'qa/qa/ee/page/merge_request/show.rb' - 'qa/qa/ee/resource/settings/elasticsearch.rb' - 'qa/qa/flow/sign_up.rb' - - 'qa/qa/git/repository.rb' - - 'qa/qa/page/component/design_management.rb' - 'qa/qa/page/component/select2.rb' - 'qa/qa/page/component/snippet.rb' - 'qa/qa/page/element.rb' - 'qa/qa/page/mattermost/login.rb' - 'qa/qa/page/page_concern.rb' + - 'qa/qa/page/project/settings/deploy_tokens.rb' - 'qa/qa/page/project/web_ide/edit.rb' - 'qa/qa/page/view.rb' - 'qa/qa/resource/registry_repository.rb' @@ -1098,21 +1094,17 @@ Style/IfUnlessModifier: - 'qa/qa/resource/runner.rb' - 'qa/qa/resource/snippet.rb' - 'qa/qa/runtime/application_settings.rb' - - 'qa/qa/runtime/browser.rb' - 'qa/qa/runtime/gpg.rb' - 'qa/qa/runtime/ip_address.rb' - 'qa/qa/scenario/bootable.rb' - - 'qa/qa/scenario/template.rb' - - 'qa/qa/service/docker_run/gitlab_runner.rb' - - 'qa/qa/service/docker_run/jenkins.rb' - 'qa/qa/service/praefect_manager.rb' - 'qa/qa/specs/features/api/3_create/gitaly/distributed_reads_spec.rb' - 'qa/qa/specs/features/browser_ui/3_create/merge_request/merge_when_pipeline_succeeds_spec.rb' - 'qa/qa/specs/features/browser_ui/3_create/web_ide/web_terminal_spec.rb' - 'qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_group_level_spec.rb' - - 'qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_project_level_spec.rb' - 'qa/qa/specs/features/ee/api/9_enablement/elasticsearch/advanced_global_advanced_syntax_search_spec.rb' - 'qa/qa/specs/features/ee/api/9_enablement/elasticsearch/elasticsearch_api_spec.rb' + - 'qa/qa/specs/features/ee/api/9_enablement/elasticsearch/index_tests/commit_index/commit_index_spec.rb' - 'qa/qa/specs/features/ee/api/9_enablement/elasticsearch/index_tests/issues_index/issue_index_spec.rb' - 'qa/qa/specs/features/ee/api/9_enablement/elasticsearch/index_tests/main_index/blob_index_spec.rb' - 'qa/qa/specs/features/ee/api/9_enablement/elasticsearch/index_tests/merge_request_index/merge_request_index_spec.rb' @@ -1120,15 +1112,13 @@ Style/IfUnlessModifier: - 'qa/qa/specs/features/ee/api/9_enablement/elasticsearch/nightly_elasticsearch_test_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/12_geo/geo_replication_maven_package_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/1_manage/group/group_ldap_sync_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/1_manage/project/project_audit_logs_spec.rb' + - 'qa/qa/specs/features/ee/browser_ui/9_enablement/elasticsearch/elasticsearch_reindexing_spec.rb' - 'qa/qa/specs/helpers/context_selector.rb' - 'qa/qa/specs/parallel_runner.rb' - 'qa/qa/support/loglinking.rb' - - 'qa/qa/support/page_error_checker.rb' - - 'qa/qa/support/wait_for_requests.rb' - 'qa/qa/tools/delete_projects.rb' + - 'qa/qa/tools/delete_user_projects.rb' - 'qa/qa/tools/generate_perf_testdata.rb' - - 'qa/qa/tools/test_resources_handler.rb' - 'rubocop/cop/api/grape_array_missing_coerce.rb' - 'rubocop/cop/avoid_keyword_arguments_in_sidekiq_workers.rb' - 'rubocop/cop/gitlab/event_store_subscriber.rb' @@ -1148,8 +1138,11 @@ Style/IfUnlessModifier: - 'scripts/setup/find-jh-branch.rb' - 'scripts/static-analysis' - 'sidekiq_cluster/cli.rb' + - 'spec/components/previews/pajamas/alert_component_preview.rb' + - 'spec/components/previews/pajamas/card_component_preview.rb' - 'spec/db/docs_spec.rb' - 'spec/factories/ci/runners.rb' + - 'spec/factories/clusters/applications/helm.rb' - 'spec/factories/container_repositories.rb' - 'spec/factories/deployments.rb' - 'spec/factories/labels.rb' @@ -1163,6 +1156,8 @@ Style/IfUnlessModifier: - 'spec/features/merge_request/batch_comments_spec.rb' - 'spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb' - 'spec/features/projects/blobs/edit_spec.rb' + - 'spec/features/projects/tree/create_directory_spec.rb' + - 'spec/features/projects/tree/create_file_spec.rb' - 'spec/graphql/mutations/releases/update_spec.rb' - 'spec/helpers/application_settings_helper_spec.rb' - 'spec/helpers/invite_members_helper_spec.rb' @@ -1172,6 +1167,7 @@ Style/IfUnlessModifier: - 'spec/lib/gitlab/config/entry/validators/nested_array_helpers_spec.rb' - 'spec/lib/gitlab/conflict/file_spec.rb' - 'spec/lib/gitlab/database/load_balancing_spec.rb' + - 'spec/lib/gitlab/database/lock_writes_manager_spec.rb' - 'spec/lib/gitlab/rack_attack/user_allowlist_spec.rb' - 'spec/lib/gitlab/sidekiq_config/worker_router_spec.rb' - 'spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb' @@ -1185,8 +1181,10 @@ Style/IfUnlessModifier: - 'spec/policies/project_statistics_policy_spec.rb' - 'spec/requests/api/ci/jobs_spec.rb' - 'spec/requests/api/commit_statuses_spec.rb' + - 'spec/requests/api/commits_spec.rb' - 'spec/requests/api/files_spec.rb' - 'spec/requests/api/integrations_spec.rb' + - 'spec/requests/users_controller_spec.rb' - 'spec/routing/import_routing_spec.rb' - 'spec/serializers/issue_sidebar_basic_entity_spec.rb' - 'spec/services/application_settings/update_service_spec.rb' @@ -1206,13 +1204,11 @@ Style/IfUnlessModifier: - 'spec/support/external_authorization_service_helpers.rb' - 'spec/support/flaky_tests.rb' - 'spec/support/generate-seed-repo-rb' - - 'spec/support/helpers/cycle_analytics_helpers.rb' - 'spec/support/helpers/filter_spec_helper.rb' - 'spec/support/helpers/filtered_search_helpers.rb' - 'spec/support/helpers/gitaly_setup.rb' - 'spec/support/helpers/graphql_helpers.rb' - 'spec/support/helpers/javascript_fixtures_helpers.rb' - - 'spec/support/helpers/kubernetes_helpers.rb' - 'spec/support/helpers/lets_encrypt_helpers.rb' - 'spec/support/helpers/live_debugger.rb' - 'spec/support/helpers/modal_helpers.rb' @@ -1246,6 +1242,7 @@ Style/IfUnlessModifier: - 'spec/views/shared/access_tokens/_table.html.haml_spec.rb' - 'spec/workers/analytics/usage_trends/counter_job_worker_spec.rb' - 'tooling/danger/product_intelligence.rb' + - 'tooling/lib/tooling/find_codeowners.rb' - 'tooling/lib/tooling/image.rb' - 'tooling/lib/tooling/test_map_packer.rb' - 'tooling/rspec_flaky/flaky_example.rb' diff --git a/.rubocop_todo/style/missing_respond_to_missing.yml b/.rubocop_todo/style/missing_respond_to_missing.yml index 4d602586342..9387ae72d00 100644 --- a/.rubocop_todo/style/missing_respond_to_missing.yml +++ b/.rubocop_todo/style/missing_respond_to_missing.yml @@ -1,8 +1,5 @@ --- Style/MissingRespondToMissing: - # Offense count: 21 - # Temporarily disabled due to too many offenses - Enabled: false Exclude: - 'app/controllers/projects/application_controller.rb' - 'app/models/network/commit.rb' diff --git a/.rubocop_todo/style/next.yml b/.rubocop_todo/style/next.yml index ba2bd293696..4106cba955f 100644 --- a/.rubocop_todo/style/next.yml +++ b/.rubocop_todo/style/next.yml @@ -1,10 +1,8 @@ --- # Cop supports --auto-correct. Style/Next: - # Offense count: 41 - # Temporarily disabled due to too many offenses - Enabled: false Exclude: + - 'app/models/concerns/integrations/slack_mattermost_notifier.rb' - 'app/models/preloaders/environments/deployment_preloader.rb' - 'app/models/route.rb' - 'app/services/authorized_project_update/find_records_due_for_refresh_service.rb' @@ -16,6 +14,7 @@ Style/Next: - 'ee/app/services/elastic/cluster_reindexing_service.rb' - 'ee/app/services/gitlab_subscriptions/fetch_purchase_eligible_namespaces_service.rb' - 'ee/app/services/security/auto_fix_service.rb' + - 'ee/app/services/security/ingestion/tasks/update_vulnerability_uuids.rb' - 'ee/db/fixtures/development/20_vulnerabilities.rb' - 'ee/lib/ee/audit/protected_branches_changes_auditor.rb' - 'ee/lib/gitlab/elastic/search_results.rb' @@ -36,10 +35,9 @@ Style/Next: - 'lib/gitlab/metrics/samplers/base_sampler.rb' - 'lib/gitlab/pagination/keyset/in_operator_optimization/strategies/record_loader_strategy.rb' - 'lib/gitlab/reference_extractor.rb' - - 'lib/gitlab/tree_summary.rb' - 'lib/tasks/gitlab/assets.rake' - 'lib/tasks/gitlab/db/validate_config.rake' - - 'rubocop/cop/static_translation_definition.rb' - 'scripts/perf/query_limiting_report.rb' + - 'scripts/qa/quarantine-types-check' - 'spec/lib/gitlab/import_export/import_test_coverage_spec.rb' - 'spec/presenters/packages/npm/package_presenter_spec.rb' diff --git a/.rubocop_todo/style/percent_literal_delimiters.yml b/.rubocop_todo/style/percent_literal_delimiters.yml index 16ae8989c97..ae019079a8d 100644 --- a/.rubocop_todo/style/percent_literal_delimiters.yml +++ b/.rubocop_todo/style/percent_literal_delimiters.yml @@ -1,9 +1,6 @@ --- # Cop supports --auto-correct. Style/PercentLiteralDelimiters: - # Offense count: 3136 - # Temporarily disabled due to too many offenses - Enabled: false Exclude: - 'Guardfile' - 'app/controllers/abuse_reports_controller.rb' @@ -85,6 +82,7 @@ Style/PercentLiteralDelimiters: - 'app/models/concerns/clusters/agents/authorization_config_scopes.rb' - 'app/models/concerns/diff_positionable_note.rb' - 'app/models/concerns/enums/prometheus_metric.rb' + - 'app/models/concerns/integrations/base_data_fields.rb' - 'app/models/concerns/issuable.rb' - 'app/models/concerns/issue_available_features.rb' - 'app/models/concerns/mentionable/reference_regexes.rb' @@ -98,11 +96,11 @@ Style/PercentLiteralDelimiters: - 'app/models/diff_note.rb' - 'app/models/discussion_note.rb' - 'app/models/draft_note.rb' + - 'app/models/environment.rb' - 'app/models/event.rb' - 'app/models/instance_configuration.rb' - 'app/models/integrations/asana.rb' - 'app/models/integrations/assembla.rb' - - 'app/models/integrations/base_ci.rb' - 'app/models/integrations/base_issue_tracker.rb' - 'app/models/integrations/base_monitoring.rb' - 'app/models/integrations/base_slash_commands.rb' @@ -125,6 +123,7 @@ Style/PercentLiteralDelimiters: - 'app/models/issuable_severity.rb' - 'app/models/issue.rb' - 'app/models/lfs_download_object.rb' + - 'app/models/namespace.rb' - 'app/models/namespace/root_storage_statistics.rb' - 'app/models/note.rb' - 'app/models/notification_setting.rb' @@ -153,6 +152,7 @@ Style/PercentLiteralDelimiters: - 'app/services/feature_flags/base_service.rb' - 'app/services/files/multi_service.rb' - 'app/services/import/bitbucket_server_service.rb' + - 'app/services/import/fogbugz_service.rb' - 'app/services/import/github_service.rb' - 'app/services/import/gitlab_projects/file_acquisition_strategies/remote_file.rb' - 'app/services/import/gitlab_projects/file_acquisition_strategies/remote_file_s3.rb' @@ -172,13 +172,13 @@ Style/PercentLiteralDelimiters: - 'app/services/projects/update_service.rb' - 'app/services/prometheus/proxy_service.rb' - 'app/services/repositories/base_service.rb' - - 'app/services/repositories/destroy_service.rb' - '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/project_service.rb' - 'app/services/snippets/update_service.rb' + - 'app/services/todos/destroy/destroyed_issuable_service.rb' - 'app/services/todos/destroy/entity_leave_service.rb' - 'app/uploaders/design_management/design_v432x230_uploader.rb' - 'app/uploaders/gitlab_uploader.rb' @@ -194,6 +194,7 @@ Style/PercentLiteralDelimiters: - 'config/initializers/content_security_policy.rb' - 'config/initializers/countries.rb' - 'config/initializers/doorkeeper.rb' + - 'config/initializers/enumerator_next_patch.rb' - 'config/initializers/fog_core_patch.rb' - 'config/initializers/forbid_sidekiq_in_transactions.rb' - 'config/initializers/health_check.rb' @@ -234,6 +235,8 @@ Style/PercentLiteralDelimiters: - 'ee/app/controllers/ee/admin/application_settings_controller.rb' - 'ee/app/controllers/ee/projects/service_desk_controller.rb' - 'ee/app/controllers/ee/repositories/git_http_client_controller.rb' + - 'ee/app/controllers/groups/protected_environments_controller.rb' + - 'ee/app/controllers/projects/integrations/jira/issues_controller.rb' - 'ee/app/controllers/projects/protected_environments_controller.rb' - 'ee/app/controllers/trials_controller.rb' - 'ee/app/finders/iterations_finder.rb' @@ -241,6 +244,7 @@ Style/PercentLiteralDelimiters: - 'ee/app/helpers/credentials_inventory_helper.rb' - 'ee/app/helpers/ee/auth_helper.rb' - 'ee/app/helpers/ee/dashboard_helper.rb' + - 'ee/app/helpers/ee/integrations_helper.rb' - 'ee/app/helpers/ee/issues_helper.rb' - 'ee/app/helpers/ee/labels_helper.rb' - 'ee/app/helpers/ee/nav_helper.rb' @@ -264,12 +268,13 @@ Style/PercentLiteralDelimiters: - 'ee/app/models/geo/project_registry.rb' - 'ee/app/models/geo/secondary_usage_data.rb' - 'ee/app/models/geo_node_status.rb' - - 'ee/app/models/gitlab_subscription.rb' + - 'ee/app/models/incident_management/issuable_resource_link.rb' - 'ee/app/models/integrations/github.rb' - 'ee/app/models/integrations/gitlab_slack_application.rb' - 'ee/app/models/merge_requests/status_check_response.rb' - 'ee/app/models/saml_provider.rb' - 'ee/app/models/security/orchestration_policy_configuration.rb' + - 'ee/app/models/software_license_policy.rb' - 'ee/app/models/storage_shard.rb' - 'ee/app/services/approval_rules/create_service.rb' - 'ee/app/services/boards/epic_boards/update_service.rb' @@ -284,11 +289,13 @@ Style/PercentLiteralDelimiters: - 'ee/app/services/requirements_management/export_csv_service.rb' - 'ee/app/services/security/configuration/save_auto_fix_service.rb' - 'ee/app/services/security/dependency_list_service.rb' - - 'ee/lib/api/managed_licenses.rb' + - 'ee/app/services/security/ingestion/tasks/update_vulnerability_uuids.rb' + - 'ee/elastic/migrate/20220613120500_migrate_commits_to_separate_index.rb' - 'ee/lib/api/status_checks.rb' - 'ee/lib/api/visual_review_discussions.rb' - 'ee/lib/ee/api/helpers/members_helpers.rb' - 'ee/lib/ee/api/helpers/projects_helpers.rb' + - 'ee/lib/ee/api/members.rb' - 'ee/lib/ee/api/search.rb' - 'ee/lib/ee/audit/group_changes_auditor.rb' - 'ee/lib/ee/gitlab/alert_management/payload/generic.rb' @@ -320,6 +327,7 @@ Style/PercentLiteralDelimiters: - 'ee/spec/controllers/groups/scim_oauth_controller_spec.rb' - 'ee/spec/controllers/groups/sso_controller_spec.rb' - 'ee/spec/controllers/projects/issues_controller_spec.rb' + - 'ee/spec/controllers/projects/legacy_pipelines_controller_spec.rb' - 'ee/spec/controllers/projects/pipelines_controller_spec.rb' - 'ee/spec/controllers/projects/security/configuration_controller_spec.rb' - 'ee/spec/elastic_integration/global_search_spec.rb' @@ -349,6 +357,7 @@ Style/PercentLiteralDelimiters: - 'ee/spec/graphql/types/vulnerable_projects_by_grade_type_spec.rb' - 'ee/spec/helpers/ee/application_settings_helper_spec.rb' - 'ee/spec/helpers/ee/auth_helper_spec.rb' + - 'ee/spec/helpers/ee/environments_helper_spec.rb' - 'ee/spec/helpers/ee/geo_helper_spec.rb' - 'ee/spec/helpers/ee/labels_helper_spec.rb' - 'ee/spec/helpers/ee/security_orchestration_helper_spec.rb' @@ -359,6 +368,7 @@ Style/PercentLiteralDelimiters: - 'ee/spec/lib/banzai/filter/references/epic_reference_filter_spec.rb' - 'ee/spec/lib/banzai/filter/references/iteration_reference_filter_spec.rb' - 'ee/spec/lib/banzai/filter/references/vulnerability_reference_filters_spec.rb' + - 'ee/spec/lib/ee/backup/repositories_spec.rb' - 'ee/spec/lib/ee/gitlab/alert_management/payload/generic_spec.rb' - 'ee/spec/lib/ee/gitlab/auth/ldap/access_levels_spec.rb' - 'ee/spec/lib/ee/gitlab/auth/ldap/config_spec.rb' @@ -367,7 +377,6 @@ Style/PercentLiteralDelimiters: - 'ee/spec/lib/ee/gitlab/auth/ldap/sync/group_spec.rb' - 'ee/spec/lib/ee/gitlab/auth/ldap/sync/groups_spec.rb' - 'ee/spec/lib/ee/gitlab/ci/reports/security/reports_spec.rb' - - 'ee/spec/lib/ee/gitlab/elastic/helper_spec.rb' - 'ee/spec/lib/ee/gitlab/git_access_design_spec.rb' - 'ee/spec/lib/ee/gitlab/git_access_snippet_spec.rb' - 'ee/spec/lib/ee/gitlab/security/scan_configuration_spec.rb' @@ -380,6 +389,7 @@ Style/PercentLiteralDelimiters: - 'ee/spec/lib/gitlab/auth/group_saml/user_spec.rb' - 'ee/spec/lib/gitlab/auth/ldap/adapter_spec.rb' - 'ee/spec/lib/gitlab/auth/ldap/person_spec.rb' + - 'ee/spec/lib/gitlab/auth/saml/membership_updater_spec.rb' - 'ee/spec/lib/gitlab/auth/saml/user_spec.rb' - 'ee/spec/lib/gitlab/authority_analyzer_spec.rb' - 'ee/spec/lib/gitlab/cache_spec.rb' @@ -387,7 +397,7 @@ Style/PercentLiteralDelimiters: - 'ee/spec/lib/gitlab/ci/templates/Jobs/dast_default_branch_gitlab_ci_yaml_spec.rb' - 'ee/spec/lib/gitlab/ci/templates/dependency_scanning_gitlab_ci_yaml_spec.rb' - 'ee/spec/lib/gitlab/ci/templates/sast_gitlab_ci_yaml_spec.rb' - - 'ee/spec/lib/gitlab/ci/templates/sast_iac_latest_gitlab_ci_yaml_spec.rb' + - 'ee/spec/lib/gitlab/ci/templates/sast_iac_gitlab_ci_yaml_spec.rb' - 'ee/spec/lib/gitlab/ci/templates/sast_latest_gitlab_ci_yaml_spec.rb' - 'ee/spec/lib/gitlab/ci/templates/secret_detection_gitlab_ci_yaml_spec.rb' - 'ee/spec/lib/gitlab/ci/templates/secret_detection_latest_gitlab_ci_yaml_spec.rb' @@ -411,11 +421,11 @@ Style/PercentLiteralDelimiters: - 'ee/spec/models/concerns/ee/issuable_spec.rb' - 'ee/spec/models/concerns/ee/project_security_scanners_information_spec.rb' - 'ee/spec/models/ee/ci/job_artifact_spec.rb' + - 'ee/spec/models/ee/ci/runner_spec.rb' - 'ee/spec/models/ee/groups/feature_setting_spec.rb' - 'ee/spec/models/ee/integration_spec.rb' - 'ee/spec/models/ee/integrations/jira_spec.rb' - 'ee/spec/models/ee/personal_access_token_spec.rb' - - 'ee/spec/models/gitlab_subscription_spec.rb' - 'ee/spec/models/instance_security_dashboard_spec.rb' - 'ee/spec/models/issue_spec.rb' - 'ee/spec/models/project_feature_spec.rb' @@ -423,7 +433,6 @@ Style/PercentLiteralDelimiters: - 'ee/spec/models/push_rule_spec.rb' - 'ee/spec/models/repository_spec.rb' - 'ee/spec/models/saml_provider_spec.rb' - - 'ee/spec/models/security/orchestration_policy_configuration_spec.rb' - 'ee/spec/models/security/scan_spec.rb' - 'ee/spec/models/vulnerabilities/historical_statistic_spec.rb' - 'ee/spec/models/vulnerabilities/stat_diff_spec.rb' @@ -435,6 +444,7 @@ Style/PercentLiteralDelimiters: - 'ee/spec/requests/admin/user_permission_exports_controller_spec.rb' - 'ee/spec/requests/api/dependencies_spec.rb' - 'ee/spec/requests/api/epics_spec.rb' + - 'ee/spec/requests/api/geo_spec.rb' - 'ee/spec/requests/api/graphql/mutations/alert_management/http_integration/update_spec.rb' - 'ee/spec/requests/api/graphql/project/alert_management/http_integrations_spec.rb' - 'ee/spec/requests/api/internal/base_spec.rb' @@ -443,11 +453,13 @@ Style/PercentLiteralDelimiters: - 'ee/spec/requests/api/merge_requests_spec.rb' - 'ee/spec/requests/api/scim_spec.rb' - 'ee/spec/requests/api/wikis_spec.rb' + - 'ee/spec/requests/lfs_locks_api_spec.rb' - 'ee/spec/serializers/merge_request_widget_entity_spec.rb' - 'ee/spec/services/admin/email_service_spec.rb' - 'ee/spec/services/base_count_service_spec.rb' - 'ee/spec/services/ci/compare_security_reports_service_spec.rb' - 'ee/spec/services/ci/sync_reports_to_approval_rules_service_spec.rb' + - 'ee/spec/services/ee/auth/container_registry_authentication_service_spec.rb' - 'ee/spec/services/ee/groups/autocomplete_service_spec.rb' - 'ee/spec/services/ee/members/create_service_spec.rb' - 'ee/spec/services/ee/protected_branches/create_service_spec.rb' @@ -507,6 +519,7 @@ Style/PercentLiteralDelimiters: - 'lib/banzai/filter/table_of_contents_filter.rb' - 'lib/banzai/pipeline/base_pipeline.rb' - 'lib/banzai/pipeline/description_pipeline.rb' + - 'lib/banzai/pipeline/incident_management/timeline_event_pipeline.rb' - 'lib/bitbucket/page.rb' - 'lib/bitbucket/representation/issue.rb' - 'lib/container_registry/path.rb' @@ -520,6 +533,7 @@ Style/PercentLiteralDelimiters: - 'lib/gitlab/asciidoc/syntax_highlighter/html_pipeline_adapter.rb' - 'lib/gitlab/auth/ldap/adapter.rb' - 'lib/gitlab/auth/ldap/config.rb' + - 'lib/gitlab/background_migration/backfill_note_discussion_id.rb' - 'lib/gitlab/bare_repository_import/importer.rb' - 'lib/gitlab/ci/ansi2html.rb' - 'lib/gitlab/ci/config/entry/bridge.rb' @@ -547,7 +561,7 @@ Style/PercentLiteralDelimiters: - 'lib/gitlab/gitaly_client.rb' - 'lib/gitlab/gitaly_client/diff.rb' - 'lib/gitlab/gitaly_client/wiki_page.rb' - - 'lib/gitlab/graphql/pagination/keyset/order_info.rb' + - 'lib/gitlab/graphql/query_analyzers/ast/recursion_analyzer.rb' - 'lib/gitlab/hotlinking_detector.rb' - 'lib/gitlab/import_export/command_line_util.rb' - 'lib/gitlab/import_export/file_importer.rb' @@ -568,9 +582,10 @@ Style/PercentLiteralDelimiters: - 'lib/gitlab/metrics/transaction.rb' - 'lib/gitlab/metrics/web_transaction.rb' - 'lib/gitlab/middleware/read_only/controller.rb' - - 'lib/gitlab/process_supervisor.rb' - 'lib/gitlab/project_search_results.rb' - 'lib/gitlab/prometheus/query_variables.rb' + - 'lib/gitlab/query_limiting/transaction.rb' + - 'lib/gitlab/redis/multi_store.rb' - 'lib/gitlab/reference_extractor.rb' - 'lib/gitlab/regex.rb' - 'lib/gitlab/sanitizers/exception_message.rb' @@ -584,11 +599,14 @@ Style/PercentLiteralDelimiters: - 'lib/gitlab/task_helpers.rb' - 'lib/gitlab/uploads/migration_helper.rb' - 'lib/gitlab/url_blocker.rb' + - 'lib/gitlab/usage/metrics/instrumentations/count_imported_projects_total_metric.rb' - 'lib/gitlab/usage/metrics/instrumentations/database_metric.rb' + - 'lib/gitlab/usage/metrics/instrumentations/numbers_metric.rb' - 'lib/gitlab/usage_data.rb' - 'lib/gitlab/usage_data/topology.rb' - 'lib/gitlab/usage_data_counters/hll_redis_counter.rb' - 'lib/gitlab/utils/sanitize_node_link.rb' + - 'lib/gitlab/web_hooks/rate_limiter.rb' - 'lib/gitlab/workhorse.rb' - 'lib/grafana/validator.rb' - 'lib/omni_auth/strategies/jwt.rb' @@ -614,40 +632,37 @@ Style/PercentLiteralDelimiters: - 'qa/qa/ee/page/project/show.rb' - 'qa/qa/ee/page/project/snippet/index.rb' - 'qa/qa/ee/page/project/wiki/show.rb' - - 'qa/qa/git/repository.rb' - 'qa/qa/resource/events/project.rb' - - 'qa/qa/resource/members.rb' + - 'qa/qa/resource/personal_access_token_cache.rb' - 'qa/qa/resource/visibility.rb' - - 'qa/qa/runtime/browser.rb' - 'qa/qa/service/cluster_provider/gcloud.rb' - 'qa/qa/service/praefect_manager.rb' - 'qa/qa/specs/features/api/3_create/gitaly/praefect_repo_sync_spec.rb' - 'qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb' - 'qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/13_secure/enable_scanning_from_configuration_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/1_manage/group/group_saml_enforced_sso_new_account_spec.rb' + - 'qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/push_rules_spec.rb' - 'qa/spec/git/repository_spec.rb' - 'qa/spec/page/view_spec.rb' - - 'qa/spec/support/page_error_checker_spec.rb' + - 'rubocop/cop/migration/background_migrations.rb' - 'rubocop/cop/rspec/httparty_basic_auth.rb' - 'rubocop/migration_helpers.rb' + - 'scripts/qa/quarantine-types-check' - 'scripts/qa/testcases-check' - 'scripts/regenerate-schema' + - 'scripts/undercoverage' - 'sidekiq_cluster/cli.rb' - 'spec/benchmarks/banzai_benchmark.rb' - 'spec/commands/sidekiq_cluster/cli_spec.rb' + - 'spec/components/pajamas/component_spec.rb' - 'spec/config/mail_room_spec.rb' - - 'spec/controllers/admin/clusters_controller_spec.rb' - 'spec/controllers/concerns/continue_params_spec.rb' - 'spec/controllers/graphql_controller_spec.rb' - - 'spec/controllers/groups/clusters_controller_spec.rb' - 'spec/controllers/groups/releases_controller_spec.rb' - 'spec/controllers/jira_connect/app_descriptor_controller_spec.rb' - 'spec/controllers/oauth/applications_controller_spec.rb' - 'spec/controllers/profiles/two_factor_auths_controller_spec.rb' - 'spec/controllers/projects/artifacts_controller_spec.rb' - - 'spec/controllers/projects/clusters_controller_spec.rb' - 'spec/controllers/projects/deploy_keys_controller_spec.rb' - 'spec/controllers/projects/environments/prometheus_api_controller_spec.rb' - 'spec/controllers/projects/environments_controller_spec.rb' @@ -663,7 +678,6 @@ Style/PercentLiteralDelimiters: - 'spec/controllers/search_controller_spec.rb' - 'spec/controllers/snippets_controller_spec.rb' - 'spec/db/docs_spec.rb' - - 'spec/db/schema_spec.rb' - 'spec/experiments/ios_specific_templates_experiment_spec.rb' - 'spec/factories/ci/builds.rb' - 'spec/factories/ci/runners.rb' @@ -689,6 +703,8 @@ Style/PercentLiteralDelimiters: - 'spec/features/projects/integrations/user_activates_jira_spec.rb' - 'spec/features/projects/jobs_spec.rb' - 'spec/features/projects/labels/issues_sorted_by_priority_spec.rb' + - 'spec/features/projects/pipelines/legacy_pipeline_spec.rb' + - 'spec/features/projects/pipelines/legacy_pipelines_spec.rb' - 'spec/features/projects/pipelines/pipeline_spec.rb' - 'spec/features/projects/pipelines/pipelines_spec.rb' - 'spec/features/protected_branches_spec.rb' @@ -700,7 +716,6 @@ Style/PercentLiteralDelimiters: - 'spec/finders/ci/runners_finder_spec.rb' - 'spec/finders/environments/environments_finder_spec.rb' - 'spec/finders/groups_finder_spec.rb' - - 'spec/finders/issues_finder_spec.rb' - 'spec/finders/license_template_finder_spec.rb' - 'spec/finders/merge_requests_finder_spec.rb' - 'spec/finders/tags_finder_spec.rb' @@ -724,19 +739,24 @@ Style/PercentLiteralDelimiters: - 'spec/helpers/clusters_helper_spec.rb' - 'spec/helpers/diff_helper_spec.rb' - 'spec/helpers/emails_helper_spec.rb' + - 'spec/helpers/issuables_description_templates_helper_spec.rb' - 'spec/helpers/issues_helper_spec.rb' - 'spec/helpers/nav_helper_spec.rb' - 'spec/helpers/page_layout_helper_spec.rb' - 'spec/helpers/profiles_helper_spec.rb' - 'spec/helpers/releases_helper_spec.rb' + - 'spec/helpers/storage_helper_spec.rb' - 'spec/helpers/tracking_helper_spec.rb' - 'spec/initializers/direct_upload_support_spec.rb' + - 'spec/initializers/enumerator_next_patch_spec.rb' - 'spec/initializers/rack_multipart_patch_spec.rb' - 'spec/lib/api/ci/helpers/runner_helpers_spec.rb' + - 'spec/lib/api/entities/user_spec.rb' - 'spec/lib/api/helpers/common_helpers_spec.rb' - 'spec/lib/atlassian/jira_connect/client_spec.rb' - 'spec/lib/backup/files_spec.rb' - 'spec/lib/backup/manager_spec.rb' + - 'spec/lib/backup/repositories_spec.rb' - 'spec/lib/banzai/filter/asset_proxy_filter_spec.rb' - 'spec/lib/banzai/filter/autolink_filter_spec.rb' - 'spec/lib/banzai/filter/broadcast_message_sanitization_filter_spec.rb' @@ -760,6 +780,7 @@ Style/PercentLiteralDelimiters: - 'spec/lib/banzai/pipeline/description_pipeline_spec.rb' - 'spec/lib/banzai/pipeline/full_pipeline_spec.rb' - 'spec/lib/banzai/pipeline/gfm_pipeline_spec.rb' + - 'spec/lib/banzai/pipeline/incident_management/timeline_event_pipeline_spec.rb' - 'spec/lib/banzai/pipeline/plain_markdown_pipeline_spec.rb' - 'spec/lib/banzai/reference_parser/base_parser_spec.rb' - 'spec/lib/banzai/reference_parser/commit_parser_spec.rb' @@ -777,6 +798,8 @@ Style/PercentLiteralDelimiters: - 'spec/lib/gitlab/auth/o_auth/user_spec.rb' - 'spec/lib/gitlab/auth/saml/auth_hash_spec.rb' - 'spec/lib/gitlab/auth/saml/user_spec.rb' + - 'spec/lib/gitlab/background_migration/batched_migration_job_spec.rb' + - 'spec/lib/gitlab/background_migration/copy_column_using_background_migration_job_spec.rb' - 'spec/lib/gitlab/bare_repository_import/importer_spec.rb' - 'spec/lib/gitlab/batch_worker_context_spec.rb' - 'spec/lib/gitlab/bitbucket_import/importer_spec.rb' @@ -784,6 +807,7 @@ Style/PercentLiteralDelimiters: - 'spec/lib/gitlab/ci/ansi2html_spec.rb' - 'spec/lib/gitlab/ci/config/entry/bridge_spec.rb' - 'spec/lib/gitlab/ci/config/entry/commands_spec.rb' + - 'spec/lib/gitlab/ci/config/entry/environment_spec.rb' - 'spec/lib/gitlab/ci/config/entry/image_spec.rb' - 'spec/lib/gitlab/ci/config/entry/root_spec.rb' - 'spec/lib/gitlab/ci/config/entry/service_spec.rb' @@ -793,6 +817,7 @@ Style/PercentLiteralDelimiters: - 'spec/lib/gitlab/ci/pipeline/chain/template_usage_spec.rb' - 'spec/lib/gitlab/ci/pipeline/expression/lexeme/equals_spec.rb' - 'spec/lib/gitlab/ci/pipeline/seed/build_spec.rb' + - 'spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb' - 'spec/lib/gitlab/ci/reports/accessibility_reports_comparer_spec.rb' - 'spec/lib/gitlab/ci/reports/accessibility_reports_spec.rb' - 'spec/lib/gitlab/ci/reports/security/reports_spec.rb' @@ -801,6 +826,7 @@ Style/PercentLiteralDelimiters: - 'spec/lib/gitlab/ci/status/stage/factory_spec.rb' - 'spec/lib/gitlab/ci/templates/5_minute_production_app_ci_yaml_spec.rb' - 'spec/lib/gitlab/ci/templates/Jobs/deploy_gitlab_ci_yaml_spec.rb' + - 'spec/lib/gitlab/ci/templates/Jobs/sast_iac_latest_gitlab_ci_yaml_spec.rb' - 'spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb' - 'spec/lib/gitlab/ci/variables/collection/item_spec.rb' - 'spec/lib/gitlab/ci/yaml_processor/dag_spec.rb' @@ -844,7 +870,6 @@ Style/PercentLiteralDelimiters: - 'spec/lib/gitlab/favicon_spec.rb' - 'spec/lib/gitlab/feature_categories_spec.rb' - 'spec/lib/gitlab/file_detector_spec.rb' - - 'spec/lib/gitlab/form_builders/gitlab_ui_form_builder_spec.rb' - 'spec/lib/gitlab/gfm/reference_rewriter_spec.rb' - 'spec/lib/gitlab/git/merge_base_spec.rb' - 'spec/lib/gitlab/git/repository_spec.rb' @@ -887,6 +912,7 @@ Style/PercentLiteralDelimiters: - 'spec/lib/gitlab/middleware/go_spec.rb' - 'spec/lib/gitlab/middleware/multipart_spec.rb' - 'spec/lib/gitlab/omniauth_initializer_spec.rb' + - 'spec/lib/gitlab/pagination/keyset/order_spec.rb' - 'spec/lib/gitlab/pagination/offset_header_builder_spec.rb' - 'spec/lib/gitlab/path_regex_spec.rb' - 'spec/lib/gitlab/popen_spec.rb' @@ -939,6 +965,8 @@ Style/PercentLiteralDelimiters: - 'spec/lib/system_check/orphans/repository_check_spec.rb' - 'spec/lib/system_check/sidekiq_check_spec.rb' - 'spec/lib/tasks/gitlab/metrics_exporter_task_spec.rb' + - 'spec/lib/unnested_in_filters/dsl_spec.rb' + - 'spec/lib/unnested_in_filters/rewriter_spec.rb' - 'spec/metrics_server/metrics_server_spec.rb' - 'spec/migrations/add_new_trail_plans_spec.rb' - 'spec/migrations/change_web_hook_events_default_spec.rb' @@ -984,7 +1012,6 @@ Style/PercentLiteralDelimiters: - 'spec/models/issue_spec.rb' - 'spec/models/members/member_task_spec.rb' - 'spec/models/merge_request_diff_spec.rb' - - 'spec/models/namespace_spec.rb' - 'spec/models/namespace_statistics_spec.rb' - 'spec/models/packages/package_spec.rb' - 'spec/models/packages/tag_spec.rb' @@ -1020,6 +1047,8 @@ Style/PercentLiteralDelimiters: - 'spec/requests/api/ci/triggers_spec.rb' - 'spec/requests/api/container_repositories_spec.rb' - 'spec/requests/api/deployments_spec.rb' + - 'spec/requests/api/geo_spec.rb' + - 'spec/requests/api/graphql/ci/manual_variables_spec.rb' - 'spec/requests/api/graphql/gitlab_schema_spec.rb' - 'spec/requests/api/graphql/group/container_repositories_spec.rb' - 'spec/requests/api/graphql/group/milestones_spec.rb' @@ -1045,6 +1074,7 @@ Style/PercentLiteralDelimiters: - 'spec/requests/api/issues/put_projects_issues_spec.rb' - 'spec/requests/api/members_spec.rb' - 'spec/requests/api/merge_requests_spec.rb' + - 'spec/requests/api/metadata_spec.rb' - 'spec/requests/api/project_container_repositories_spec.rb' - 'spec/requests/api/project_templates_spec.rb' - 'spec/requests/api/projects_spec.rb' @@ -1063,6 +1093,7 @@ Style/PercentLiteralDelimiters: - 'spec/requests/lfs_locks_api_spec.rb' - 'spec/requests/users_controller_spec.rb' - 'spec/routing/uploads_routing_spec.rb' + - 'spec/rubocop/cop/migration/migration_record_spec.rb' - 'spec/rubocop/cop/migration/prevent_index_creation_spec.rb' - 'spec/rubocop/cop/migration/sidekiq_queue_migrate_spec.rb' - 'spec/rubocop/cop/performance/readlines_each_spec.rb' @@ -1143,6 +1174,7 @@ Style/PercentLiteralDelimiters: - 'spec/support/shared_examples/features/wiki/user_creates_wiki_page_shared_examples.rb' - 'spec/support/shared_examples/features/wiki/user_updates_wiki_page_shared_examples.rb' - 'spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb' + - 'spec/support/shared_examples/finders/issues_finder_shared_examples.rb' - 'spec/support/shared_examples/lib/banzai/filters/sanitization_filter_shared_examples.rb' - 'spec/support/shared_examples/lib/gitlab/middleware/multipart_shared_examples.rb' - 'spec/support/shared_examples/metrics/transaction_metrics_with_labels_shared_examples.rb' @@ -1165,6 +1197,7 @@ Style/PercentLiteralDelimiters: - 'spec/tasks/gitlab/db_rake_spec.rb' - 'spec/tasks/gitlab/task_helpers_spec.rb' - 'spec/tasks/gitlab/uploads/migrate_rake_spec.rb' + - 'spec/tooling/danger/customer_success_spec.rb' - 'spec/tooling/danger/datateam_spec.rb' - 'spec/tooling/danger/sidekiq_queues_spec.rb' - 'spec/tooling/lib/tooling/test_map_generator_spec.rb' @@ -1186,7 +1219,6 @@ Style/PercentLiteralDelimiters: - 'spec/uploaders/pages/deployment_uploader_spec.rb' - 'spec/uploaders/personal_file_uploader_spec.rb' - 'spec/validators/any_field_validator_spec.rb' - - 'spec/views/layouts/_flash.html.haml_spec.rb' - 'spec/views/layouts/_head.html.haml_spec.rb' - 'spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb' - 'spec/views/projects/commit/branches.html.haml_spec.rb' diff --git a/.rubocop_todo/style/redundant_interpolation.yml b/.rubocop_todo/style/redundant_interpolation.yml index 0d3651eb7b2..3747312f2c4 100644 --- a/.rubocop_todo/style/redundant_interpolation.yml +++ b/.rubocop_todo/style/redundant_interpolation.yml @@ -1,9 +1,6 @@ --- # Cop supports --auto-correct. Style/RedundantInterpolation: - # Offense count: 285 - # Temporarily disabled due to too many offenses - Enabled: false Exclude: - 'app/components/diffs/stats_component.rb' - 'app/helpers/blob_helper.rb' @@ -13,7 +10,10 @@ Style/RedundantInterpolation: - 'app/helpers/environments_helper.rb' - 'app/helpers/icons_helper.rb' - 'app/helpers/issuables_helper.rb' + - 'app/helpers/nav_helper.rb' + - 'app/helpers/projects_helper.rb' - 'app/helpers/search_helper.rb' + - 'app/helpers/tooling/visual_review_helper.rb' - 'app/models/concerns/issuable.rb' - 'app/models/integrations/base_chat_notification.rb' - 'app/models/integrations/hangouts_chat.rb' @@ -24,6 +24,7 @@ Style/RedundantInterpolation: - 'app/services/users/approve_service.rb' - 'app/services/users/banned_user_base_service.rb' - 'app/services/users/reject_service.rb' + - 'db/post_migrate/20220420214703_schedule_backfill_draft_status_on_merge_requests_corrected_regex.rb' - 'ee/app/graphql/types/compliance_management/merge_requests/compliance_violation_reason_enum.rb' - 'ee/app/graphql/types/incident_management/oncall_rotation_length_unit_enum.rb' - 'ee/app/helpers/ee/ci/runners_helper.rb' @@ -31,23 +32,29 @@ Style/RedundantInterpolation: - 'ee/app/services/geo/event_store.rb' - 'ee/app/services/geo/repository_updated_service.rb' - 'ee/app/services/security/security_orchestration_policies/create_pipeline_service.rb' + - 'ee/app/services/users/abuse/excessive_projects_download_ban_service.rb' + - 'ee/app/services/users/abuse/git_abuse/namespace_throttle_service.rb' - 'ee/db/fixtures/development/31_devops_adoption.rb' + - 'ee/lib/gitlab/insights/serializers/chartjs/base_serializer.rb' - 'ee/spec/features/epics/epic_issues_spec.rb' - 'ee/spec/features/projects/requirements_management/requirements_list_spec.rb' - 'ee/spec/features/registrations/one_trust_spec.rb' - 'ee/spec/graphql/ee/mutations/boards/lists/create_spec.rb' - 'ee/spec/lib/banzai/filter/issuable_reference_expansion_filter_spec.rb' - 'ee/spec/lib/banzai/filter/references/iteration_reference_filter_spec.rb' - - 'ee/spec/lib/ee/audit/protected_branches_changes_auditor_spec.rb' - 'ee/spec/lib/ee/gitlab/import_export/group/tree_saver_spec.rb' + - 'ee/spec/lib/gitlab/insights/serializers/chartjs/line_serializer_spec.rb' + - 'ee/spec/lib/gitlab/insights/serializers/chartjs/multi_series_serializer_spec.rb' - 'ee/spec/mailers/ci_minutes_usage_mailer_spec.rb' - 'ee/spec/mailers/emails/namespace_storage_usage_mailer_spec.rb' - 'ee/spec/mailers/notify_spec.rb' - 'ee/spec/models/incident_management/issuable_escalation_status_spec.rb' - 'ee/spec/requests/api/issues_spec.rb' - 'ee/spec/requests/api/search_spec.rb' + - 'ee/spec/services/analytics/cycle_analytics/consistency_check_service_spec.rb' - 'ee/spec/services/search_service_spec.rb' - 'ee/spec/services/timebox_report_service_spec.rb' + - 'ee/spec/support/shared_contexts/lib/gitlab/insights/serializers/serializers_shared_context.rb' - 'ee/spec/support/shared_examples/lib/gitlab/elastic/standalone_indices_shared_examples.rb' - 'ee/spec/tasks/gitlab/elastic_rake_spec.rb' - 'lib/backup/manager.rb' @@ -72,15 +79,19 @@ Style/RedundantInterpolation: - 'lib/gitlab/utils.rb' - 'lib/kramdown/converter/commonmark.rb' - 'lib/tasks/gettext.rake' + - 'lib/tasks/gitlab/seed/group_seed.rake' + - 'qa/qa/ee/page/component/secure_report.rb' - 'qa/qa/ee/page/merge_request/new.rb' - 'qa/qa/ee/page/project/issue/show.rb' + - 'qa/qa/ee/page/project/secure/vulnerability_details.rb' - 'qa/qa/resource/events/base.rb' - 'qa/qa/service/praefect_manager.rb' - 'qa/qa/specs/features/browser_ui/4_verify/pipeline/include_multiple_files_from_a_project_spec.rb' - 'qa/qa/specs/features/browser_ui/5_package/container_registry/container_registry_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/1_manage/project/project_templates_spec.rb' + - 'qa/qa/specs/features/ee/browser_ui/13_secure/scan_result_policy_vulnerabilities_spec.rb' + - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/project_templates_spec.rb' + - 'qa/qa/specs/features/ee/browser_ui/4_verify/parent_child_pipelines_dependent_relationship_spec.rb' - 'qa/qa/tools/generate_perf_testdata.rb' - - 'scripts/changed-feature-flags' - 'scripts/perf/gc/print_gc_stats.rb' - 'scripts/qa/testcases-check' - 'spec/controllers/admin/integrations_controller_spec.rb' @@ -93,6 +104,7 @@ Style/RedundantInterpolation: - 'spec/features/projects/jobs/user_browses_jobs_spec.rb' - 'spec/graphql/resolvers/container_repositories_resolver_spec.rb' - 'spec/helpers/environments_helper_spec.rb' + - 'spec/helpers/snippets_helper_spec.rb' - 'spec/lib/api/helpers/packages/dependency_proxy_helpers_spec.rb' - 'spec/lib/api/validations/validators/git_ref_spec.rb' - 'spec/lib/api/validations/validators/limit_spec.rb' @@ -116,7 +128,9 @@ Style/RedundantInterpolation: - 'spec/lib/gitlab/database/batch_count_spec.rb' - 'spec/lib/gitlab/database/load_balancing/connection_proxy_spec.rb' - 'spec/lib/gitlab/import_export/group/tree_saver_spec.rb' + - 'spec/lib/gitlab/inactive_projects_deletion_warning_tracker_spec.rb' - 'spec/lib/gitlab/metrics/dashboard/url_spec.rb' + - 'spec/lib/gitlab/redis/multi_store_spec.rb' - 'spec/lib/grafana/client_spec.rb' - 'spec/mailers/notify_spec.rb' - 'spec/migrations/20220107064845_populate_vulnerability_reads_spec.rb' @@ -134,7 +148,6 @@ Style/RedundantInterpolation: - 'spec/requests/api/terraform/state_spec.rb' - 'spec/requests/projects/google_cloud/deployments_controller_spec.rb' - 'spec/requests/projects/google_cloud/service_accounts_controller_spec.rb' - - 'spec/requests/projects/google_cloud_controller_spec.rb' - 'spec/routing/project_routing_spec.rb' - 'spec/services/clusters/kubernetes/create_or_update_service_account_service_spec.rb' - 'spec/services/groups/transfer_service_spec.rb' diff --git a/.rubocop_todo/style/redundant_regexp_escape.yml b/.rubocop_todo/style/redundant_regexp_escape.yml index cf502711f35..5c97275ee4b 100644 --- a/.rubocop_todo/style/redundant_regexp_escape.yml +++ b/.rubocop_todo/style/redundant_regexp_escape.yml @@ -1,9 +1,6 @@ --- # Cop supports --auto-correct. Style/RedundantRegexpEscape: - # Offense count: 325 - # Temporarily disabled due to too many offenses - Enabled: false Exclude: - 'app/controllers/help_controller.rb' - 'app/controllers/import/bitbucket_server_controller.rb' @@ -16,6 +13,7 @@ Style/RedundantRegexpEscape: - 'app/models/integrations/chat_message/base_message.rb' - 'app/models/integrations/datadog.rb' - 'app/models/integrations/teamcity.rb' + - 'app/models/issue.rb' - 'app/models/label.rb' - 'app/models/license_template.rb' - 'app/models/milestone.rb' @@ -25,6 +23,7 @@ Style/RedundantRegexpEscape: - 'app/models/snippet.rb' - 'app/services/metrics/dashboard/grafana_metric_embed_service.rb' - 'app/uploaders/file_uploader.rb' + - 'config/initializers/wikicloth_redos_patch.rb' - 'config/routes/project.rb' - 'config/routes/uploads.rb' - 'ee/app/models/ee/epic.rb' @@ -37,18 +36,20 @@ Style/RedundantRegexpEscape: - 'ee/spec/features/read_only_spec.rb' - 'ee/spec/helpers/vulnerabilities_helper_spec.rb' - 'ee/spec/lib/ee/gitlab/usage_data_counters/hll_redis_counter_spec.rb' + - 'ee/spec/mailers/ee/emails/admin_notification_spec.rb' + - 'ee/spec/mailers/ee/emails/profile_spec.rb' - 'ee/spec/mailers/notify_spec.rb' - 'ee/spec/models/release_highlight_spec.rb' - 'ee/spec/support/shared_examples/services/group_saml/saml_provider/base_service_shared_examples.rb' - 'lib/api/templates.rb' - 'lib/banzai/filter/autolink_filter.rb' - 'lib/banzai/filter/inline_diff_filter.rb' + - 'lib/banzai/filter/task_list_filter.rb' - 'lib/bulk_imports/common/pipelines/uploads_pipeline.rb' - 'lib/csv_builder.rb' - 'lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification.rb' - 'lib/gitlab/ci/pipeline/expression/lexeme/not_matches.rb' - 'lib/gitlab/ci/pipeline/expression/lexeme/pattern.rb' - - 'lib/gitlab/diff/parser.rb' - 'lib/gitlab/diff/suggestions_parser.rb' - 'lib/gitlab/email/handler/create_issue_handler.rb' - 'lib/gitlab/email/handler/create_merge_request_handler.rb' @@ -57,7 +58,8 @@ Style/RedundantRegexpEscape: - 'lib/gitlab/email/reply_parser.rb' - 'lib/gitlab/git/diff.rb' - 'lib/gitlab/git/repository.rb' - - 'lib/gitlab/gitaly_client/operation_service.rb' + - 'lib/gitlab/gitaly_client.rb' + - 'lib/gitlab/harbor/query.rb' - 'lib/gitlab/incoming_email.rb' - 'lib/gitlab/jira/dvcs.rb' - 'lib/gitlab/path_regex.rb' @@ -66,6 +68,7 @@ Style/RedundantRegexpEscape: - 'lib/gitlab/quick_actions/extractor.rb' - 'lib/gitlab/regex.rb' - 'lib/gitlab/search/abuse_detection.rb' + - 'lib/gitlab/service_desk_email.rb' - 'lib/gitlab/task_helpers.rb' - 'lib/gitlab/url_sanitizer.rb' - 'lib/gitlab/utils.rb' @@ -87,6 +90,7 @@ Style/RedundantRegexpEscape: - 'spec/helpers/tab_helper_spec.rb' - 'spec/lib/banzai/filter/references/reference_filter_spec.rb' - 'spec/lib/banzai/filter/syntax_highlight_filter_spec.rb' + - 'spec/lib/banzai/pipeline/incident_management/timeline_event_pipeline_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_work_item_type_id_for_issues_spec.rb' - 'spec/lib/gitlab/ci/config_spec.rb' - 'spec/lib/gitlab/ci/parsers/security/validators/schema_validator_spec.rb' @@ -96,6 +100,7 @@ Style/RedundantRegexpEscape: - 'spec/lib/gitlab/usage/metrics/name_suggestion_spec.rb' - 'spec/lib/gitlab/usage/metrics/names_suggestions/generator_spec.rb' - 'spec/lib/gitlab/usage_data_counters/hll_redis_counter_spec.rb' + - 'spec/mailers/emails/profile_spec.rb' - 'spec/models/release_highlight_spec.rb' - 'spec/requests/api/graphql/mutations/merge_requests/set_draft_spec.rb' - 'spec/requests/api/graphql_spec.rb' diff --git a/Gemfile b/Gemfile index 8edfab27b0a..e919908358d 100644 --- a/Gemfile +++ b/Gemfile @@ -418,10 +418,7 @@ end # Gems required in omnibus-gitlab pipeline group :development, :test, :omnibus do - # Using a fork until https://github.com/pivotal/LicenseFinder/pull/816 is - # resolved. For details, check discussion in - # https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74881 - gem 'gitlab-license_finder', '~> 6.0', require: false + gem 'license_finder', '~> 7.0', require: false end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 7e5e08e3ac1..ff6d1839de6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -531,13 +531,6 @@ GEM pg_query (~> 2.1) redis (> 3.0.0, < 5.0.0) gitlab-license (2.2.1) - gitlab-license_finder (6.14.2.1) - bundler - rubyzip (>= 1, < 3) - thor (~> 1.0) - tomlrb (>= 1.3, < 2.1) - with_env (= 1.1.0) - xml-simple (~> 1.1.5) gitlab-mail_room (0.0.9) gitlab-markup (1.8.0) gitlab-net-dns (0.9.1) @@ -765,6 +758,13 @@ GEM railties (>= 5.2) rexml libyajl2 (1.2.0) + license_finder (7.0.1) + bundler + rubyzip (>= 1, < 3) + thor (~> 1.2) + tomlrb (>= 1.3, < 2.1) + with_env (= 1.1.0) + xml-simple (~> 1.1.9) licensee (9.14.1) dotenv (~> 2.0) octokit (~> 4.17) @@ -1471,7 +1471,8 @@ GEM wisper (2.0.1) with_env (1.1.0) wmi-lite (1.0.5) - xml-simple (1.1.5) + xml-simple (1.1.9) + rexml xpath (3.2.0) nokogiri (~> 1.8) yajl-ruby (1.4.3) @@ -1576,7 +1577,6 @@ DEPENDENCIES gitlab-fog-azure-rm (~> 1.3.0) gitlab-labkit (~> 0.24.0) gitlab-license (~> 2.2.1) - gitlab-license_finder (~> 6.0) gitlab-mail_room (~> 0.0.9) gitlab-markup (~> 1.8.0) gitlab-net-dns (~> 0.9.1) @@ -1626,6 +1626,7 @@ DEPENDENCIES kubeclient (~> 4.9.2) lefthook (~> 1.0.0) letter_opener_web (~> 2.0.0) + license_finder (~> 7.0) licensee (~> 9.14.1) lockbox (~> 0.6.2) lograge (~> 0.5) diff --git a/app/assets/javascripts/boards/components/board_card_inner.vue b/app/assets/javascripts/boards/components/board_card_inner.vue index 45b53b13a7f..8dc521317cd 100644 --- a/app/assets/javascripts/boards/components/board_card_inner.vue +++ b/app/assets/javascripts/boards/components/board_card_inner.vue @@ -147,6 +147,9 @@ export default { showReferencePath() { return !this.isProjectBoard && this.itemReferencePath; }, + avatarSize() { + return { default: 16, lg: 24 }; + }, }, methods: { ...mapActions(['performSearch', 'setError']), @@ -359,17 +362,17 @@ export default { -
+
{{ __('Assignee') }} diff --git a/app/assets/javascripts/pipeline_editor/components/validate/ci_validate.vue b/app/assets/javascripts/pipeline_editor/components/validate/ci_validate.vue index 6ebf1ee4724..a4ef0befb91 100644 --- a/app/assets/javascripts/pipeline_editor/components/validate/ci_validate.vue +++ b/app/assets/javascripts/pipeline_editor/components/validate/ci_validate.vue @@ -150,7 +150,7 @@ export default { } = await this.$apollo.mutate({ mutation: lintCiMutation, variables: { - dry_run: true, + dry: true, content: this.yaml, endpoint: this.ciLintPath, }, diff --git a/app/assets/javascripts/repository/components/blob_content_viewer.vue b/app/assets/javascripts/repository/components/blob_content_viewer.vue index f6d370fb450..7999b916e0f 100644 --- a/app/assets/javascripts/repository/components/blob_content_viewer.vue +++ b/app/assets/javascripts/repository/components/blob_content_viewer.vue @@ -8,7 +8,7 @@ import createFlash from '~/flash'; import axios from '~/lib/utils/axios_utils'; import { isLoggedIn, handleLocationHash } from '~/lib/utils/common_utils'; import { __ } from '~/locale'; -import { redirectTo } from '~/lib/utils/url_utility'; +import { redirectTo, getLocationHash } from '~/lib/utils/url_utility'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import WebIdeLink from '~/vue_shared/components/web_ide_link.vue'; import CodeIntelligence from '~/code_navigation/components/app.vue'; @@ -63,6 +63,28 @@ export default { }; }, result() { + const urlHash = getLocationHash(); + const plain = this.$route?.query?.plain; + + // When the 'plain' URL param is present, its value determines which viewer to render: + // - when 0 and the rich viewer is available we render with it + // - otherwise we render the simple viewer + if (plain !== undefined) { + if (plain === '0' && this.hasRichViewer) { + this.switchViewer(RICH_BLOB_VIEWER); + } else { + this.switchViewer(SIMPLE_BLOB_VIEWER); + } + return; + } + + // If there is a code line hash in the URL we render with the simple viewer + if (urlHash && urlHash.startsWith('L')) { + this.switchViewer(SIMPLE_BLOB_VIEWER); + return; + } + + // By default, if present, use the rich viewer to render this.switchViewer(this.hasRichViewer ? RICH_BLOB_VIEWER : SIMPLE_BLOB_VIEWER); }, error() { @@ -173,6 +195,21 @@ export default { return this.blobInfo.storedExternally && this.blobInfo.externalStorage === LFS_STORAGE; }, }, + watch: { + // Watch the URL 'plain' query value to know if the viewer needs changing. + // This is the case when the user switches the viewer and then goes back + // through the hystory. + '$route.query.plain': { + handler(plainValue) { + this.switchViewer( + this.hasRichViewer && (plainValue === undefined || plainValue === '0') + ? RICH_BLOB_VIEWER + : SIMPLE_BLOB_VIEWER, + plainValue !== undefined, + ); + }, + }, + }, methods: { onError() { this.useFallback = true; @@ -223,6 +260,22 @@ export default { this.loadLegacyViewer(); } }, + updateRouteQuery() { + const plain = this.activeViewerType === SIMPLE_BLOB_VIEWER ? '1' : '0'; + + if (this.$route?.query?.plain === plain) { + return; + } + + this.$router.push({ + path: this.$route.path, + query: { ...this.$route.query, plain }, + }); + }, + handleViewerChanged(newViewer) { + this.switchViewer(newViewer); + this.updateRouteQuery(); + }, editBlob(target) { if (this.showForkSuggestion) { this.setForkTarget(target); @@ -254,7 +307,7 @@ export default { :has-render-error="hasRenderError" :show-path="false" :override-copy="glFeatures.highlightJs" - @viewer-changed="switchViewer" + @viewer-changed="handleViewerChanged" @copy="onCopy" >