Method has too many lines. [13/10] Open
def initialize(robot, app_key, app_secret, server, username, extension, password, token)
@robot = robot
@logger_prefix = " -- #{self.class.name}: "
@rc_sdk = RingCentralSdk::REST::Client.new do |config|
config.app_key = app_key
- Read upRead up
- Exclude checks
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.
Method has too many lines. [12/10] Open
def client_connect
Lita.logger.info("#{@logger_prefix}Authorizing with RingCentral.")
if @token.nil?
@rc_sdk.authorize_password @username, @extension, @password
token = MultiJson.encode @rc_sdk.token.to_hash
- Read upRead up
- Exclude checks
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 client_connect is too high. [17.29/15] Open
def client_connect
Lita.logger.info("#{@logger_prefix}Authorizing with RingCentral.")
if @token.nil?
@rc_sdk.authorize_password @username, @extension, @password
token = MultiJson.encode @rc_sdk.token.to_hash
- Read upRead up
- Exclude checks
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
Method initialize
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(robot, app_key, app_secret, server, username, extension, password, token)
Avoid parameter lists longer than 5 parameters. [8/5] Open
def initialize(robot, app_key, app_secret, server, username, extension, password, token)
- Read upRead up
- Exclude checks
This cop checks for methods with too many parameters. The maximum number of parameters is configurable. Keyword arguments can optionally be excluded from the total count.
Line is too long. [82/80] Open
Lita.logger.debug("#{@logger_prefix}Authorized with token: #{token}.")
- Exclude checks
Line is too long. [87/80] Open
Lita.logger.debug("#{@logger_prefix}Send Message To Glip From Lita: #{s}.")
- Exclude checks
Missing top-level class documentation comment. Open
class Connector
- Read upRead up
- Exclude checks
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
Final newline missing. Open
end
- Exclude checks
Line is too long. [96/80] Open
def initialize(robot, app_key, app_secret, server, username, extension, password, token)
- Exclude checks
Extra empty line detected at class body end. Open
end
- Read upRead up
- Exclude checks
This cops checks if empty lines around the bodies of classes match the configuration.
Example: EnforcedStyle: empty_lines
# good
class Foo
def bar
# ...
end
end
Example: EnforcedStyle: emptylinesexcept_namespace
# good
class Foo
class Bar
# ...
end
end
Example: EnforcedStyle: emptylinesspecial
# good
class Foo
def bar; end
end
Example: EnforcedStyle: noemptylines (default)
# good
class Foo
def bar
# ...
end
end