afaur/ruby-nicefn

View on GitHub

Showing 6 of 8 total issues

Method has too many lines. [12/10]
Open

  def test_inst_valid
    assert_block('Error testing instance public methods') do
      # Store a class property on Inst
      Inst.set_klass_property @klass_property
      
Severity: Minor
Found in tst/inst.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Do not prefix writer method names with set_.
Open

  def self.set_klass_property(value)
Severity: Minor
Found in exa/before/inst.rb by rubocop

This cop makes sure that accessor methods are named properly.

Example:

# bad
def set_attribute(value)
end

# good
def attribute=(value)
end

# bad
def get_attribute
end

# good
def attribute
end

Replace class var @@klass_property with a class instance var.
Open

    @@klass_property = value
Severity: Minor
Found in exa/before/inst.rb by rubocop

This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.

Replace class var @@klass_property with a class instance var.
Open

  cm(:set_klass_property) { |value| @@klass_property = value }
Severity: Minor
Found in exa/after/inst.rb by rubocop

This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.

Trailing whitespace detected.
Open

      
Severity: Minor
Found in tst/inst.rb by rubocop

Omit the parentheses in defs when the method doesn't accept any arguments.
Open

  def self.print_klass_property()
Severity: Minor
Found in exa/before/inst.rb by rubocop

This cop checks for parentheses in the definition of a method, that does not take any arguments. Both instance and class/singleton methods are checked.

Example:

# bad
def foo()
  # does a thing
end

# good
def foo
  # does a thing
end

# also good
def foo() does_a_thing end

Example:

# bad
def Baz.foo()
  # does a thing
end

# good
def Baz.foo
  # does a thing
end
Severity
Category
Status
Source
Language