From bed6313d8999d2485cda3c5a48e88c9271c06384 Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Fri, 16 Mar 2018 09:46:35 -0700 Subject: [PATCH] rubocop update --- .rubocop.yml | 11 ++++++++++- lib/capybara/selector/filter_set.rb | 2 +- lib/capybara/selector/selector.rb | 2 +- lib/capybara/selenium/node.rb | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index c1ff8c7d..4ec0eb00 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -48,13 +48,22 @@ Lint/HandleExceptions: Lint/Loop: Enabled: false -Lint/EndAlignment: +Layout/EndAlignment: EnforcedStyleAlignWith: variable Naming/PredicateName: Exclude: - '**/*/*matchers.rb' +Naming/UncommunicativeMethodParamName: + AllowedNames: + - 'el' + - 'id' + - 'c' + - 'x' + - 'y' + - 'on' + Style/RescueStandardError: Enabled: false diff --git a/lib/capybara/selector/filter_set.rb b/lib/capybara/selector/filter_set.rb index 7fb48e08..a8176554 100644 --- a/lib/capybara/selector/filter_set.rb +++ b/lib/capybara/selector/filter_set.rb @@ -46,7 +46,7 @@ module Capybara class << self def all - @filter_sets ||= {} + @filter_sets ||= {} # rubocop:disable Naming/MemoizedInstanceVariableName end def add(name, &block) diff --git a/lib/capybara/selector/selector.rb b/lib/capybara/selector/selector.rb index 85cd89e0..1c44e8e9 100644 --- a/lib/capybara/selector/selector.rb +++ b/lib/capybara/selector/selector.rb @@ -25,7 +25,7 @@ module Capybara class << self def all - @selectors ||= {} + @selectors ||= {} # rubocop:disable Naming/MemoizedInstanceVariableName end def add(name, &block) diff --git a/lib/capybara/selenium/node.rb b/lib/capybara/selenium/node.rb index a3b54038..eb94ad04 100644 --- a/lib/capybara/selenium/node.rb +++ b/lib/capybara/selenium/node.rb @@ -219,7 +219,7 @@ private find_xpath(XPath.ancestor(:select)[1]).first end - def set_text(value, clear: nil, **) + def set_text(value, clear: nil, **_unused) if value.to_s.empty? && clear.nil? native.clear elsif clear == :backspace