Skip to content

Commit

Permalink
Merge pull request #219 from ruby/rubocop
Browse files Browse the repository at this point in the history
Fixup rubocop warnings
  • Loading branch information
hsbt committed Aug 21, 2017
2 parents 7b01b8a + 879e08f commit 8692b78
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 20 deletions.
28 changes: 14 additions & 14 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AllCops:
- doc/**/*.rb
- rake.gemspec

Style/LineLength:
Metrics/LineLength:
Enabled: true
Max: 120

Expand All @@ -16,42 +16,42 @@ Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes

Style/IndentationWidth:
Style/MultilineIfThen:
Enabled: true

Style/Tab:
Style/MethodDefParentheses:
Enabled: true

Style/EmptyLines:
Style/BracesAroundHashParameters:
Enabled: true

Style/TrailingBlankLines:
Layout/IndentationWidth:
Enabled: true

Style/TrailingWhitespace:
Layout/Tab:
Enabled: true

Style/SpaceBeforeBlockBraces:
Layout/EmptyLines:
Enabled: true

Style/SpaceInsideBlockBraces:
Layout/TrailingBlankLines:
Enabled: true

Style/SpaceInsideHashLiteralBraces:
Layout/TrailingWhitespace:
Enabled: true

Style/CaseIndentation:
Layout/SpaceBeforeBlockBraces:
Enabled: true

Style/MultilineIfThen:
Layout/SpaceInsideBlockBraces:
Enabled: true

Style/MethodDefParentheses:
Layout/SpaceInsideHashLiteralBraces:
Enabled: true

Style/BracesAroundHashParameters:
Layout/CaseIndentation:
Enabled: true

Lint/EndAlignment:
Enabled: true
AlignWith: variable
EnforcedStyleAlignWith: variable
1 change: 1 addition & 0 deletions rake.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ Rake has the following features:
s.add_development_dependency(%q<minitest>.freeze)
s.add_development_dependency(%q<rdoc>.freeze)
s.add_development_dependency(%q<coveralls>.freeze)
s.add_development_dependency(%q<rubocop>.freeze)
end
2 changes: 1 addition & 1 deletion test/helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
$:.unshift File.expand_path("../../lib", __FILE__)

require 'coveralls'
require "coveralls"
Coveralls.wear!

gem "minitest", "~> 5"
Expand Down
2 changes: 1 addition & 1 deletion test/test_rake_file_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def test_sh_with_hash_option
check_expansion

verbose(false) {
sh "#{RUBY} check_expansion.rb", {chdir: "."}, { verbose: false }
sh "#{RUBY} check_expansion.rb", { chdir: "." }, verbose: false
}
end

Expand Down
4 changes: 2 additions & 2 deletions test/test_rake_rake_test_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class TestRakeRakeTestLoader < Rake::TestCase
def setup
super

@loader = File.join @rake_lib, 'rake/rake_test_loader.rb'
@loader = File.join @rake_lib, "rake/rake_test_loader.rb"
end

def test_pattern
Expand Down Expand Up @@ -35,7 +35,7 @@ def test_load_error

assert_empty out

no_such_path = File.join @tempdir, 'no_such_test_file'
no_such_path = File.join @tempdir, "no_such_test_file"

expected =
/\A\n
Expand Down
4 changes: 2 additions & 2 deletions test/test_rake_rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TestRakeRules < Rake::TestCase
OBJFILE = "abc.o"
FOOFILE = "foo"
DOTFOOFILE = ".foo"
MINFILE = 'abc.min.o'
MINFILE = "abc.min.o"

def setup
super
Expand Down Expand Up @@ -400,7 +400,7 @@ def obj.find_prereq(task_name)

def test_works_with_chained_extensions_in_rules
create_file(OBJFILE)
rule('.min.o' => ['.o']) do |t|
rule(".min.o" => [".o"]) do |t|
@runs << t.name
assert_equal OBJFILE, t.source
assert_equal MINFILE, t.name
Expand Down

0 comments on commit 8692b78

Please sign in to comment.