Fix Style/NumericLiterals.
This commit is contained in:
parent
23dacc7525
commit
9ce3c8d8a4
@ -11,6 +11,10 @@ Style/StringLiteralsInInterpolation:
|
|||||||
Style/NumericLiterals:
|
Style/NumericLiterals:
|
||||||
MinDigits: 7
|
MinDigits: 7
|
||||||
|
|
||||||
|
# zero-prefixed octal literals are just too widely used (and mostly understood)
|
||||||
|
Style/NumericLiteralPrefix:
|
||||||
|
EnforcedOctalStyle: zero_only
|
||||||
|
|
||||||
# percent-x is allowed for multiline
|
# percent-x is allowed for multiline
|
||||||
Style/CommandLiteral:
|
Style/CommandLiteral:
|
||||||
EnforcedStyle: mixed
|
EnforcedStyle: mixed
|
||||||
@ -62,14 +66,6 @@ Lint/ParenthesesAsGroupedExpression:
|
|||||||
Style/EmptyLineBetweenDefs:
|
Style/EmptyLineBetweenDefs:
|
||||||
AllowAdjacentOneLineDefs: true
|
AllowAdjacentOneLineDefs: true
|
||||||
|
|
||||||
# port numbers and such tech stuff
|
|
||||||
Style/NumericLiterals:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# zero-prefixed octal literals are just too widely used (and mostly understood)
|
|
||||||
Style/NumericLiteralPrefix:
|
|
||||||
EnforcedOctalStyle: zero_only
|
|
||||||
|
|
||||||
# consistency and readability when faced with string interpolation
|
# consistency and readability when faced with string interpolation
|
||||||
Style/PercentLiteralDelimiters:
|
Style/PercentLiteralDelimiters:
|
||||||
PreferredDelimiters:
|
PreferredDelimiters:
|
||||||
|
|||||||
@ -273,11 +273,6 @@ Style/MutableConstant:
|
|||||||
- 'Homebrew/tab.rb'
|
- 'Homebrew/tab.rb'
|
||||||
- 'Homebrew/tap.rb'
|
- 'Homebrew/tap.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Style/NumericLiterals:
|
|
||||||
MinDigits: 6
|
|
||||||
|
|
||||||
# Offense count: 9
|
# Offense count: 9
|
||||||
Style/OpMethod:
|
Style/OpMethod:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|||||||
@ -185,8 +185,8 @@ module Homebrew
|
|||||||
|
|
||||||
def puts_result
|
def puts_result
|
||||||
if ENV["TRAVIS"]
|
if ENV["TRAVIS"]
|
||||||
travis_start_time = @start_time.to_i*1000000000
|
travis_start_time = @start_time.to_i * 1_000_000_000
|
||||||
travis_end_time = @end_time.to_i*1000000000
|
travis_end_time = @end_time.to_i * 1_000_000_000
|
||||||
travis_duration = travis_end_time - travis_start_time
|
travis_duration = travis_end_time - travis_start_time
|
||||||
puts "#{Tty.white}==>#{Tty.green} PASSED#{Tty.reset}" if passed?
|
puts "#{Tty.white}==>#{Tty.green} PASSED#{Tty.reset}" if passed?
|
||||||
puts "travis_time:end:#{@travis_timer_id},start=#{travis_start_time},finish=#{travis_end_time},duration=#{travis_duration}"
|
puts "travis_time:end:#{@travis_timer_id},start=#{travis_start_time},finish=#{travis_end_time},duration=#{travis_duration}"
|
||||||
|
|||||||
@ -118,7 +118,7 @@ class GitDownloadStrategyTests < Homebrew::TestCase
|
|||||||
|
|
||||||
def test_source_modified_time
|
def test_source_modified_time
|
||||||
setup_git_repo
|
setup_git_repo
|
||||||
assert_equal 1242860651, @strategy.source_modified_time.to_i
|
assert_equal 1_242_860_651, @strategy.source_modified_time.to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_last_commit
|
def test_last_commit
|
||||||
|
|||||||
@ -26,7 +26,7 @@ class PathnameTests < Homebrew::TestCase
|
|||||||
mkdir_p @dir/"a-directory"
|
mkdir_p @dir/"a-directory"
|
||||||
touch @dir/".DS_Store"
|
touch @dir/".DS_Store"
|
||||||
touch @dir/"a-file"
|
touch @dir/"a-file"
|
||||||
File.truncate(@dir/"a-file", 1048576)
|
File.truncate(@dir/"a-file", 1_048_576)
|
||||||
ln_s @dir/"a-file", @dir/"a-symlink"
|
ln_s @dir/"a-file", @dir/"a-symlink"
|
||||||
ln @dir/"a-file", @dir/"a-hardlink"
|
ln @dir/"a-file", @dir/"a-hardlink"
|
||||||
assert_equal 3, @dir.file_count
|
assert_equal 3, @dir.file_count
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user