Fix RuboCop 0.77.0 failures.

This commit is contained in:
Mike McQuaid 2019-11-28 15:10:50 +00:00
parent 35bad17e1e
commit 766fc4b301
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
9 changed files with 16 additions and 16 deletions

View File

@ -13,12 +13,12 @@ NewFormulaAudit:
Enabled: false
# make our hashes consistent
Layout/AlignHash:
Layout/HashAlignment:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
# `system` is a special case and aligns on second argument
Layout/AlignArguments:
Layout/ArgumentAlignment:
Enabled: false
# favour parens-less DSL-style arguments

View File

@ -22,7 +22,7 @@ Cask/StanzaOrder:
Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
Enabled: true
Layout/AlignHash:
Layout/HashAlignment:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table

View File

@ -7,7 +7,7 @@ AllCops:
DisplayCopNames: false
# Use `<<~` for heredocs.
Layout/IndentHeredoc:
Layout/HeredocIndentation:
EnforcedStyle: squiggly
# Not useful in casks and formulae.
@ -21,7 +21,7 @@ Metrics/ParameterLists:
# Implicitly allow EOS as we use it everywhere.
Naming/HeredocDelimiterNaming:
Blacklist:
ForbiddenDelimiters:
- END, EOD, EOF
# Allow dashes in filenames.

View File

@ -10,7 +10,7 @@ AllCops:
- '**/vendor/**/*'
# messes up system formatting for formulae but good for Homebrew/brew
Layout/AlignArguments:
Layout/ArgumentAlignment:
Enabled: true
# make rspec formatting more flexible
@ -72,11 +72,11 @@ Naming/PredicateName:
Exclude:
- 'compat/**/*'
# can't rename these
NameWhitelist: is_32_bit?, is_64_bit?
AllowedMethods: is_32_bit?, is_64_bit?
# whitelist those that are standard
# TODO: try to remove some of these
Naming/UncommunicativeMethodParamName:
Naming/MethodParameterName:
AllowedNames:
- '_'
- 'a'

View File

@ -59,7 +59,7 @@ module Homebrew
quiet: args.quieter?
rescue TapRemoteMismatchError => e
odie e
rescue TapAlreadyTappedError, TapAlreadyUnshallowError # rubocop:disable Lint/HandleExceptions
rescue TapAlreadyTappedError, TapAlreadyUnshallowError # rubocop:disable Lint/SuppressedException
end
end
end

View File

@ -80,7 +80,7 @@ module Homebrew
if Utils.popen_read("git config --get --bool commit.gpgsign").chomp == "true"
begin
gnupg = Formula["gnupg"]
rescue FormulaUnavailableError # rubocop:disable Lint/HandleExceptions
rescue FormulaUnavailableError # rubocop:disable Lint/SuppressedException
else
if gnupg.installed?
path = PATH.new(ENV.fetch("PATH"))

View File

@ -5,7 +5,7 @@ class Caveats
def plist_caveats
s = []
if f.plist || (keg&.plist_installed?)
if f.plist || keg&.plist_installed?
plist_domain = f.plist_path.basename(".plist")
# we readlink because this path probably doesn't exist since caveats

View File

@ -325,7 +325,7 @@ class Formula
active_spec == head
end
delegate [ # rubocop:disable Layout/AlignHash
delegate [ # rubocop:disable Layout/HashAlignment
:bottle_unneeded?,
:bottle_disabled?,
:bottle_disable_reason,
@ -1078,7 +1078,7 @@ class Formula
# keg's formula is deleted.
begin
keg = Keg.for(path)
rescue NotAKegError, Errno::ENOENT # rubocop:disable Lint/HandleExceptions
rescue NotAKegError, Errno::ENOENT # rubocop:disable Lint/SuppressedException
# file doesn't belong to any keg.
else
tab_tap = Tab.for_keg(keg).tap
@ -1087,7 +1087,7 @@ class Formula
begin
Formulary.factory(keg.name)
rescue FormulaUnavailableError # rubocop:disable Lint/HandleExceptions
rescue FormulaUnavailableError # rubocop:disable Lint/SuppressedException
# formula for this keg is deleted, so defer to whitelist
rescue TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError
return false # this keg belongs to another formula

View File

@ -339,8 +339,8 @@ class Tab < OpenStruct
"time" => time,
"source_modified_time" => source_modified_time.to_i,
"HEAD" => self.HEAD,
"stdlib" => (stdlib&.to_s),
"compiler" => (compiler&.to_s),
"stdlib" => stdlib&.to_s,
"compiler" => compiler&.to_s,
"aliases" => aliases,
"runtime_dependencies" => runtime_dependencies,
"source" => source,