From 255f58ef297248a1e26f21ee086f6276973c4757 Mon Sep 17 00:00:00 2001 From: ydah Date: Wed, 12 Feb 2025 16:42:37 +0900 Subject: [PATCH 1/2] Disable InternalAffairs/OnSendWithoutOnCSend cop in RuboCop configuration --- .rubocop.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index 18bf3ec..143718a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -16,6 +16,9 @@ AllCops: - 'tmp/**/*' - 'spec/smoke_tests/**/*.rb' +InternalAffairs/OnSendWithoutOnCSend: + Enabled: false + Layout/HashAlignment: EnforcedHashRocketStyle: - key From 776605cfe03014bd3bd33ab71d67c6bd6b8f7cff Mon Sep 17 00:00:00 2001 From: ydah Date: Wed, 12 Feb 2025 16:43:57 +0900 Subject: [PATCH 2/2] Fix some rubocop offenses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` ❯ bundle exec rubocop Inspecting 35 files ..............C.................... Offenses: lib/rubocop/rspec_rails/description_extractor.rb:60:11: C: [Correctable] Style/MultipleComparison: Avoid comparing a variable with multiple items in a conditional, use Array#include? instead. yardoc.superclass.path == RSPEC_RAILS_COP_CLASS_NAME || ... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lib/rubocop/rspec_rails/description_extractor.rb:60:39: C: [Correctable] Layout/TrailingWhitespace: Trailing whitespace detected. yardoc.superclass.path == RSPEC_RAILS_COP_CLASS_NAME || ^ lib/rubocop/rspec_rails/description_extractor.rb:61:15: C: [Correctable] Layout/LineLength: Line is too long. [95/80] yardoc.superclass.path == RUBOCOP_COP_CLASS_NAME ^^^^^^^^^^^^^^^ lib/rubocop/rspec_rails/description_extractor.rb:60:41: C: [Correctable] Layout/ArrayAlignment: Align the elements of an array literal if they span more than one line. yardoc.superclass.path == RSPEC_RAILS_COP_CLASS_NAME || ^^^^^^^^^^^^^^^^^^^^^^ 35 files inspected, 4 offenses detected, 4 offenses autocorrectable ``` --- lib/rubocop/rspec_rails/description_extractor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rubocop/rspec_rails/description_extractor.rb b/lib/rubocop/rspec_rails/description_extractor.rb index c524694..b1bd4bf 100644 --- a/lib/rubocop/rspec_rails/description_extractor.rb +++ b/lib/rubocop/rspec_rails/description_extractor.rb @@ -57,8 +57,8 @@ def documented_constant end def cop_subclass? - yardoc.superclass.path == RSPEC_RAILS_COP_CLASS_NAME || - yardoc.superclass.path == RUBOCOP_COP_CLASS_NAME + [RSPEC_RAILS_COP_CLASS_NAME, + RUBOCOP_COP_CLASS_NAME].include?(yardoc.superclass.path) end def abstract?