Skip to content
Snippets Groups Projects
Commit 4f73fa70 authored by Josh Hagins's avatar Josh Hagins Committed by GitHub
Browse files

Merge pull request #1363 from reitermarkus/rubocop-percent-literals

Don’t use bare percent literals.
parents 3f3fa4d0 b28b21fd
No related branches found
No related tags found
No related merge requests found
......@@ -716,11 +716,11 @@ class FormulaAuditor
end
if text =~ /system\s+['"]xcodebuild/
problem %(use "xcodebuild *args" instead of "system 'xcodebuild', *args")
problem %q(use "xcodebuild *args" instead of "system 'xcodebuild', *args")
end
if text =~ /xcodebuild[ (]["'*]/ && !text.include?("SYMROOT=")
problem %(xcodebuild should be passed an explicit "SYMROOT")
problem 'xcodebuild should be passed an explicit "SYMROOT"'
end
if text.include? "Formula.factory("
......@@ -1002,9 +1002,9 @@ class FormulaAuditor
case condition
when /if build\.include\? ['"]with-#{dep}['"]$/, /if build\.with\? ['"]#{dep}['"]$/
problem %(Replace #{line.inspect} with "depends_on #{quoted_dep} => :optional")
problem %Q(Replace #{line.inspect} with "depends_on #{quoted_dep} => :optional")
when /unless build\.include\? ['"]without-#{dep}['"]$/, /unless build\.without\? ['"]#{dep}['"]$/
problem %(Replace #{line.inspect} with "depends_on #{quoted_dep} => :recommended")
problem %Q(Replace #{line.inspect} with "depends_on #{quoted_dep} => :recommended")
end
end
......
......@@ -146,7 +146,7 @@ class DiagnosticChecksTest < Homebrew::TestCase
FileUtils.chmod 0755, file
ENV["PATH"] = "#{path}#{File::PATH_SEPARATOR}#{ENV["PATH"]}"
assert_match %("config" scripts exist),
assert_match '"config" scripts exist',
@checks.check_for_config_scripts
end
end
......
......@@ -13,7 +13,7 @@ class ExceptionsTest < Homebrew::TestCase
end
def test_formula_validation_error
assert_equal %(invalid attribute for formula 'foo': sha257 ("magic")),
assert_equal %q(invalid attribute for formula 'foo': sha257 ("magic")),
FormulaValidationError.new("foo", "sha257", "magic").to_s
end
......
......@@ -119,7 +119,7 @@ class ExternalPatchTests < Homebrew::TestCase
end
def test_inspect
assert_equal %(#<ExternalPatch: :p1 "file:///my.patch">), @p.inspect
assert_equal '#<ExternalPatch: :p1 "file:///my.patch">', @p.inspect
end
def test_cached_download
......
......@@ -35,6 +35,6 @@ I'm not indented
def test_inreplace_sub_failure
s = "foobar".extend StringInreplaceExtension
s.sub! "not here", "test"
assert_equal [%(expected replacement of "not here" with "test")], s.errors
assert_equal ['expected replacement of "not here" with "test"'], s.errors
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment