18F/e-manifest

View on GitHub
app/services/user_profile_builder.rb

Summary

Maintainability
A
0 mins
Test Coverage

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

  def populate_roles(organizations, profile, security_token)
    organizations.each do |org|
      profile[:organizations][org[:organizationName]] = { org: org, roles: {} }
      roles = CDX::UserRoles.new(
        user_id: user.cdx_user_id,

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 populate_roles is too high. [16.28/15]
Open

  def populate_roles(organizations, profile, security_token)
    organizations.each do |org|
      profile[:organizations][org[:organizationName]] = { org: org, roles: {} }
      roles = CDX::UserRoles.new(
        user_id: user.cdx_user_id,

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

Line is too long. [97/80]
Open

        profile[:organizations][org[:organizationName]][:roles][role[:type][:description]] = role

Missing top-level class documentation comment.
Open

class UserProfileBuilder

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

Line is too long. [88/80]
Open

    organizations = fetch_organizations(profile[:user], cdx_user_profile.security_token)

There are no issues that match your filters.

Category
Status