18F/e-manifest

View on GitHub
app/services/base_validator.rb

Summary

Maintainability
A
0 mins
Test Coverage

Space missing to the left of {.
Open

      errors.map{ |e| e[:message] }
Severity: Minor
Found in app/services/base_validator.rb by rubocop

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
}

Missing top-level class documentation comment.
Open

class BaseValidator
Severity: Minor
Found in app/services/base_validator.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

Use the return of the conditional for variable assignment and comparison.
Open

    if content.is_a?(String)
      @content = JSON.parse(content)
    else
      @content = content
    end
Severity: Minor
Found in app/services/base_validator.rb by rubocop

There are no issues that match your filters.

Category
Status