znamenica/dneslov

View on GitHub
app/models/scriptum/cantoes/canticles/chant.rb

Summary

Maintainability
A
0 mins
Test Coverage

Space found before semicolon.
Open

   validates :tone, inclusion: { in: 1..8 }, if: ->{ tone.present? } ;end

Checks for semicolon (;) preceded by space.

Example:

# bad
x = 1 ; y = 2

# good
x = 1; y = 2

Extra empty line detected at class body end.
Open


   validates :tone, inclusion: { in: 1..8 }, if: ->{ tone.present? } ;end

This cops checks if empty lines around the bodies of classes match the configuration.

Example: EnforcedStyle: empty_lines

# good

class Foo

  def bar
    # ...
  end

end

Example: EnforcedStyle: emptylinesexcept_namespace

# good

class Foo
  class Bar

    # ...

  end
end

Example: EnforcedStyle: emptylinesspecial

# good
class Foo

  def bar; end

end

Example: EnforcedStyle: noemptylines (default)

# good

class Foo
  def bar
    # ...
  end
end

Space missing to the left of {.
Open

   validates :tone, inclusion: { in: 1..8 }, if: ->{ tone.present? } ;end

Checks that block braces have or don't have a space before the opening brace depending on configuration.

Example:

# bad
foo.map{ |a|
  a.bar.to_s
}

# good
foo.map { |a|
  a.bar.to_s
}

Space missing after semicolon.
Open

   validates :tone, inclusion: { in: 1..8 }, if: ->{ tone.present? } ;end

Checks for semicolon (;) not followed by some kind of space.

Example:

# bad
x = 1;y = 2

# good
x = 1; y = 2

end at 6, 70 is not aligned with class at 1, 0.
Open

   validates :tone, inclusion: { in: 1..8 }, if: ->{ tone.present? } ;end

This cop checks whether the end keywords are aligned properly.

Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

Example: EnforcedStyleAlignWith: keyword (default)

# bad

variable = if true
    end

# good

variable = if true
           end

Example: EnforcedStyleAlignWith: variable

# bad

variable = if true
    end

# good

variable = if true
end

Example: EnforcedStyleAlignWith: startofline

# bad

variable = if true
    end

# good

puts(if true
end)

Missing top-level class documentation comment.
Open

class Chant < Canticle

This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.

The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.

Example:

# bad
class Person
  # ...
end

# good
# Description/Explanation of Person class
class Person
  # ...
end

There are no issues that match your filters.

Category
Status