pramodshinde/omniauth-box-oauth2

View on GitHub
lib/omniauth/strategies/box_oauth2.rb

Summary

Maintainability
A
0 mins
Test Coverage

Final newline missing.
Open

end

Trailing whitespace detected.
Open

      private 

Trailing whitespace detected.
Open

      end     

Redundant curly braces around a hash parameter.
Open

      option :client_options, {
        site: 'https://api.box.com/2.0/',
        authorize_url: 'https://app.box.com/api/oauth2/authorize',
        token_url: 'https://api.box.com/oauth2/token'
      }

This cop checks for braces around the last parameter in a method call if the last parameter is a hash. It supports braces, no_braces and context_dependent styles.

Example: EnforcedStyle: braces

# The `braces` style enforces braces around all method
# parameters that are hashes.

# bad
some_method(x, y, a: 1, b: 2)

# good
some_method(x, y, {a: 1, b: 2})

Example: EnforcedStyle: no_braces (default)

# The `no_braces` style checks that the last parameter doesn't
# have braces around it.

# bad
some_method(x, y, {a: 1, b: 2})

# good
some_method(x, y, a: 1, b: 2)

Example: EnforcedStyle: context_dependent

# The `context_dependent` style checks that the last parameter
# doesn't have braces around it, but requires braces if the
# second to last parameter is also a hash literal.

# bad
some_method(x, y, {a: 1, b: 2})
some_method(x, y, {a: 1, b: 2}, a: 1, b: 2)

# good
some_method(x, y, a: 1, b: 2)
some_method(x, y, {a: 1, b: 2}, {a: 1, b: 2})

Missing top-level class documentation comment.
Open

    class BoxOauth2 < OmniAuth::Strategies::OAuth2

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

      extra do 

Trailing whitespace detected.
Open

      end 

There are no issues that match your filters.

Category
Status