diff options
| author | Dominyk Tiller | 2015-10-19 17:23:06 +0100 |
|---|---|---|
| committer | Dominyk Tiller | 2015-10-24 00:25:46 +0100 |
| commit | 2b9561b8370749d036037e7c25e1a3037f108f33 (patch) | |
| tree | 0017cff0321d2d4ac61961377222c4d22feacbb6 /Library | |
| parent | 674a350e6c19a3e6f102cab8be7765bf98da3c84 (diff) | |
| download | brew-2b9561b8370749d036037e7c25e1a3037f108f33.tar.bz2 | |
audit: add bottle modifier checks
* Checks for placement of the bottle modifier variable.
* Checks there isn't a bottle modifier and a bottle do block - The former makes
the latter redundant.
Closes Homebrew/homebrew#45146.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index bb8f8811d..ca5891efd 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -172,11 +172,12 @@ class FormulaAuditor [/^ bottle do/, "bottle block"], [/^ devel do/, "devel block"], [/^ head do/, "head block"], + [/^ bottle (:unneeded|:disable)/, "bottle modifier"], [/^ option/, "option"], [/^ depends_on/, "depends_on"], [/^ def install/, "install method"], [/^ def caveats/, "caveats method"], - [/^ test do/, "test block"] + [/^ test do/, "test block"], ] present = component_list.map do |regex, name| @@ -193,6 +194,9 @@ class FormulaAuditor if present.include?("head") && present.include?("head block") problem "Should not have both `head` and `head do`" end + if present.include?("bottle modifier") && present.include?("bottle block") + problem "Should not have `bottle :unneeded/:disable` and `bottle do`" + end end def audit_class |
