mod/carrierwave/set/type/image.rb
Assignment Branch Condition size for determine_image_size is too high. [19.52/15] Open
Open
def determine_image_size
voo.size =
case
when nest_mode == :closed then closed_size
when voo.size.present? then voo.size.to_sym
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
include
is used at the top level. Use inside class
or module
. Open
Open
include File::SelectedAction
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that include
, extend
and prepend
exists at
the top level.
Using these at the top level affects the behavior of Object
.
There will not be using include
, extend
and prepend
at
the top level. Let's use it inside class
or module
.
Example:
# bad
include M
class C
end
# bad
extend M
class C
end
# bad
prepend M
class C
end
# good
class C
include M
end
# good
class C
extend M
end
# good
class C
prepend M
end