aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/audit.rb
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-10-23 10:33:34 +0200
committerBaptiste Fontaine2015-10-23 15:20:10 +0200
commite7ef3e36e245fa30cab23d5802d0c701823c9ee4 (patch)
treebe69d9a28da1e71a693cf11c753a6707757de144 /Library/Homebrew/cmd/audit.rb
parent774a508d1ac9e8be8a2d3cc3a753d513e1b962e3 (diff)
downloadbrew-e7ef3e36e245fa30cab23d5802d0c701823c9ee4.tar.bz2
audit: merge the template comments checks
Closes Homebrew/homebrew#45263. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Diffstat (limited to 'Library/Homebrew/cmd/audit.rb')
-rw-r--r--Library/Homebrew/cmd/audit.rb36
1 files changed, 13 insertions, 23 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index f21df6e26..bb8f8811d 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -609,29 +609,19 @@ class FormulaAuditor
end
# Comments from default template
- if line =~ /# PLEASE REMOVE/
- problem "Please remove default template comments"
- end
- if line =~ /# Documentation:/
- problem "Please remove default template comments"
- end
- if line =~ /# if this fails, try separate make\/make install steps/
- problem "Please remove default template comments"
- end
- if line =~ /# The URL of the archive/
- problem "Please remove default template comments"
- end
- if line =~ /## Naming --/
- problem "Please remove default template comments"
- end
- if line =~ /# if your formula requires any X11\/XQuartz components/
- problem "Please remove default template comments"
- end
- if line =~ /# if your formula fails when building in parallel/
- problem "Please remove default template comments"
- end
- if line =~ /# Remove unrecognized options if warned by configure/
- problem "Please remove default template comments"
+ [
+ "# PLEASE REMOVE",
+ "# Documentation:",
+ "# if this fails, try separate make/make install steps",
+ "# The URL of the archive",
+ "## Naming --",
+ "# if your formula requires any X11/XQuartz components",
+ "# if your formula fails when building in parallel",
+ "# Remove unrecognized options if warned by configure",
+ ].each do |comment|
+ if line.include? comment
+ problem "Please remove default template comments"
+ end
end
# FileUtils is included in Formula