diff options
author | Sean McGivern <sean@gitlab.com> | 2017-02-28 13:41:59 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-03-01 13:53:10 +0300 |
commit | 8dd097a91530e4b047c4b391f21047c7d29d310d (patch) | |
tree | e05f69a73b248d88c6dd61c61808f84d6b82b9af /lib/extracts_path.rb | |
parent | 6b4d490782a7b0c2a4a7f7eb6ed5ef2c25fc1c4d (diff) |
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.
Diffstat (limited to 'lib/extracts_path.rb')
0 files changed, 0 insertions, 0 deletions