Commit 8dd097a9 authored by Sean McGivern's avatar Sean McGivern 🔴
Browse files

Add RuboCop cop for custom error classes

From the Ruby style guide:

    # bad
    class FooError < StandardError
    end

    # okish
    class FooError < StandardError; end

    # good
    FooError = Class.new(StandardError)

This cop does that, but only for error classes (classes where the
superclass ends in 'Error'). We have empty controllers and models, which
are perfectly valid empty classes.
parent 6b4d4907
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment