fga-eps-mds/2019.2-Vsign

View on GitHub
backend/app/models/concerns/tokenizable.rb

Summary

Maintainability
A
0 mins
Test Coverage

Useless assignment to variable - payload. Use _ or _payload as a variable name to indicate that it won't be used.
Open

      token, payload = user_encoder.call(

This cop checks for every useless assignment to local variable in every scope. The basic idea for this cop was from the warning of ruby -cw:

assigned but unused variable - foo

Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.

Example:

# bad

def some_method
  some_var = 1
  do_something
end

Example:

# good

def some_method
  some_var = 1
  do_something(some_var)
end

Missing top-level module documentation comment.
Open

module Tokenizable

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

Trailing whitespace detected.
Open

    { 

Trailing whitespace detected.
Open

      'Content-Type' => 'application/json' 

Final newline missing.
Open

end

Trailing whitespace detected.
Open

      'Accept' => 'application/json', 

There are no issues that match your filters.

Category
Status