Fix Lint/EndAlignment.

This commit is contained in:
Markus Reiter 2016-09-21 08:32:57 +02:00
parent 3540c94df6
commit 42efb44e7d
4 changed files with 15 additions and 22 deletions

View File

@ -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:

View File

@ -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,8 +742,10 @@ 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}"
when :revision, :tag
@ref
end end
%W[reset --hard #{ref}] %W[reset --hard #{ref}]