18F/e-manifest

View on GitHub
app/policies/manifest_policy.rb

Summary

Maintainability
A
0 mins
Test Coverage

Assignment Branch Condition size for debug_user is too high. [19/15]
Open

  def debug_user
    puts "user=#{user.pretty_inspect}"
    puts "signer?=#{signer?}"
    puts "shares_org?=#{shares_org?}"
    puts "authz=#{user.user_org_roles.pretty_inspect}"
Severity: Minor
Found in app/policies/manifest_policy.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

Line is too long. [96/80]
Open

    public_manifest? || (user && (owner? || shares_org? || epa_data_download? || shares_state?))
Severity: Minor
Found in app/policies/manifest_policy.rb by rubocop

Line is too long. [108/80]
Open

      shared_org_ids.include?(uor.organization_id) && uor.role.tsdf_certifier? && uor.cdx_status == 'Active'
Severity: Minor
Found in app/policies/manifest_policy.rb by rubocop

Trailing whitespace detected.
Open

    user.user_org_roles.select do |uor| 
Severity: Minor
Found in app/policies/manifest_policy.rb by rubocop

Missing top-level class documentation comment.
Open

class ManifestPolicy < ApplicationPolicy
Severity: Minor
Found in app/policies/manifest_policy.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