metamaps/metamaps

View on GitHub
app/policies/map_policy.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Class MapPolicy has 21 methods (exceeds 20 allowed). Consider refactoring.
Open

class MapPolicy < ApplicationPolicy
  class Scope < Scope
    def resolve
      visible = %w[public commons]
      return scope.where(permission: visible) unless user
Severity: Minor
Found in app/policies/map_policy.rb - About 2 hrs to fix

Assignment Branch Condition size for resolve is too high. [16.06/16]
Open

    def resolve
      visible = %w[public commons]
      return scope.where(permission: visible) unless user

      scope.where(permission: visible)
Severity: Minor
Found in app/policies/map_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

There are no issues that match your filters.

Category
Status