Skip to content
  • Peter Leitzen's avatar
    Update existing cops · 5384c9b2
    Peter Leitzen authored and Marc Shaw's avatar Marc Shaw committed
    The major changes here are:
    
    1. Inherit from `RuboCop::Cop::Base`, not `RuboCop::Cop::Cop`.
    2. New auto-correction style - `extend RuboCop::Cop::AutoCorrector`,
       pass a block to `add_offense` rather than defining an `autocorrect`
       method.
    3. `add_offense` no longer takes a `location` keyword argument.
    4. Specs should not set `subject(:cop)` as that will be done
       automatically, and will use the config correctly.
    5384c9b2