Add skip_clean :all to audit

This commit is contained in:
Adam Vandenberg 2012-09-13 07:14:45 -07:00
parent daf8caccd4
commit e4d6de0abc

View File

@ -269,12 +269,12 @@ class FormulaAuditor
# Commented-out cmake support from default template # Commented-out cmake support from default template
if (text =~ /# depends_on 'cmake'/) or (text =~ /# system "cmake/) if (text =~ /# depends_on 'cmake'/) or (text =~ /# system "cmake/)
problem "Commented cmake support found." problem "Commented cmake support found"
end end
# 2 (or more in an if block) spaces before depends_on, please # 2 (or more in an if block) spaces before depends_on, please
if text =~ /^\ ?depends_on/ if text =~ /^\ ?depends_on/
problem "Check indentation of 'depends_on'." problem "Check indentation of 'depends_on'"
end end
# build tools should be flagged properly # build tools should be flagged properly
@ -331,12 +331,12 @@ class FormulaAuditor
# Commented-out depends_on # Commented-out depends_on
if text =~ /#\s*depends_on\s+(.+)\s*$/ if text =~ /#\s*depends_on\s+(.+)\s*$/
problem "Commented-out dep #{$1}." problem "Commented-out dep #{$1}"
end end
# No trailing whitespace, please # No trailing whitespace, please
if text =~ /(\t|[ ])+$/ if text =~ /(\t|[ ])+$/
problem "Trailing whitespace was found." problem "Trailing whitespace was found"
end end
if text =~ /if\s+ARGV\.include\?\s+'--(HEAD|devel)'/ if text =~ /if\s+ARGV\.include\?\s+'--(HEAD|devel)'/
@ -344,7 +344,7 @@ class FormulaAuditor
end end
if text =~ /make && make/ if text =~ /make && make/
problem "Use separate make calls." problem "Use separate make calls"
end end
if text =~ /^[ ]*\t/ if text =~ /^[ ]*\t/
@ -378,15 +378,15 @@ class FormulaAuditor
end end
if text =~ /build\.include\?\s+['"]\-\-(.*)['"]/ if text =~ /build\.include\?\s+['"]\-\-(.*)['"]/
problem "Reference '#{$1}' without dashes." problem "Reference '#{$1}' without dashes"
end end
if text =~ /ARGV\.(?!(debug|verbose)\?)/ if text =~ /ARGV\.(?!(debug|verbose)\?)/
problem "Use build instead of ARGV to check options." problem "Use build instead of ARGV to check options"
end end
if text =~ /def options/ if text =~ /def options/
problem "Use new-style option definitions." problem "Use new-style option definitions"
end end
if text =~ /MACOS_VERSION/ if text =~ /MACOS_VERSION/
@ -396,6 +396,10 @@ class FormulaAuditor
if text =~ /(MacOS.((snow_)?leopard|leopard|(mountain_)?lion)\?)/ if text =~ /(MacOS.((snow_)?leopard|leopard|(mountain_)?lion)\?)/
problem "#{$1} is deprecated, use a comparison to MacOS.version instead" problem "#{$1} is deprecated, use a comparison to MacOS.version instead"
end end
if text =~ /skip_clean\s+:all/
problem "`skip_clean :all` is deprecated; brew no longer strips symbols"
end
end end
def audit def audit