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