etehtsea/oxblood

View on GitHub

Showing 130 of 130 total issues

Line is too long. [82/80]
Open

      # Set the expiration for a key as a UNIX timestamp specified in milliseconds
Severity: Minor
Found in lib/oxblood/commands/keys.rb by rubocop

Line is too long. [81/80]
Open

      #   items. Two different sorting methods can be invoked using the following
Severity: Minor
Found in lib/oxblood/commands/geo.rb by rubocop

Line is too long. [82/80]
Open

      #   like ZINCRBY. Only one score-element pair can be specified in this mode.
Severity: Minor
Found in lib/oxblood/commands/sorted_sets.rb by rubocop

Line is too long. [81/80]
Open

      # @return [Array] list of elements in the specified score range (optionally
Severity: Minor
Found in lib/oxblood/commands/sorted_sets.rb by rubocop

Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem benchmark-ips should appear before oxblood.
Open

gem 'benchmark-ips'
Severity: Minor
Found in benchmarks/Gemfile by rubocop

Gems should be alphabetically sorted within groups.

Example:

# bad
gem 'rubocop'
gem 'rspec'

# good
gem 'rspec'
gem 'rubocop'

# good
gem 'rubocop'

gem 'rspec'

# good only if TreatCommentsAsGroupSeparators is true
# For code quality
gem 'rubocop'
# For tests
gem 'rspec'

Use || instead of or.
Open

          socket.wait_writable(timeout) or fail_with_timeout!
Severity: Minor
Found in lib/oxblood/rsocket.rb by rubocop

This cop checks for uses of and and or, and suggests using && and || instead. It can be configured to check only in conditions, or in all contexts.

Example: EnforcedStyle: always (default)

# bad
foo.save and return

# bad
if foo and bar
end

# good
foo.save && return

# good
if foo && bar
end

Example: EnforcedStyle: conditionals

# bad
if foo and bar
end

# good
foo.save && return

# good
foo.save and return

# good
if foo && bar
end

Line is too long. [82/80]
Open

      # @return [RError] if replace is false and key already exists or RDB version
Severity: Minor
Found in lib/oxblood/commands/keys.rb by rubocop

Line is too long. [81/80]
Open

      # @return [RError] field contains a value of the wrong type (not a string).
Severity: Minor
Found in lib/oxblood/commands/hashes.rb by rubocop

Line is too long. [90/80]
Open

      #   the Geohash corresponding to each member name passed as argument to the command.
Severity: Minor
Found in lib/oxblood/commands/geo.rb by rubocop

Line is too long. [81/80]
Open

      # @return [Array] list of elements in the specified score range (optionally
Severity: Minor
Found in lib/oxblood/commands/sorted_sets.rb by rubocop

Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.
Open

        if v = opts[:count]
Severity: Minor
Found in lib/oxblood/commands/scan.rb by rubocop

This cop checks for assignments in the conditions of if/while/until.

Example:

# bad

if some_var = true
  do_something
end

Example:

# good

if some_var == true
  do_something
end

Do not use :: for method calls.
Open

      if defined?(Encoding::default_external)
Severity: Minor
Found in lib/redis/connection/oxblood.rb by rubocop

This cop checks for methods invoked via the :: operator instead of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir).

Example:

# bad
Timeout::timeout(500) { do_something }
FileUtils::rmdir(dir)
Marshal::dump(obj)

# good
Timeout.timeout(500) { do_something }
FileUtils.rmdir(dir)
Marshal.dump(obj)

Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem concurrent-ruby should appear before redis.
Open

gem 'concurrent-ruby'
Severity: Minor
Found in benchmarks/Gemfile by rubocop

Gems should be alphabetically sorted within groups.

Example:

# bad
gem 'rubocop'
gem 'rspec'

# good
gem 'rspec'
gem 'rubocop'

# good
gem 'rubocop'

gem 'rspec'

# good only if TreatCommentsAsGroupSeparators is true
# For code quality
gem 'rubocop'
# For tests
gem 'rspec'

Missing top-level module documentation comment.
Open

module Oxblood
Severity: Minor
Found in lib/oxblood.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

Missing top-level module documentation comment.
Open

    module Server
Severity: Minor
Found in lib/oxblood/commands/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

Line is too long. [86/80]
Open

      # @option opts [Integer] :count limit the results to the first N matching items.
Severity: Minor
Found in lib/oxblood/commands/geo.rb by rubocop

Missing top-level module documentation comment.
Open

    module SortedSets
Severity: Minor
Found in lib/oxblood/commands/sorted_sets.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

Line is too long. [82/80]
Open

      # @return [String] without the additional count argument the command returns
Severity: Minor
Found in lib/oxblood/commands/sets.rb by rubocop

required_ruby_version (2.2, declared in oxblood.gemspec) and TargetRubyVersion (2.1, declared in .rubocop.yml) should be equal.
Open

  spec.required_ruby_version = '>= 2.2.2'
Severity: Minor
Found in oxblood.gemspec by rubocop

Checks that required_ruby_version of gemspec and TargetRubyVersion of .rubocop.yml are equal. Thereby, RuboCop to perform static analysis working on the version required by gemspec.

Example:

# When `TargetRubyVersion` of .rubocop.yml is `2.3`.

# bad
Gem::Specification.new do |spec|
  spec.required_ruby_version = '>= 2.2.0'
end

# bad
Gem::Specification.new do |spec|
  spec.required_ruby_version = '>= 2.4.0'
end

# good
Gem::Specification.new do |spec|
  spec.required_ruby_version = '>= 2.3.0'
end

# good
Gem::Specification.new do |spec|
  spec.required_ruby_version = '>= 2.3'
end

# good
Gem::Specification.new do |spec|
  spec.required_ruby_version = ['>= 2.3.0', '< 2.5.0']
end

Avoid the use of the case equality operator ===.
Open

      Protocol::RError === response
Severity: Minor
Found in lib/oxblood/session.rb by rubocop

This cop checks for uses of the case equality operator(===).

Example:

# bad
Array === something
(1..100) === 7
/something/ === some_string

# good
something.is_a?(Array)
(1..100).include?(7)
some_string =~ /something/
Severity
Category
Status
Source
Language