decko-commons/decko

View on GitHub
card/lib/card/content.rb

Summary

Maintainability
A
0 mins
Test Coverage
B
83%

Class has too many lines. [109/100]
Open

  class Content < SimpleDelegator
    extend Clean

    Chunk # trigger autoload

Severity: Minor
Found in card/lib/card/content.rb by rubocop

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

Rename has_chunk? to chunk?.
Open

    def has_chunk? chunk_type
Severity: Minor
Found in card/lib/card/content.rb by rubocop

This cop makes sure that predicates are named properly.

Example:

# bad
def is_even?(value)
end

# good
def even?(value)
end

# bad
def has_value?
end

# good
def value?
end

Variable Chunk used in void context.
Open

    Chunk # trigger autoload
Severity: Minor
Found in card/lib/card/content.rb by rubocop

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

There are no issues that match your filters.

Category
Status