• Sean McGivern's avatar
    Add RuboCop cop for custom error classes · 6ab4bfa2
    Sean McGivern authored
    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.
    6ab4bfa2
custom_error_class_spec.rb 2.74 KB