cequel/cequel

View on GitHub
lib/cequel/metal/row_specification.rb

Summary

Maintainability
A
0 mins
Test Coverage

Do not use parallel assignment.
Open

        @column, @value = column, value

Checks for simple usages of parallel assignment. This will only complain when the number of variables being assigned matched the number of assigning variables.

Example:

# bad
a, b, c = 1, 2, 3
a, b, c = [1, 2, 3]

# good
one, two = *foo
a, b = foo()
a, b = b, a

a = 1
b = 2
c = 3

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

        if Array === value

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/

Unnecessary utf-8 encoding comment.
Open

# -*- encoding : utf-8 -*-

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

        value = if Enumerable === @value && @value.count == 1

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/

Add an empty line after magic comments.
Open

module Cequel

Checks for a newline after the final magic comment.

Example:

# good
# frozen_string_literal: true

# Some documentation for Person
class Person
  # Some code
end

# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
  # Some code
end

There are no issues that match your filters.

Category
Status