Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add a task to generate a new cop #517
This pull-request will add a task to generate a new cop template.
$ bundle exec rake new_cop[RSpec/Foo] [create] lib/rubocop/cop/rspec/foo.rb [create] spec/rubocop/cop/rspec/foo_spec.rb [modify] lib/rubocop/cop/rspec_cops.rb - `require_relative 'rspec/foo'` was injected. [modify] A configuration for the cop is added into config/default.yml. If you want to disable the cop by default, move the added config to config/disabled.yml Do 3 steps: 1. Add an entry to the "New features" section in CHANGELOG.md, e.g. "Add new `RSpec/Foo` cop. ([@your_id])" 2. Modify the description of RSpec/Foo in config/enabled.yml 3. Implement your new cop in the generated file!
I believe the task is very useful when we create a new cop.
And this pull-request will change
Before submitting the PR make sure the following are checked: