Skip to content

Commit 19b2d73

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 539748d commit 19b2d73

File tree

91 files changed

+1664
-623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1664
-623
lines changed

.gitlab/ci/rules.gitlab-ci.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,8 @@
698698

699699
.rubocop-patterns: &rubocop-patterns
700700
- ".{rubocop,rubocop_todo}.yml"
701+
- "{,spec/}rubocop/cop/.rubocop.yml"
702+
- ".rubocop/*.yml"
701703
- ".rubocop_todo/**/*.yml"
702704
- "{,ee/,jh/}rubocop/**/*" # We might be changing custom cops
703705
- "{,ee/,jh/}Gemfile.lock" # This should include gitlab-styles, rubocop itself, and any plugins we might be using
@@ -3408,9 +3410,10 @@
34083410
##############################
34093411
.ai-gateway:rules:tagging:
34103412
rules:
3411-
- if: '$AIGW_PIPELINE_TRIGGER_TOKEN == null'
3413+
- if: '$AIGW_TAGGING_ACCESS_TOKEN == null'
34123414
when: never
3413-
- if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+-ee$/'
3415+
- if: '$CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+(-ee)?$/'
3416+
# Only run when a version tag is created (release is cut)
34143417

34153418
###################
34163419
# Benchmark rules #

.rubocop.yml

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ inherit_gem:
55
require:
66
- ./rubocop/rubocop
77
- rubocop-rspec
8+
# Always load these cop even if disabled by default so RuboCop knows about rules in TODOs.
9+
- rubocop/cop/internal_affairs
810

911
inherit_from:
1012
<% unless ENV['REVEAL_RUBOCOP_TODO'] == '1' %>
@@ -74,6 +76,10 @@ Rails/Pluck:
7476
# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/94047#note_1179689274
7577
AutoCorrect: false
7678

79+
# Disabled by default and enabled via `.rubocop/internal_affairs.yml`.
80+
InternalAffairs:
81+
Enabled: false
82+
7783
RSpec:
7884
Language:
7985
Includes:

.rubocop/internal_affairs.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
inherit_from:
3+
- '../.rubocop.yml'
4+
5+
InternalAffairs:
6+
Enabled: true
7+
8+
# This cop only checks for directives defined in `config/default.yml`
9+
# whic does not apply here.
10+
InternalAffairs/UndefinedConfig:
11+
Enabled: false

.rubocop_todo/graphql/descriptions.yml

-17
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,6 @@
22
# Cop supports --autocorrect.
33
Graphql/Descriptions:
44
Exclude:
5-
- 'app/graphql/types/namespace/package_settings_type.rb'
6-
- 'app/graphql/types/notes/noteable_interface.rb'
7-
- 'app/graphql/types/packages/cleanup/policy_type.rb'
8-
- 'app/graphql/types/packages/package_details_type.rb'
9-
- 'app/graphql/types/project_type.rb'
10-
- 'app/graphql/types/projects/branch_rule_type.rb'
11-
- 'app/graphql/types/release_links_type.rb'
12-
- 'app/graphql/types/repository/blob_type.rb'
13-
- 'app/graphql/types/snippet_type.rb'
14-
- 'app/graphql/types/terraform/state_version_type.rb'
15-
- 'app/graphql/types/todo_type.rb'
16-
- 'app/graphql/types/todoable_interface.rb'
17-
- 'app/graphql/types/user_interface.rb'
18-
- 'app/graphql/types/user_merge_request_interaction_type.rb'
19-
- 'ee/app/graphql/ee/types/branch_protections/base_access_level_type.rb'
20-
- 'ee/app/graphql/ee/types/branch_rules/branch_protection_type.rb'
21-
- 'ee/app/graphql/ee/types/issue_type.rb'
225
- 'ee/app/graphql/ee/types/projects/branch_rule_type.rb'
236
- 'ee/app/graphql/ee/types/user_merge_request_interaction_type.rb'
247
- 'ee/app/graphql/resolvers/epics_resolver.rb'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
# Cop supports --autocorrect.
3+
InternalAffairs/EmptyLineBetweenExpectOffenseAndCorrection:
4+
Details: grace period
5+
Exclude:
6+
- 'spec/rubocop/cop/rails/strong_params_spec.rb'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
# Cop supports --autocorrect.
3+
InternalAffairs/ExampleDescription:
4+
Details: grace period
5+
Exclude:
6+
- 'spec/rubocop/cop/capybara/testid_finders_spec.rb'
7+
- 'spec/rubocop/cop/database/avoid_using_pluck_without_limit_spec.rb'
8+
- 'spec/rubocop/cop/database/disable_referential_integrity_spec.rb'
9+
- 'spec/rubocop/cop/rails/migration_timestamp_spec.rb'
10+
- 'spec/rubocop/cop/rake/require_spec.rb'
11+
- 'spec/rubocop/cop/scalability/idempotent_worker_spec.rb'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
# Cop supports --autocorrect.
3+
InternalAffairs/ExampleHeredocDelimiter:
4+
Details: grace period
5+
Exclude:
6+
- 'spec/rubocop/cop/active_model_errors_direct_manipulation_spec.rb'
7+
- 'spec/rubocop/cop/active_record_association_reload_spec.rb'
8+
- 'spec/rubocop/cop/api/base_spec.rb'
9+
- 'spec/rubocop/cop/api/class_level_allow_access_with_scope_spec.rb'
10+
- 'spec/rubocop/cop/api/ensure_string_detail_spec.rb'
11+
- 'spec/rubocop/cop/api/grape_array_missing_coerce_spec.rb'
12+
- 'spec/rubocop/cop/avoid_becomes_spec.rb'
13+
- 'spec/rubocop/cop/avoid_route_redirect_leading_slash_spec.rb'
14+
- 'spec/rubocop/cop/ban_catch_throw_spec.rb'
15+
- 'spec/rubocop/cop/capybara/testid_finders_spec.rb'
16+
- 'spec/rubocop/cop/code_reuse/finder_spec.rb'
17+
- 'spec/rubocop/cop/code_reuse/presenter_spec.rb'
18+
- 'spec/rubocop/cop/code_reuse/serializer_spec.rb'
19+
- 'spec/rubocop/cop/code_reuse/service_class_spec.rb'
20+
- 'spec/rubocop/cop/code_reuse/worker_spec.rb'
21+
- 'spec/rubocop/cop/database/disable_referential_integrity_spec.rb'
22+
- 'spec/rubocop/cop/database/establish_connection_spec.rb'
23+
- 'spec/rubocop/cop/database/multiple_databases_spec.rb'
24+
- 'spec/rubocop/cop/database/rescue_query_canceled_spec.rb'
25+
- 'spec/rubocop/cop/database/rescue_statement_timeout_spec.rb'
26+
- 'spec/rubocop/cop/default_scope_spec.rb'
27+
- 'spec/rubocop/cop/destroy_all_spec.rb'
28+
- 'spec/rubocop/cop/feature_flag_usage_spec.rb'
29+
- 'spec/rubocop/cop/file_decompression_spec.rb'
30+
- 'spec/rubocop/cop/filename_length_spec.rb'
31+
- 'spec/rubocop/cop/gitlab/avoid_current_organization_spec.rb'
32+
- 'spec/rubocop/cop/gitlab/avoid_feature_category_not_owned_spec.rb'
33+
- 'spec/rubocop/cop/gitlab/avoid_gitlab_instance_checks_spec.rb'
34+
- 'spec/rubocop/cop/gitlab/avoid_uploaded_file_from_params_spec.rb'
35+
- 'spec/rubocop/cop/gitlab/bounded_contexts_spec.rb'
36+
- 'spec/rubocop/cop/gitlab/bulk_insert_spec.rb'
37+
- 'spec/rubocop/cop/gitlab/change_timezone_spec.rb'
38+
- 'spec/rubocop/cop/gitlab/const_get_inherit_false_spec.rb'
39+
- 'spec/rubocop/cop/gitlab/delegate_predicate_methods_spec.rb'
40+
- 'spec/rubocop/cop/gitlab/ee_only_class_spec.rb'
41+
- 'spec/rubocop/cop/gitlab/event_store_subscriber_spec.rb'
42+
- 'spec/rubocop/cop/gitlab/except_spec.rb'
43+
- 'spec/rubocop/cop/gitlab/feature_available_usage_spec.rb'
44+
- 'spec/rubocop/cop/gitlab/feature_flag_without_actor_spec.rb'
45+
- 'spec/rubocop/cop/gitlab/finder_with_find_by_spec.rb'
46+
- 'spec/rubocop/cop/gitlab/intersect_spec.rb'
47+
- 'spec/rubocop/cop/gitlab/license_available_usage_spec.rb'
48+
- 'spec/rubocop/cop/gitlab/namespaced_class_spec.rb'
49+
- 'spec/rubocop/cop/gitlab/no_find_in_workers_spec.rb'
50+
- 'spec/rubocop/cop/gitlab/policy_rule_boolean_spec.rb'
51+
- 'spec/rubocop/cop/gitlab/predicate_memoization_spec.rb'
52+
- 'spec/rubocop/cop/gitlab/rails_logger_spec.rb'
53+
- 'spec/rubocop/cop/gitlab/service_response_spec.rb'
54+
- 'spec/rubocop/cop/gitlab/token_without_prefix_spec.rb'
55+
- 'spec/rubocop/cop/gitlab/union_spec.rb'
56+
- 'spec/rubocop/cop/graphql/authorize_types_spec.rb'
57+
- 'spec/rubocop/cop/graphql/descriptions_spec.rb'
58+
- 'spec/rubocop/cop/graphql/enum_names_spec.rb'
59+
- 'spec/rubocop/cop/graphql/enum_values_spec.rb'
60+
- 'spec/rubocop/cop/graphql/graphql_name_position_spec.rb'
61+
- 'spec/rubocop/cop/graphql/id_type_spec.rb'
62+
- 'spec/rubocop/cop/graphql/resolver_type_spec.rb'
63+
- 'spec/rubocop/cop/group_public_or_visible_to_user_spec.rb'
64+
- 'spec/rubocop/cop/include_sidekiq_worker_spec.rb'
65+
- 'spec/rubocop/cop/inject_enterprise_edition_module_spec.rb'
66+
- 'spec/rubocop/cop/migration/add_index_spec.rb'
67+
- 'spec/rubocop/cop/migration/background_migration_record_spec.rb'
68+
- 'spec/rubocop/cop/migration/batch_migrations_post_only_spec.rb'
69+
- 'spec/rubocop/cop/migration/drop_table_spec.rb'
70+
- 'spec/rubocop/cop/migration/migration_record_spec.rb'
71+
- 'spec/rubocop/cop/migration/migration_with_milestone_spec.rb'
72+
- 'spec/rubocop/cop/migration/schema_addition_methods_no_post_spec.rb'
73+
- 'spec/rubocop/cop/performance/ar_count_each_spec.rb'
74+
- 'spec/rubocop/cop/performance/ar_exists_and_present_blank_spec.rb'
75+
- 'spec/rubocop/cop/performance/readlines_each_spec.rb'
76+
- 'spec/rubocop/cop/project_path_helper_spec.rb'
77+
- 'spec/rubocop/cop/put_group_routes_under_scope_spec.rb'
78+
- 'spec/rubocop/cop/put_project_routes_under_scope_spec.rb'
79+
- 'spec/rubocop/cop/rails/strong_params_spec.rb'
80+
- 'spec/rubocop/cop/redis_queue_usage_spec.rb'
81+
- 'spec/rubocop/cop/rspec/be_success_matcher_spec.rb'
82+
- 'spec/rubocop/cop/rspec/duplicate_spec_location_spec.rb'
83+
- 'spec/rubocop/cop/rspec/env_assignment_spec.rb'
84+
- 'spec/rubocop/cop/rspec/env_mocking_spec.rb'
85+
- 'spec/rubocop/cop/rspec/expect_gitlab_tracking_spec.rb'
86+
- 'spec/rubocop/cop/rspec/have_gitlab_http_status_spec.rb'
87+
- 'spec/rubocop/cop/rspec/httparty_basic_auth_spec.rb'
88+
- 'spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb'
89+
- 'spec/rubocop/cop/rspec/top_level_describe_path_spec.rb'
90+
- 'spec/rubocop/cop/safe_params_spec.rb'
91+
- 'spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb'
92+
- 'spec/rubocop/cop/scalability/cron_worker_context_spec.rb'
93+
- 'spec/rubocop/cop/scalability/file_uploads_spec.rb'
94+
- 'spec/rubocop/cop/scalability/idempotent_worker_spec.rb'
95+
- 'spec/rubocop/cop/search/avoid_checking_finished_on_deprecated_migrations_spec.rb'
96+
- 'spec/rubocop/cop/search/namespaced_class_spec.rb'
97+
- 'spec/rubocop/cop/sidekiq_api_usage_spec.rb'
98+
- 'spec/rubocop/cop/sidekiq_load_balancing/worker_data_consistency_spec.rb'
99+
- 'spec/rubocop/cop/sidekiq_options_queue_spec.rb'
100+
- 'spec/rubocop/cop/sidekiq_redis_call_spec.rb'
101+
- 'spec/rubocop/cop/usage_data/distinct_count_by_large_foreign_key_spec.rb'
102+
- 'spec/rubocop/cop/usage_data/histogram_with_large_table_spec.rb'
103+
- 'spec/rubocop/cop/usage_data/instrumentation_superclass_spec.rb'
104+
- 'spec/rubocop/cop/usage_data/large_table_spec.rb'
105+
- 'spec/rubocop/cop/user_admin_spec.rb'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
# Cop supports --autocorrect.
3+
InternalAffairs/LocationExpression:
4+
Details: grace period
5+
Exclude:
6+
- 'rubocop/cop/avoid_route_redirect_leading_slash.rb'
7+
- 'rubocop/cop/background_migration/avoid_silent_rescue_exceptions.rb'
8+
- 'rubocop/cop/experiments_test_coverage.rb'
9+
- 'rubocop/cop/gitlab/documentation_links/hardcoded_url.rb'
10+
- 'rubocop/cop/gitlab/documentation_links/link.rb'
11+
- 'rubocop/cop/gitlab/json.rb'
12+
- 'rubocop/cop/gitlab/mark_used_feature_flags.rb'
13+
- 'rubocop/cop/gitlab/no_code_coverage_comment.rb'
14+
- 'rubocop/cop/graphql/descriptions.rb'
15+
- 'rubocop/cop/inject_enterprise_edition_module.rb'
16+
- 'rubocop/cop/migration/update_column_in_batches.rb'
17+
- 'rubocop/cop/performance/ar_count_each.rb'
18+
- 'rubocop/cop/performance/ar_exists_and_present_blank.rb'
19+
- 'rubocop/cop/performance/readlines_each.rb'
20+
- 'rubocop/cop/rake/require.rb'
21+
- 'rubocop/cop/rspec/any_instance_of.rb'
22+
- 'rubocop/cop/rspec/be_success_matcher.rb'
23+
- 'rubocop/cop/rspec/duplicate_spec_location.rb'
24+
- 'rubocop/cop/rspec/env_assignment.rb'
25+
- 'rubocop/cop/rspec/env_mocking.rb'
26+
- 'rubocop/cop/rspec/modify_sidekiq_middleware.rb'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
# Cop supports --autocorrect.
3+
InternalAffairs/MethodNameEndWith:
4+
Details: grace period
5+
Exclude:
6+
- 'rubocop/cop/gitlab/predicate_memoization.rb'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# Cop supports --autocorrect.
3+
InternalAffairs/MethodNameEqual:
4+
Details: grace period
5+
Exclude:
6+
- 'rubocop/cop/avoid_break_from_strong_memoize.rb'
7+
- 'rubocop/cop/avoid_keyword_arguments_in_sidekiq_workers.rb'
8+
- 'rubocop/cop/experiments_test_coverage.rb'
9+
- 'rubocop/cop/gitlab/event_store_subscriber.rb'
10+
- 'rubocop/cop/gitlab/finder_with_find_by.rb'
11+
- 'rubocop/cop/gitlab/policy_rule_boolean.rb'
12+
- 'rubocop/cop/migration/add_concurrent_index.rb'
13+
- 'rubocop/cop/migration/remove_concurrent_index.rb'
14+
- 'rubocop/cop/migration/with_lock_retries_disallowed_method.rb'
15+
- 'rubocop/cop/migration/with_lock_retries_with_change.rb'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
InternalAffairs/NodeDestructuring:
3+
Details: grace period
4+
Exclude:
5+
- 'rubocop/cop/ban_catch_throw.rb'
6+
- 'rubocop/cop/gitlab/http_v2.rb'
7+
- 'rubocop/cop/gitlab/httparty.rb'
8+
- 'rubocop/cop/gitlab/mark_used_feature_flags.rb'
9+
- 'rubocop/cop/prefer_class_methods_over_module.rb'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
# Cop supports --autocorrect.
3+
InternalAffairs/NodeFirstOrLastArgument:
4+
Details: grace period
5+
Exclude:
6+
- 'rubocop/cop/gitlab/const_get_inherit_false.rb'
7+
- 'rubocop/cop/gitlab/documentation_links/link.rb'
8+
- 'rubocop/cop/include_sidekiq_worker.rb'
9+
- 'rubocop/cop/migration/change_column_null_on_high_traffic_table.rb'
10+
- 'rubocop/cop/migration/versioned_migration_class.rb'
11+
- 'rubocop/cop/scalability/cron_worker_context.rb'
12+
- 'rubocop/cop/sidekiq_options_queue.rb'

0 commit comments

Comments
 (0)