rubocop: Remove redundant Style/InverseMethods disables

This commit is contained in:
Issy Long 2023-04-07 21:35:38 +01:00
parent 11b2f8d956
commit 0c2e6e59c5
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4
3 changed files with 3 additions and 4 deletions

View File

@ -124,7 +124,7 @@ module RuboCop
end
def check_on_system_block_content(component_precedence_list, on_system_block)
if on_system_block.body.block_type? && !on_system_methods.include?(on_system_block.body.method_name) # rubocop:disable Style/InverseMethods (false positive)
if on_system_block.body.block_type? && !on_system_methods.include?(on_system_block.body.method_name)
offending_node(on_system_block)
problem "Nest `#{on_system_block.method_name}` blocks inside `#{on_system_block.body.method_name}` " \
"blocks when there is only one inner block." do |corrector|

View File

@ -53,8 +53,7 @@ module RuboCop
desc_problem "Description shouldn't start with an article." if regex_match_group(desc, /^(the|an?)(?=\s)/i)
# Check if invalid lowercase words are at the start of a desc.
if !VALID_LOWERCASE_WORDS.include?(string_content(desc).split.first) && # rubocop:disable Style/InverseMethods (false positive)
regex_match_group(desc, /^[a-z]/)
if !VALID_LOWERCASE_WORDS.include?(string_content(desc).split.first) && regex_match_group(desc, /^[a-z]/)
desc_problem "Description should start with a capital letter."
end

View File

@ -7,7 +7,7 @@ homebrew_bootsnap_enabled = ENV["HOMEBREW_NO_BOOTSNAP"].nil? && !ENV["HOMEBREW_B
# portable ruby doesn't play nice with bootsnap
homebrew_bootsnap_enabled &&= !RUBY_PATH.to_s.include?("/vendor/portable-ruby/") # rubocop:disable Style/InverseMethods
homebrew_bootsnap_enabled &&= !RUBY_PATH.to_s.include?("/vendor/portable-ruby/")
homebrew_bootsnap_enabled &&= if ENV["HOMEBREW_MACOS_VERSION"]
# Apple Silicon doesn't play nice with bootsnap