Fix RuboCop 0.77.0 failures.
This commit is contained in:
parent
35bad17e1e
commit
766fc4b301
@ -13,12 +13,12 @@ NewFormulaAudit:
|
|||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# make our hashes consistent
|
# make our hashes consistent
|
||||||
Layout/AlignHash:
|
Layout/HashAlignment:
|
||||||
EnforcedHashRocketStyle: table
|
EnforcedHashRocketStyle: table
|
||||||
EnforcedColonStyle: table
|
EnforcedColonStyle: table
|
||||||
|
|
||||||
# `system` is a special case and aligns on second argument
|
# `system` is a special case and aligns on second argument
|
||||||
Layout/AlignArguments:
|
Layout/ArgumentAlignment:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# favour parens-less DSL-style arguments
|
# favour parens-less DSL-style arguments
|
||||||
|
|||||||
@ -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'
|
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
|
Enabled: true
|
||||||
|
|
||||||
Layout/AlignHash:
|
Layout/HashAlignment:
|
||||||
EnforcedHashRocketStyle: table
|
EnforcedHashRocketStyle: table
|
||||||
EnforcedColonStyle: table
|
EnforcedColonStyle: table
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ AllCops:
|
|||||||
DisplayCopNames: false
|
DisplayCopNames: false
|
||||||
|
|
||||||
# Use `<<~` for heredocs.
|
# Use `<<~` for heredocs.
|
||||||
Layout/IndentHeredoc:
|
Layout/HeredocIndentation:
|
||||||
EnforcedStyle: squiggly
|
EnforcedStyle: squiggly
|
||||||
|
|
||||||
# Not useful in casks and formulae.
|
# Not useful in casks and formulae.
|
||||||
@ -21,7 +21,7 @@ Metrics/ParameterLists:
|
|||||||
|
|
||||||
# Implicitly allow EOS as we use it everywhere.
|
# Implicitly allow EOS as we use it everywhere.
|
||||||
Naming/HeredocDelimiterNaming:
|
Naming/HeredocDelimiterNaming:
|
||||||
Blacklist:
|
ForbiddenDelimiters:
|
||||||
- END, EOD, EOF
|
- END, EOD, EOF
|
||||||
|
|
||||||
# Allow dashes in filenames.
|
# Allow dashes in filenames.
|
||||||
|
|||||||
@ -10,7 +10,7 @@ AllCops:
|
|||||||
- '**/vendor/**/*'
|
- '**/vendor/**/*'
|
||||||
|
|
||||||
# messes up system formatting for formulae but good for Homebrew/brew
|
# messes up system formatting for formulae but good for Homebrew/brew
|
||||||
Layout/AlignArguments:
|
Layout/ArgumentAlignment:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
# make rspec formatting more flexible
|
# make rspec formatting more flexible
|
||||||
@ -72,11 +72,11 @@ Naming/PredicateName:
|
|||||||
Exclude:
|
Exclude:
|
||||||
- 'compat/**/*'
|
- 'compat/**/*'
|
||||||
# can't rename these
|
# can't rename these
|
||||||
NameWhitelist: is_32_bit?, is_64_bit?
|
AllowedMethods: is_32_bit?, is_64_bit?
|
||||||
|
|
||||||
# whitelist those that are standard
|
# whitelist those that are standard
|
||||||
# TODO: try to remove some of these
|
# TODO: try to remove some of these
|
||||||
Naming/UncommunicativeMethodParamName:
|
Naming/MethodParameterName:
|
||||||
AllowedNames:
|
AllowedNames:
|
||||||
- '_'
|
- '_'
|
||||||
- 'a'
|
- 'a'
|
||||||
|
|||||||
@ -59,7 +59,7 @@ module Homebrew
|
|||||||
quiet: args.quieter?
|
quiet: args.quieter?
|
||||||
rescue TapRemoteMismatchError => e
|
rescue TapRemoteMismatchError => e
|
||||||
odie e
|
odie e
|
||||||
rescue TapAlreadyTappedError, TapAlreadyUnshallowError # rubocop:disable Lint/HandleExceptions
|
rescue TapAlreadyTappedError, TapAlreadyUnshallowError # rubocop:disable Lint/SuppressedException
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -80,7 +80,7 @@ module Homebrew
|
|||||||
if Utils.popen_read("git config --get --bool commit.gpgsign").chomp == "true"
|
if Utils.popen_read("git config --get --bool commit.gpgsign").chomp == "true"
|
||||||
begin
|
begin
|
||||||
gnupg = Formula["gnupg"]
|
gnupg = Formula["gnupg"]
|
||||||
rescue FormulaUnavailableError # rubocop:disable Lint/HandleExceptions
|
rescue FormulaUnavailableError # rubocop:disable Lint/SuppressedException
|
||||||
else
|
else
|
||||||
if gnupg.installed?
|
if gnupg.installed?
|
||||||
path = PATH.new(ENV.fetch("PATH"))
|
path = PATH.new(ENV.fetch("PATH"))
|
||||||
|
|||||||
@ -5,7 +5,7 @@ class Caveats
|
|||||||
|
|
||||||
def plist_caveats
|
def plist_caveats
|
||||||
s = []
|
s = []
|
||||||
if f.plist || (keg&.plist_installed?)
|
if f.plist || keg&.plist_installed?
|
||||||
plist_domain = f.plist_path.basename(".plist")
|
plist_domain = f.plist_path.basename(".plist")
|
||||||
|
|
||||||
# we readlink because this path probably doesn't exist since caveats
|
# we readlink because this path probably doesn't exist since caveats
|
||||||
|
|||||||
@ -325,7 +325,7 @@ class Formula
|
|||||||
active_spec == head
|
active_spec == head
|
||||||
end
|
end
|
||||||
|
|
||||||
delegate [ # rubocop:disable Layout/AlignHash
|
delegate [ # rubocop:disable Layout/HashAlignment
|
||||||
:bottle_unneeded?,
|
:bottle_unneeded?,
|
||||||
:bottle_disabled?,
|
:bottle_disabled?,
|
||||||
:bottle_disable_reason,
|
:bottle_disable_reason,
|
||||||
@ -1078,7 +1078,7 @@ class Formula
|
|||||||
# keg's formula is deleted.
|
# keg's formula is deleted.
|
||||||
begin
|
begin
|
||||||
keg = Keg.for(path)
|
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.
|
# file doesn't belong to any keg.
|
||||||
else
|
else
|
||||||
tab_tap = Tab.for_keg(keg).tap
|
tab_tap = Tab.for_keg(keg).tap
|
||||||
@ -1087,7 +1087,7 @@ class Formula
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Formulary.factory(keg.name)
|
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
|
# formula for this keg is deleted, so defer to whitelist
|
||||||
rescue TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError
|
rescue TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError
|
||||||
return false # this keg belongs to another formula
|
return false # this keg belongs to another formula
|
||||||
|
|||||||
@ -339,8 +339,8 @@ class Tab < OpenStruct
|
|||||||
"time" => time,
|
"time" => time,
|
||||||
"source_modified_time" => source_modified_time.to_i,
|
"source_modified_time" => source_modified_time.to_i,
|
||||||
"HEAD" => self.HEAD,
|
"HEAD" => self.HEAD,
|
||||||
"stdlib" => (stdlib&.to_s),
|
"stdlib" => stdlib&.to_s,
|
||||||
"compiler" => (compiler&.to_s),
|
"compiler" => compiler&.to_s,
|
||||||
"aliases" => aliases,
|
"aliases" => aliases,
|
||||||
"runtime_dependencies" => runtime_dependencies,
|
"runtime_dependencies" => runtime_dependencies,
|
||||||
"source" => source,
|
"source" => source,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user