lujanfernaud/prevy

View on GitHub
app/models/role.rb

Summary

Maintainability
A
0 mins
Test Coverage

Line is too long. [85/80]
Open

#  index_roles_on_resource_type_and_resource_id           (resource_type,resource_id)
Severity: Minor
Found in app/models/role.rb by rubocop

Align the parameters of a method call if they span more than one line.
Open

              polymorphic: true,
              optional:    true
Severity: Minor
Found in app/models/role.rb by rubocop

Here we check if the parameters on a multi-line method call or definition are aligned.

Example: EnforcedStyle: withfirstparameter (default)

# good

foo :bar,
    :baz

# bad

foo :bar,
  :baz

Example: EnforcedStyle: withfixedindentation

# good

foo :bar,
  :baz

# bad

foo :bar,
    :baz

Missing top-level class documentation comment.
Open

class Role < ApplicationRecord
Severity: Minor
Found in app/models/role.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

Align the parameters of a method call if they span more than one line.
Open

             inclusion: { in: Rolify.resource_types },
             allow_nil: true
Severity: Minor
Found in app/models/role.rb by rubocop

Here we check if the parameters on a multi-line method call or definition are aligned.

Example: EnforcedStyle: withfirstparameter (default)

# good

foo :bar,
    :baz

# bad

foo :bar,
  :baz

Example: EnforcedStyle: withfixedindentation

# good

foo :bar,
  :baz

# bad

foo :bar,
    :baz

Line is too long. [90/80]
Open

#  index_roles_on_name_and_resource_type_and_resource_id  (name,resource_type,resource_id)
Severity: Minor
Found in app/models/role.rb by rubocop

There are no issues that match your filters.

Category
Status