app/models/event.rb
Class has too many lines. [107/100] Open
Open
class Event
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Slug
include Geocoder::Model::Mongoid
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
You can set literals you want to fold with CountAsOne
.
Available are: 'array', 'hash', and 'heredoc'. Each literal
will be counted as one line regardless of its actual size.
Example: CountAsOne: ['array', 'heredoc']
class Foo
ARRAY = [ # +1
1,
2
]
HASH = { # +3
key: 'value'
}
MSG = <<~HEREDOC # +1
Heredoc
content.
HEREDOC
end # 5 points
NOTE: This cop also applies for Struct
definitions.
Event#user_organizing_events_inc doesn't depend on instance state (maybe move it to another class?) Open
Open
def user_organizing_events_inc(user, inc)
- Read upRead up
- Exclude checks
A Utility Function is any instance method that has no dependency on the state of the instance.