Merge pull request #3982 from MikeMcQuaid/rubocop-rspec
style: add optional rubocop-rspec support.
This commit is contained in:
commit
dda1dd54eb
@ -11,6 +11,8 @@
|
||||
#: If `--display-cop-names` is passed, include the RuboCop cop name for each
|
||||
#: violation in the output.
|
||||
#:
|
||||
#: If `--rspec` is passed, install and use the RuboCop RSpec gem.
|
||||
#:
|
||||
#: Passing `--only-cops=`<cops> will check for violations of only the listed
|
||||
#: RuboCop <cops>, while `--except-cops=`<cops> will skip checking the listed
|
||||
#: <cops>. For either option <cops> should be a comma-separated list of cop names.
|
||||
@ -83,6 +85,11 @@ module Homebrew
|
||||
args << "--parallel"
|
||||
end
|
||||
|
||||
if ARGV.include?("--rspec")
|
||||
Homebrew.install_gem! "rubocop-rspec"
|
||||
args += %w[--require rubocop-rspec]
|
||||
end
|
||||
|
||||
if options[:except_cops]
|
||||
options[:except_cops].map! { |cop| RuboCop::Cop::Cop.registry.qualified_cop_name(cop.to_s, "") }
|
||||
cops_to_exclude = options[:except_cops].select do |cop|
|
||||
|
||||
@ -436,6 +436,8 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
|
||||
If `--display-cop-names` is passed, include the RuboCop cop name for each
|
||||
violation in the output.
|
||||
|
||||
If `--rspec` is passed, install and use the RuboCop RSpec gem.
|
||||
|
||||
Passing `--only-cops=``cops` will check for violations of only the listed
|
||||
RuboCop `cops`, while `--except-cops=``cops` will skip checking the listed
|
||||
`cops`. For either option `cops` should be a comma-separated list of cop names.
|
||||
|
||||
@ -446,6 +446,9 @@ If \fB\-\-fix\fR is passed, automatically fix style violations using RuboCop\'s
|
||||
If \fB\-\-display\-cop\-names\fR is passed, include the RuboCop cop name for each violation in the output\.
|
||||
.
|
||||
.IP
|
||||
If \fB\-\-rspec\fR is passed, install and use the RuboCop RSpec gem\.
|
||||
.
|
||||
.IP
|
||||
Passing \fB\-\-only\-cops=\fR\fIcops\fR will check for violations of only the listed RuboCop \fIcops\fR, while \fB\-\-except\-cops=\fR\fIcops\fR will skip checking the listed \fIcops\fR\. For either option \fIcops\fR should be a comma\-separated list of cop names\.
|
||||
.
|
||||
.IP
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user