rakuten-ws/rws-ruby-sdk

View on GitHub
lib/rakuten_web_service/search_result.rb

Summary

Maintainability
A
0 mins
Test Coverage
B
86%

Method has too many lines. [16/10]
Open

    def order(options)
      new_params = params.dup
      if options.is_a? Hash
        key, sort_order = *options.to_a.last
        key = key.to_s.to_camel

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Assignment Branch Condition size for order is too high. [17.03/15]
Open

    def order(options)
      new_params = params.dup
      if options.is_a? Hash
        key, sort_order = *options.to_a.last
        key = key.to_s.to_camel

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

Rename has_next_page? to next_page?.
Open

    def has_next_page?

This cop makes sure that predicates are named properly.

Example:

# bad
def is_even?(value)
end

# good
def even?(value)
end

# bad
def has_value?
end

# good
def value?
end

Rename has_previous_page? to previous_page?.
Open

    def has_previous_page?

This cop makes sure that predicates are named properly.

Example:

# bad
def is_even?(value)
end

# good
def even?(value)
end

# bad
def has_value?
end

# good
def value?
end

Line is too long. [81/80]
Open

    def ensure_retries(max_retries = RakutenWebService.configuration.max_retries)

Missing top-level class documentation comment.
Open

  class SearchResult

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