From 9ee942633d8e20929118f43d17e96ae59da5d175 Mon Sep 17 00:00:00 2001 From: GitLab Housekeeping Bot Date: Mon, 28 Jul 2025 04:18:37 +0000 Subject: [PATCH] Fix 2 rubocop violations for InternalAffairs/RedundantExpectOffenseArgum Fixes the 2 violations for the rubocop rule `InternalAffairs/RedundantExpectOffenseArguments` that were previously excluded in `.rubocop_todo/internal_affairs/redundant_expect_offense_arguments.yml`. The exclusions have now been removed. This change was generated by [gitlab-housekeeper](https://gitlab.com/gitlab-org/gitlab/-/tree/master/gems/gitlab-housekeeper) in [CI](https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/jobs/10826130671) using the `Gitlab::Housekeeper::Keeps::RubocopFixer` keep. To provide feedback on your experience with `gitlab-housekeeper` please create an issue with the label ~"GitLab Housekeeper" and consider pinging the author of this keep. Changelog: other --- .../redundant_expect_offense_arguments.yml | 7 ------- spec/rubocop/cop/gitlab/namespaced_class_spec.rb | 2 +- spec/rubocop/cop/search/namespaced_class_spec.rb | 6 +++--- 3 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 .rubocop_todo/internal_affairs/redundant_expect_offense_arguments.yml diff --git a/.rubocop_todo/internal_affairs/redundant_expect_offense_arguments.yml b/.rubocop_todo/internal_affairs/redundant_expect_offense_arguments.yml deleted file mode 100644 index da278c1b13d2f8..00000000000000 --- a/.rubocop_todo/internal_affairs/redundant_expect_offense_arguments.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# Cop supports --autocorrect. -InternalAffairs/RedundantExpectOffenseArguments: - Details: grace period - Exclude: - - 'spec/rubocop/cop/gitlab/namespaced_class_spec.rb' - - 'spec/rubocop/cop/search/namespaced_class_spec.rb' diff --git a/spec/rubocop/cop/gitlab/namespaced_class_spec.rb b/spec/rubocop/cop/gitlab/namespaced_class_spec.rb index b3f85325d905b1..c732737ba689ed 100644 --- a/spec/rubocop/cop/gitlab/namespaced_class_spec.rb +++ b/spec/rubocop/cop/gitlab/namespaced_class_spec.rb @@ -96,7 +96,7 @@ class MyModule::MyClass < ApplicationRecord end it 'does not flag a truly compact namespaced class definition' do - expect_no_offenses(<<~RUBY, namespace: namespace) + expect_no_offenses(<<~RUBY) class %{namespace}::MyModule::MyClass < ApplicationRecord end RUBY diff --git a/spec/rubocop/cop/search/namespaced_class_spec.rb b/spec/rubocop/cop/search/namespaced_class_spec.rb index 6e10909389e223..12e250a574400c 100644 --- a/spec/rubocop/cop/search/namespaced_class_spec.rb +++ b/spec/rubocop/cop/search/namespaced_class_spec.rb @@ -61,7 +61,7 @@ def some_method context 'when Search root namespace is used' do it 'does not flag a class definition with Search as root namespace module' do - expect_no_offenses(<<~SOURCE, keyword: keyword) + expect_no_offenses(<<~SOURCE) module Search class %{keyword}::MyClass < ApplicationRecord def some_method @@ -73,7 +73,7 @@ def some_method end it 'does not a flag a class definition with Search as root namespace inline' do - expect_no_offenses(<<~SOURCE, keyword: keyword) + expect_no_offenses(<<~SOURCE) class Search::%{keyword}::MyClass < ApplicationRecord def some_method true @@ -83,7 +83,7 @@ def some_method end it 'does not a flag a class definition with Search as root namespace in EE' do - expect_no_offenses(<<~SOURCE, keyword: keyword) + expect_no_offenses(<<~SOURCE) module EE module Search class %{keyword}::MyClass < ApplicationRecord -- GitLab