lib/oink/instrumentation/active_record.rb
Assignment Branch Condition size for included is too high. [30.1/20] Open
Open
def self.included(klass)
klass.class_eval do
def self.reset_instance_type_count
self.instantiated_hash = {}
- Read upRead up
- 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
Method included
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.included(klass)
klass.class_eval do
def self.reset_instance_type_count
self.instantiated_hash = {}
Variable value
used in void context. Open
Open
value
- Read upRead up
- Exclude checks
This cop checks for operators, variables and literals used in void context.
Example:
# bad
def some_method
some_num * 10
do_something
end
Example:
# bad
def some_method(some_var)
some_var
do_something
end
Example:
# good
def some_method
do_something
some_num * 10
end
Example:
# good
def some_method(some_var)
do_something
some_var
end