decko-commons/decko

View on GitHub
decko/features/support/paths.rb

Summary

Maintainability
A
0 mins
Test Coverage

Method has too many lines. [23/15]
Open

  def path_to page_name
    case page_name
    when /the home\s?page/
      "/"
    when /card (.*) with (.*) layout$/
Severity: Minor
Found in decko/features/support/paths.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.

Assignment Branch Condition size for path_to is too high. [22.87/15]
Open

  def path_to page_name
    case page_name
    when /the home\s?page/
      "/"
    when /card (.*) with (.*) layout$/
Severity: Minor
Found in decko/features/support/paths.rb by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Cyclomatic complexity for path_to is too high. [10/6]
Open

  def path_to page_name
    case page_name
    when /the home\s?page/
      "/"
    when /card (.*) with (.*) layout$/
Severity: Minor
Found in decko/features/support/paths.rb by rubocop

This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

Missing top-level module documentation comment.
Open

module NavigationHelpers
Severity: Minor
Found in decko/features/support/paths.rb by rubocop

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