Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a rake task for generation a new cop #3533

Merged
merged 1 commit into from Sep 26, 2016

Commits on Sep 26, 2016

  1. Add a rake task for generation a new cop

    e.g.
    
    ```sh
    $ bundle exec rake new_cop[Lint/UnifiedInteger]
    created
    - lib/rubocop/cop/lint/unified_integer.rb
    - spec/rubocop/cop/lint/unified_integer_spec.rb
    
    Do 4 steps
    - Add an entry to `New feature` section in CHANGELOG.md
      - e.g. Add new `Lint/UnifiedInteger` cop. ([@your_id][])
    - Add `require 'lib/rubocop/cop/lint/unified_integer'` into lib/rubocop.rb
    - Add an entry into config/enabled.yml or config/disabled.yml
    - Implement a new cop to the generated file!
    ```
    
    The task generates two ruby files.
    And it displays next steps.
    pocke committed Sep 26, 2016
    Copy the full SHA
    867f12e View commit details
    Browse the repository at this point in the history