Fix Style/PredicateName.
This commit is contained in:
parent
9ce3c8d8a4
commit
0b473ebba9
@ -145,6 +145,7 @@ Style/MethodName:
|
||||
Style/PredicateName:
|
||||
Exclude:
|
||||
- 'Homebrew/compat/**/*'
|
||||
NameWhitelist: is_32_bit?, is_64_bit?
|
||||
|
||||
# `formula do` uses nested method definitions
|
||||
Lint/NestedMethodDefinition:
|
||||
|
||||
@ -281,17 +281,6 @@ Style/OpMethod:
|
||||
- 'Homebrew/install_renamed.rb'
|
||||
- 'Homebrew/options.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
||||
# NamePrefix: is_, has_, have_
|
||||
# NamePrefixBlacklist: is_, has_, have_
|
||||
# NameWhitelist: is_a?
|
||||
Style/PredicateName:
|
||||
Exclude:
|
||||
- 'Homebrew/compat/**/*'
|
||||
- 'Homebrew/download_strategy.rb'
|
||||
- 'Homebrew/hardware.rb'
|
||||
|
||||
# Offense count: 7
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
|
||||
|
||||
@ -115,9 +115,6 @@ Style/PercentLiteralDelimiters:
|
||||
'%W': '[]'
|
||||
'%x': '()'
|
||||
|
||||
Style/PredicateName:
|
||||
NameWhitelist: is_32_bit?, is_64_bit?
|
||||
|
||||
Style/RaiseArgs:
|
||||
EnforcedStyle: exploded
|
||||
|
||||
|
||||
@ -663,7 +663,7 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
||||
@shallow && support_depth?
|
||||
end
|
||||
|
||||
def is_shallow_clone?
|
||||
def shallow_dir?
|
||||
git_dir.join("shallow").exist?
|
||||
end
|
||||
|
||||
@ -675,7 +675,7 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
||||
cached_location.join(".git")
|
||||
end
|
||||
|
||||
def has_ref?
|
||||
def ref?
|
||||
quiet_system "git", "--git-dir", git_dir, "rev-parse", "-q", "--verify", "#{@ref}^{commit}"
|
||||
end
|
||||
|
||||
@ -717,8 +717,8 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
||||
end
|
||||
|
||||
def update_repo
|
||||
if @ref_type == :branch || !has_ref?
|
||||
if !shallow_clone? && is_shallow_clone?
|
||||
if @ref_type == :branch || !ref?
|
||||
if !shallow_clone? && shallow_dir?
|
||||
quiet_safe_system "git", "fetch", "origin", "--unshallow"
|
||||
else
|
||||
quiet_safe_system "git", "fetch", "origin"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user