From 65dbdccfc0c3e6ec519d20cf4561bfbacc60cae8 Mon Sep 17 00:00:00 2001 From: Ian Lancaster Date: Mon, 3 Aug 2015 21:03:11 -0400 Subject: [PATCH] Formula-Cookbook: avoid non-with options Closes Homebrew/homebrew#42433. Signed-off-by: Dominyk Tiller --- share/doc/homebrew/Formula-Cookbook.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/share/doc/homebrew/Formula-Cookbook.md b/share/doc/homebrew/Formula-Cookbook.md index 99f9263e11..99ec05f1ff 100644 --- a/share/doc/homebrew/Formula-Cookbook.md +++ b/share/doc/homebrew/Formula-Cookbook.md @@ -861,18 +861,12 @@ end if build.without? "ham" # works as you'd expect. True if `--without-ham` was given. end - -if build.include? "enable-ham" - # the deprecated style, only useful for options other than `with`/`without` style -end ``` -Option names should be prefixed with one of the words `with`, `without`, `no`, or a verb in the imperative tense describing the action to be taken. For example, an option to run a test suite should be named `--with-test` or `--with-check` rather than `--test`, and an option to enable a shared library should be named `--enable-shared` rather than `--shared`. +Option names should be prefixed with the words `with` or `without`. For example, an option to run a test suite should be named `--with-test` or `--with-check` rather than `--test`, and an option to enable a shared library `--with-shared` rather than `--shared` or `--enable-shared`. Note that options that aren’t ` build.with? ` or ` build.without? ` should be actively deprecated where possible. See [wget](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/wget.rb#L27-L31) for an example. -See the [graphviz](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/graphviz.rb) formula for an example. - ## File level operations