audit: avoid false positive pkgshare problems

This commit is contained in:
Baptiste Fontaine 2016-01-25 11:48:02 +01:00
parent d0998a4907
commit e1875b7a43

View File

@ -878,11 +878,11 @@ class FormulaAuditor
problem "`#{$1}` is now unnecessary"
end
if line =~ /#\{share\}\/#{formula.name}/
if line =~ %r{#\{share\}/#{formula.name}[/'"]}
problem "Use \#{pkgshare} instead of \#{share}/#{formula.name}"
end
if line =~ /share\/"#{formula.name}"/
if line =~ %r{share/"#{formula.name}[/'"]}
problem "Use pkgshare instead of (share/\"#{formula.name}\")"
end
end