Showing 3 of 7 total issues
PhobosPrometheus::Collector::Histogram has at least 5 instance variables Open
Open
class Histogram
- Read upRead up
- Exclude checks
Too Many Instance Variables
is a special case of LargeClass
.
Example
Given this configuration
TooManyInstanceVariables:
max_instance_variables: 3
and this code:
class TooManyInstanceVariables
def initialize
@arg_1 = :dummy
@arg_2 = :dummy
@arg_3 = :dummy
@arg_4 = :dummy
end
end
Reek would emit the following warning:
test.rb -- 5 warnings:
[1]:TooManyInstanceVariables has at least 4 instance variables (TooManyInstanceVariables)
PhobosPrometheus::Collector::Histogram#fetch_bucket_size doesn't depend on instance state (maybe move it to another class?) Open
Open
def fetch_bucket_size(bucket_name)
- Read upRead up
- Exclude checks
A Utility Function is any instance method that has no dependency on the state of the instance.
PhobosPrometheus::Exporter#not_acceptable doesn't depend on instance state (maybe move it to another class?) Open
Open
def not_acceptable(formats)
- Read upRead up
- Exclude checks
A Utility Function is any instance method that has no dependency on the state of the instance.