ringcentral-ruby/glip-sdk-ruby

View on GitHub

Showing 44 of 44 total issues

Line is too long. [83/80]
Open

        @subscription.subscribe(['/restapi/v1.0/account/~/extension/~/glip/posts'])
Severity: Minor
Found in lib/glip_sdk/rest/posts.rb by rubocop

Missing top-level class documentation comment.
Open

    class Posts
Severity: Minor
Found in lib/glip_sdk/rest/posts.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

Use !empty? instead of length > 0.
Open

          groups.concat(res.body['records']) if res.body['records'].length > 0
Severity: Minor
Found in lib/glip_sdk/rest/groups.rb by rubocop

This cop checks for numeric comparisons that can be replaced by a predicate method, such as receiver.length == 0, receiver.length > 0, receiver.length != 0, receiver.length < 1 and receiver.size == 0 that can be replaced by receiver.empty? and !receiver.empty.

Example:

# bad
[1, 2, 3].length == 0
0 == "foobar".length
array.length < 1
{a: 1, b: 2}.length != 0
string.length > 0
hash.size > 0

# good
[1, 2, 3].empty?
"foobar".empty?
array.empty?
!{a: 1, b: 2}.empty?
!string.empty?
!hash.empty?

Line is too long. [92/80]
Open

          @api.config.logger.info("#{@logger_prefix}Glip API Response Status #{res.status}")
Severity: Minor
Found in lib/glip_sdk/rest/posts.rb by rubocop
Severity
Category
Status
Source
Language