NexusSW/nio4r-websocket

View on GitHub

Showing 150 of 150 total issues

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

        @buffer = ""
Severity: Minor
Found in lib/nio/websocket/raw_adapter.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"

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/client.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"

Unnecessary utf-8 encoding comment.
Open

# coding: utf-8
Severity: Minor
Found in nio4r-websocket.gemspec by rubocop

Line is too long. [96/80]
Open

      # @option options [Hash] :websocket_options Hash to pass to the ::WebSocket::Driver.client
Severity: Minor
Found in lib/nio/websocket.rb by rubocop

Line is too long. [105/80]
Open

      # @option options [Hash] :ssl_context Hash from which to create the OpenSSL::SSL::SSLContext object
Severity: Minor
Found in lib/nio/websocket.rb by rubocop

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

require "socket"
Severity: Minor
Found in lib/nio/websocket.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. [116/80]
Open

              monitor.interests = :rw unless monitor.closed? # keep the :w interest so that our block runs each time
Severity: Minor
Found in lib/nio/websocket/raw_adapter.rb by rubocop

Line is too long. [82/80]
Open

                    monitor.value.call(monitor) if monitor.value.respond_to? :call
Severity: Minor
Found in lib/nio/websocket/reactor.rb by rubocop

Missing top-level class documentation comment.
Open

      class ProxyAdapter < RawAdapter
Severity: Minor
Found in lib/nio/websocket/adapter/proxy.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/raw_adapter"
Severity: Minor
Found in lib/nio/websocket/adapter/proxy.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"
Severity
Category
Status
Source
Language