aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2011-09-21 15:22:05 -0500
committerJack Nagel2011-09-21 15:25:28 -0500
commit51f010ac390e838e59dfe5c1d2811b7a20f9ab2a (patch)
tree41cfd6733d3ca2220b83ac125c4c409a29081410 /Library/Homebrew
parentd817e5e51e18064d7691f399c6225550134a40aa (diff)
downloadbrew-51f010ac390e838e59dfe5c1d2811b7a20f9ab2a.tar.bz2
audit: recognize options used with 'ARGV.flag?'
A few formula use ARGV.flag? instead of ARGV.include?. This made `audit` recognize a few undocumented instances of a '--devel' option, but we can just ignore that like '--HEAD' for now, and change the behavior if we decide they need to be documented explicitly in each formula. cf. Homebrew/homebrew#7456. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew')
-rwxr-xr-xLibrary/Homebrew/cmd/audit.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 03b2bf78d..5f4796a6e 100755
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -124,7 +124,7 @@ def audit_formula_options f, text
# Find possible options
options = []
- text.scan(/ARGV\.include\?[ ]*\(?(['"])(.+?)\1/) { |m| options << m[1] }
+ text.scan(/ARGV\.(include|flag)\?[ ]*\(?(['"])(.+?)\2/) { |m| options << m[2] }
options.reject! {|o| o.include? "#"}
options.uniq!
@@ -140,7 +140,7 @@ def audit_formula_options f, text
if options.length > 0
options.each do |o|
- next if o == '--HEAD'
+ next if o == '--HEAD' || o == '--devel'
problems << " * Option #{o} is not documented" unless documented_options.include? o
end
end