diff --git a/Library/Homebrew/cli_parser.rb b/Library/Homebrew/cli_parser.rb index 8d10b3e718..511472ea76 100644 --- a/Library/Homebrew/cli_parser.rb +++ b/Library/Homebrew/cli_parser.rb @@ -30,6 +30,7 @@ module Homebrew .gsub(/`(.*?)`/, "#{Tty.bold}\\1#{Tty.reset}") .gsub(%r{<([^\s]+?://[^\s]+?)>}) { |url| Formatter.url(url) } .gsub(/<(.*?)>/, "#{Tty.underline}\\1#{Tty.reset}") + exit end end @@ -54,7 +55,7 @@ module Homebrew end def usage_banner(text) - @parser.banner = text + @parser.banner = "#{text}\n" end def usage_banner_text diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index c8ba04907e..fbafa459e7 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -61,41 +61,38 @@ module Homebrew run before submitting a new formula. If no are provided, all of them are checked. - EOS - switch "--strict", description: "Run additional style checks, "\ - "including Rubocop style checks." - switch "--online", description: "Run additional slower style checks "\ - "that require a network connection." - switch "--new-formula", description: "Run various additional style checks "\ - "to determine if a new formula is eligible "\ - "for Homebrew. This should be used when "\ - "creating new formula and implies "\ - "`--strict` and `--online`." - switch "--fix", description: "Fix style violations automatically using "\ - "RuboCop's auto-correct feature." - switch "--display-cop-names", description: "Include the RuboCop cop name for each "\ - "violation in the output." - switch "--display-filename", description: "Prefix everyline of output with name of "\ - "the file or formula being audited, to "\ - "make output easy to grep." - switch "-D", "--audit-debug", description: "Activates debugging and profiling" - comma_array "--only", description: "Passing `--only`= will run only the"\ - "methods named audit_method, `method` should "\ - "be a comma-separated list." - comma_array "--except", description: "Passing `--except`= will run only the "\ - "methods named audit_method, `method` should "\ - "be a comma-separated list." - comma_array "--only-cops", description: "Passing `--only-cops`= will check for "\ - "violations of only the listed RuboCop cops."\ - "`cops` should be a comma-separated list of "\ - "cop names." - comma_array "--except-cops", description: "Passing `--except-cops`= will "\ - "skip checking the listed RuboCop cops "\ - "violations. `cops` should be a "\ - "comma-separated list of cop names." - switch :verbose - switch :debug + switch "--strict", + description: "Run additional style checks, including Rubocop style checks." + switch "--online", + description: "Run additional slower style checks that require a network connection." + switch "--new-formula", + description: "Run various additional style checks to determine if a new formula is eligible "\ + "for Homebrew. This should be used when creating new formula and implies "\ + "`--strict` and `--online`." + switch "--fix", + description: "Fix style violations automatically using RuboCop's auto-correct feature." + switch "--display-cop-names", + description: "Include the RuboCop cop name for each violation in the output." + switch "--display-filename", + description: "Prefix everyline of output with name of the file or formula being audited, to "\ + "make output easy to grep." + switch "-D", "--audit-debug", + description: "Activates debugging and profiling" + comma_array "--only", + description: "Passing `--only`= will run only the methods named audit_, `method` "\ + "should be a comma-separated list." + comma_array "--except", + description: "Passing `--except`= will run only the methods named audit_, "\ + "`method` should be a comma-separated list." + comma_array "--only-cops", + description: "Passing `--only-cops`= will check for violations of only the listed "\ + "RuboCop cops. `cops` should be a comma-separated list of cop names." + comma_array "--except-cops", + description: "Passing `--except-cops`= will skip checking the listed RuboCop cops "\ + "violations. `cops` should be a comma-separated list of cop names." + switch :verbose + switch :debug end end diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index fb8eaf001d..9d64fa6668 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -168,6 +168,6 @@ module Homebrew end def format_long_opt(opt) - "`#{opt}`".ljust(30) + "`#{opt}`" end end diff --git a/docs/Manpage.md b/docs/Manpage.md index ce80c2031a..b5d01c5445 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -671,43 +671,43 @@ run before submitting a new formula. If no `formulae` are provided, all of them are checked. -* `--strict` : +* `--strict`: Run additional style checks, including Rubocop style checks. -* `--online` : +* `--online`: Run additional slower style checks that require a network connection. -* `--new-formula` : +* `--new-formula`: Run various additional style checks to determine if a new formula is eligible for Homebrew. This should be used when creating new formula and implies `--strict` and `--online`. -* `--fix` : +* `--fix`: Fix style violations automatically using RuboCop's auto-correct feature. -* `--display-cop-names` : +* `--display-cop-names`: Include the RuboCop cop name for each violation in the output. -* `--display-filename` : +* `--display-filename`: Prefix everyline of output with name of the file or formula being audited, to make output easy to grep. -* `-D`, `--audit-debug` : +* `-D`, `--audit-debug`: Activates debugging and profiling -* `--only` : -Passing `--only`=`method` will run only themethods named audit_method, `method` should be a comma-separated list. +* `--only`: +Passing `--only`=`method` will run only the methods named audit_`method`, `method` should be a comma-separated list. -* `--except` : -Passing `--except`=`method` will run only the methods named audit_method, `method` should be a comma-separated list. +* `--except`: +Passing `--except`=`method` will run only the methods named audit_`method`, `method` should be a comma-separated list. -* `--only-cops` : -Passing `--only-cops`=`cops` will check for violations of only the listed RuboCop cops.`cops` should be a comma-separated list of cop names. +* `--only-cops`: +Passing `--only-cops`=`cops` will check for violations of only the listed RuboCop cops. `cops` should be a comma-separated list of cop names. -* `--except-cops` : +* `--except-cops`: Passing `--except-cops`=`cops` will skip checking the listed RuboCop cops violations. `cops` should be a comma-separated list of cop names. -* `-v`, `--verbose` : +* `-v`, `--verbose`: Make some output more verbose. -* `-d`, `--debug` : +* `-d`, `--debug`: Display any debugging information. * `audit` [`--strict`] [`--fix`] [`--online`] [`--new-formula`] [`--display-cop-names`] [`--display-filename`] [`--only=``method`|`--except=``method`] [`--only-cops=``cops`|`--except-cops=``cops`] [`formulae`]: diff --git a/manpages/brew.1 b/manpages/brew.1 index aaf6407fea..87e07f7de3 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -639,15 +639,15 @@ Activates debugging and profiling . .TP \fB\-\-only\fR -Passing \fB\-\-only\fR=\fImethod\fR will run only themethods named audit_method, \fBmethod\fR should be a comma\-separated list\. +Passing \fB\-\-only\fR=\fImethod\fR will run only the methods named audit_\fImethod\fR, \fBmethod\fR should be a comma\-separated list\. . .TP \fB\-\-except\fR -Passing \fB\-\-except\fR=\fImethod\fR will run only the methods named audit_method, \fBmethod\fR should be a comma\-separated list\. +Passing \fB\-\-except\fR=\fImethod\fR will run only the methods named audit_\fImethod\fR, \fBmethod\fR should be a comma\-separated list\. . .TP \fB\-\-only\-cops\fR -Passing \fB\-\-only\-cops\fR=\fIcops\fR will check for violations of only the listed RuboCop cops\.\fBcops\fR should be a comma\-separated list of cop names\. +Passing \fB\-\-only\-cops\fR=\fIcops\fR will check for violations of only the listed RuboCop cops\. \fBcops\fR should be a comma\-separated list of cop names\. . .TP \fB\-\-except\-cops\fR