phobos/phobos_prometheus

View on GitHub

Showing 3 of 7 total issues

PhobosPrometheus::Collector::Histogram has at least 5 instance variables
Open

    class Histogram

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::Exporter#not_acceptable doesn't depend on instance state (maybe move it to another class?)
Open

    def not_acceptable(formats)
Severity: Minor
Found in lib/phobos_prometheus/exporter.rb by reek

A Utility Function is any instance method that has no dependency on the state of the instance.

PhobosPrometheus::Collector::Histogram#fetch_bucket_size doesn't depend on instance state (maybe move it to another class?)
Open

      def fetch_bucket_size(bucket_name)

A Utility Function is any instance method that has no dependency on the state of the instance.

Severity
Category
Status
Source
Language