diff --git a/.rubocop.yml b/.rubocop.yml index 5757a273926546d38dbfc254b2a450faead16000..1b2e7ea470a100d623e50527f0bd23f60853aaa4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -666,6 +666,7 @@ Gitlab/NamespacedClass: - 'ee/elastic/**/*.rb' - 'scripts/**/*' - 'spec/migrations/**/*.rb' + - 'app/experiments/**/*_experiment.rb' Lint/HashCompareByIdentity: Enabled: true diff --git a/app/experiments/application_experiment.rb b/app/experiments/application_experiment.rb index ec6762096ad04ebe038f8c15c5d40026b1db3177..f6af7ca15bb3ef7a38e81b26d822d53799e3211a 100644 --- a/app/experiments/application_experiment.rb +++ b/app/experiments/application_experiment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class ApplicationExperiment < Gitlab::Experiment # rubocop:disable Gitlab/NamespacedClass +class ApplicationExperiment < Gitlab::Experiment def publish(_result = nil) super diff --git a/app/experiments/combined_registration_experiment.rb b/app/experiments/combined_registration_experiment.rb index 08c015838db4b2bc0cec719b6ceeaacf3b70f958..576e10815aaf86677a5dd6bcaa78ebe0188b7583 100644 --- a/app/experiments/combined_registration_experiment.rb +++ b/app/experiments/combined_registration_experiment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class CombinedRegistrationExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass +class CombinedRegistrationExperiment < ApplicationExperiment include Rails.application.routes.url_helpers def key_for(source, _ = nil) diff --git a/app/experiments/empty_repo_upload_experiment.rb b/app/experiments/empty_repo_upload_experiment.rb index d0d79a5fb453546c871145267e248640aeaad3d3..c8c75f32d69c581ccba4e8209be73e3079594c3c 100644 --- a/app/experiments/empty_repo_upload_experiment.rb +++ b/app/experiments/empty_repo_upload_experiment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class EmptyRepoUploadExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass +class EmptyRepoUploadExperiment < ApplicationExperiment include ProjectCommitCount TRACKING_START_DATE = DateTime.parse('2021/4/20') diff --git a/app/experiments/force_company_trial_experiment.rb b/app/experiments/force_company_trial_experiment.rb index 00bdd5d693dcb0e761ea39087fad59824be7e9a5..e7b98bb18ad04e43796a9f22e2c29494b2d5ada6 100644 --- a/app/experiments/force_company_trial_experiment.rb +++ b/app/experiments/force_company_trial_experiment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class ForceCompanyTrialExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass +class ForceCompanyTrialExperiment < ApplicationExperiment exclude :setup_for_personal private diff --git a/app/experiments/in_product_guidance_environments_webide_experiment.rb b/app/experiments/in_product_guidance_environments_webide_experiment.rb index d77063a98345cac54ce9bb1079ba2f19f8a0a37f..6567ec0b3f1d0d6b7043f0d45fc4b01e939d4d8f 100644 --- a/app/experiments/in_product_guidance_environments_webide_experiment.rb +++ b/app/experiments/in_product_guidance_environments_webide_experiment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class InProductGuidanceEnvironmentsWebideExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass +class InProductGuidanceEnvironmentsWebideExperiment < ApplicationExperiment exclude :has_environments? def control_behavior diff --git a/app/experiments/new_project_sast_enabled_experiment.rb b/app/experiments/new_project_sast_enabled_experiment.rb index a779b8ec6339652a8d3582ebed8ac8b48a5886e6..ee9d0dc170009119eed04a2799984f969563d1b2 100644 --- a/app/experiments/new_project_sast_enabled_experiment.rb +++ b/app/experiments/new_project_sast_enabled_experiment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class NewProjectSastEnabledExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass +class NewProjectSastEnabledExperiment < ApplicationExperiment def publish(_result = nil) super diff --git a/app/experiments/require_verification_for_namespace_creation_experiment.rb b/app/experiments/require_verification_for_namespace_creation_experiment.rb index 78390ddd0998b1ace1bd89c1b3eb9f5531b10d39..0c47f5d183c128a8bc86c3394950e18ee0d999a9 100644 --- a/app/experiments/require_verification_for_namespace_creation_experiment.rb +++ b/app/experiments/require_verification_for_namespace_creation_experiment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class RequireVerificationForNamespaceCreationExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass +class RequireVerificationForNamespaceCreationExperiment < ApplicationExperiment exclude :existing_user EXPERIMENT_START_DATE = Date.new(2022, 1, 31) diff --git a/app/experiments/security_reports_mr_widget_prompt_experiment.rb b/app/experiments/security_reports_mr_widget_prompt_experiment.rb index fa0ba8e24d41ce1ead4bbcee96e05aa1c3739b92..bcb9d64fcb745fb706b9f5d045a6c8c63511943e 100644 --- a/app/experiments/security_reports_mr_widget_prompt_experiment.rb +++ b/app/experiments/security_reports_mr_widget_prompt_experiment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class SecurityReportsMrWidgetPromptExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass +class SecurityReportsMrWidgetPromptExperiment < ApplicationExperiment def publish(_result = nil) super