audit (strict): add require formula check.
This commit is contained in:
parent
f3a5a83452
commit
c4f7217811
@ -41,6 +41,7 @@ class FormulaText
|
|||||||
@text = path.open("rb", &:read)
|
@text = path.open("rb", &:read)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def without_patch
|
def without_patch
|
||||||
@text.split("\n__END__").first
|
@text.split("\n__END__").first
|
||||||
end
|
end
|
||||||
@ -565,6 +566,10 @@ class FormulaAuditor
|
|||||||
good_quotes = bad_quotes.gsub "'", "\""
|
good_quotes = bad_quotes.gsub "'", "\""
|
||||||
problem "use double-quotes for `#{good_quotes}` instead of `#{bad_quotes}`"
|
problem "use double-quotes for `#{good_quotes}` instead of `#{bad_quotes}`"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if line =~ /(require ["']formula["'])/
|
||||||
|
problem "`#{$1}` is now unnecessary"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user