diff --git a/.rubocop.yml b/.rubocop.yml index 51e78b8..2e7866e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -120,12 +120,18 @@ Layout/LineContinuationSpacing: Enabled: true Layout/LineEndStringConcatenationIndentation: Enabled: true +Lint/AmbiguousOperatorPrecedence: + Enabled: true +Lint/NonAtomicFileOperation: + Enabled: true Style/EmptyHeredoc: Enabled: true Style/RedundantHeredocDelimiterQuotes: Enabled: true Style/RedundantStringEscape: Enabled: true +Style/ReturnNilInPredicateMethodDefinition: + Enabled: true # Enable pending rubocop-rspec cops. @@ -157,6 +163,8 @@ RSpec/PendingWithoutReason: Enabled: true RSpec/RedundantAround: Enabled: true +RSpec/ReceiveMessages: + Enabled: true RSpec/SkipBlockInsideExample: Enabled: true RSpec/SortMetadata: diff --git a/Gemfile b/Gemfile index 82daed9..8461924 100644 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,7 @@ gem 'rake' gem 'rspec', '~> 3.11' gem 'rubocop-performance', '~> 1.7' gem 'rubocop-rake', '~> 0.6' -gem 'rubocop-rspec', '~> 2.20.0' +gem 'rubocop-rspec', '~> 2.25.0' gem 'simplecov', '>= 0.19' gem 'yard' diff --git a/lib/rubocop/cop/capybara/click_link_or_button_style.rb b/lib/rubocop/cop/capybara/click_link_or_button_style.rb index 4bf679e..9fb96cf 100644 --- a/lib/rubocop/cop/capybara/click_link_or_button_style.rb +++ b/lib/rubocop/cop/capybara/click_link_or_button_style.rb @@ -50,8 +50,8 @@ def on_send(node) private def offense?(node) - style == :strict && !strict_method?(node) || - style == :link_or_button && !link_or_button_method?(node) + (style == :strict && !strict_method?(node)) || + (style == :link_or_button && !link_or_button_method?(node)) end def offense_message(node)