diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 3750eaf25c..99614a3fd0 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -855,6 +855,14 @@ class FormulaAuditor if line =~ /(require ["']formula["'])/ problem "`#{$1}` is now unnecessary" end + + if line =~ /#\{share\}\/#{formula.name}/ + problem "Use \#{pkgshare} instead of \#{share}/#{formula.name}" + end + + if line =~ /share\/"#{formula.name}"/ + problem "Use pkgshare instead of (share/\"#{formula.name}\")" + end end end