mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Fix Lint/EndAlignment.
This commit is contained in:
parent
3540c94df6
commit
42efb44e7d
@ -6,16 +6,6 @@
|
|||||||
# Note that changes in the inspected code, or installation of new
|
# Note that changes in the inspected code, or installation of new
|
||||||
# versions of RuboCop, may require this file to be generated again.
|
# versions of RuboCop, may require this file to be generated again.
|
||||||
|
|
||||||
# Offense count: 4
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
# Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
|
|
||||||
# SupportedStyles: keyword, variable, start_of_line
|
|
||||||
Lint/EndAlignment:
|
|
||||||
Exclude:
|
|
||||||
- 'Homebrew/download_strategy.rb'
|
|
||||||
- 'Homebrew/keg.rb'
|
|
||||||
- 'Homebrew/os/mac/cctools_mach.rb'
|
|
||||||
|
|
||||||
# Offense count: 18
|
# Offense count: 18
|
||||||
Lint/HandleExceptions:
|
Lint/HandleExceptions:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
@ -165,11 +165,11 @@ class DependencyCollector
|
|||||||
|
|
||||||
def parse_url_spec(url, tags)
|
def parse_url_spec(url, tags)
|
||||||
case File.extname(url)
|
case File.extname(url)
|
||||||
when ".xz" then Dependency.new("xz", tags)
|
when ".xz" then Dependency.new("xz", tags)
|
||||||
when ".lha", ".lzh" then Dependency.new("lha", tags)
|
when ".lha", ".lzh" then Dependency.new("lha", tags)
|
||||||
when ".lz" then Dependency.new("lzip", tags)
|
when ".lz" then Dependency.new("lzip", tags)
|
||||||
when ".rar" then Dependency.new("unrar", tags)
|
when ".rar" then Dependency.new("unrar", tags)
|
||||||
when ".7z" then Dependency.new("p7zip", tags)
|
when ".7z" then Dependency.new("p7zip", tags)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -696,7 +696,8 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
|||||||
args << "--depth" << "1" if shallow_clone?
|
args << "--depth" << "1" if shallow_clone?
|
||||||
|
|
||||||
case @ref_type
|
case @ref_type
|
||||||
when :branch, :tag then args << "--branch" << @ref
|
when :branch, :tag
|
||||||
|
args << "--branch" << @ref
|
||||||
end
|
end
|
||||||
|
|
||||||
args << @url << cached_location
|
args << @url << cached_location
|
||||||
@ -741,9 +742,11 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
|||||||
|
|
||||||
def reset_args
|
def reset_args
|
||||||
ref = case @ref_type
|
ref = case @ref_type
|
||||||
when :branch then "origin/#{@ref}"
|
when :branch
|
||||||
when :revision, :tag then @ref
|
"origin/#{@ref}"
|
||||||
end
|
when :revision, :tag
|
||||||
|
@ref
|
||||||
|
end
|
||||||
|
|
||||||
%W[reset --hard #{ref}]
|
%W[reset --hard #{ref}]
|
||||||
end
|
end
|
||||||
|
@ -249,10 +249,10 @@ class Keg
|
|||||||
|
|
||||||
def completion_installed?(shell)
|
def completion_installed?(shell)
|
||||||
dir = case shell
|
dir = case shell
|
||||||
when :bash then path.join("etc", "bash_completion.d")
|
when :bash then path.join("etc", "bash_completion.d")
|
||||||
when :zsh then path.join("share", "zsh", "site-functions")
|
when :zsh then path.join("share", "zsh", "site-functions")
|
||||||
when :fish then path.join("share", "fish", "vendor_completions.d")
|
when :fish then path.join("share", "fish", "vendor_completions.d")
|
||||||
end
|
end
|
||||||
dir && dir.directory? && !dir.children.empty?
|
dir && dir.directory? && !dir.children.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user