diff options
| author | Baptiste Fontaine | 2015-10-23 10:33:34 +0200 |
|---|---|---|
| committer | Baptiste Fontaine | 2015-10-23 15:20:10 +0200 |
| commit | e7ef3e36e245fa30cab23d5802d0c701823c9ee4 (patch) | |
| tree | be69d9a28da1e71a693cf11c753a6707757de144 | |
| parent | 774a508d1ac9e8be8a2d3cc3a753d513e1b962e3 (diff) | |
| download | brew-e7ef3e36e245fa30cab23d5802d0c701823c9ee4.tar.bz2 | |
audit: merge the template comments checks
Closes Homebrew/homebrew#45263.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 36 |
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 |
