Skip to content

Commit 776605c

Browse files
committed
Fix some rubocop offenses
``` ❯ 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 ```
1 parent 255f58e commit 776605c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rubocop/rspec_rails/description_extractor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def documented_constant
5757
end
5858

5959
def cop_subclass?
60-
yardoc.superclass.path == RSPEC_RAILS_COP_CLASS_NAME ||
61-
yardoc.superclass.path == RUBOCOP_COP_CLASS_NAME
60+
[RSPEC_RAILS_COP_CLASS_NAME,
61+
RUBOCOP_COP_CLASS_NAME].include?(yardoc.superclass.path)
6262
end
6363

6464
def abstract?

0 commit comments

Comments
 (0)