NexusSW/nio4r-websocket

View on GitHub
lib/nio/websocket/adapter/server.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Missing top-level class documentation comment.
Open

      class Server < Adapter
Severity: Minor
Found in lib/nio/websocket/adapter/server.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

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "nio/websocket/adapter"
Severity: Minor
Found in lib/nio/websocket/adapter/server.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Line is too long. [86/80]
Open

          driver = ::WebSocket::Driver.server(self, options[:websocket_options] || {})
Severity: Minor
Found in lib/nio/websocket/adapter/server.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

              WebSocket.logger.debug "driver connected"
Severity: Minor
Found in lib/nio/websocket/adapter/server.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

There are no issues that match your filters.

Category
Status