Move option descriptions to new line

This commit is contained in:
Gautham Goli 2018-09-22 09:31:30 +05:30
parent c7bf79407a
commit cfaaa0eb71
No known key found for this signature in database
GPG Key ID: 6A9ABBC284468364
5 changed files with 53 additions and 55 deletions

View File

@ -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

View File

@ -61,41 +61,38 @@ module Homebrew
run before submitting a new formula.
If no <formulae> 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`=<method> will run only the"\
"methods named audit_method, `method` should "\
"be a comma-separated list."
comma_array "--except", description: "Passing `--except`=<method> will run only the "\
"methods named audit_method, `method` should "\
"be a comma-separated list."
comma_array "--only-cops", description: "Passing `--only-cops`=<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`=<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`=<method> will run only the methods named audit_<method>, `method` "\
"should be a comma-separated list."
comma_array "--except",
description: "Passing `--except`=<method> will run only the methods named audit_<method>, "\
"`method` should be a comma-separated list."
comma_array "--only-cops",
description: "Passing `--only-cops`=<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`=<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

View File

@ -168,6 +168,6 @@ module Homebrew
end
def format_long_opt(opt)
"`#{opt}`".ljust(30)
"`#{opt}`"
end
end

View File

@ -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`]:

View File

@ -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