Installing rubocop as a gem does not appear to provide the new_cop rake task. Also,
bundle exec rake new_cop[Category/Name]
does not work in my experience:
bundle exec rake "new_cop[Category/Name]"
is needed.
Installing the rubocop gem should provide the new_cop task
new_cop was not found
gem install rubocop
$ ls ~/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rubocop-0.49.1/
LICENSE.txt README.md assets bin config lib
Include the output of rubocop -V. Here's an example:
$ rubocop -V
0.49.1 (using Parser 2.4.0.0, running on ruby 2.3.4 x86_64-darwin16)
Are you intending to use it to add a project specific cop? We don't have full support for that yet, i.e. you can add new cops in your project (by inheriting Cop) but you can't add configuration for it.
The rake task is meant for internal use. When we add full support for project specific cops, it should most likely be handled through a generator. 馃檪 E.g.: rubocop generate cop Project/CustomCop
The rake task is meant for internal use. When we add full support for project specific cops, it should most likely be handled through a generator. 馃檪 E.g.: rubocop generate cop Project/CustomCop
馃憤 2
Interesting idea.
Most helpful comment
Are you intending to use it to add a project specific cop? We don't have full support for that yet, i.e. you can add new cops in your project (by inheriting
Cop) but you can't add configuration for it.The rake task is meant for internal use. When we add full support for project specific cops, it should most likely be handled through a generator. 馃檪 E.g.:
rubocop generate cop Project/CustomCop