cequel/cequel

View on GitHub
lib/cequel/record/belongs_to_association.rb

Summary

Maintainability
A
0 mins
Test Coverage

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

Do not use parallel assignment.
Open

        @owner_class, @name = owner_class, name.to_sym

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

Line is too long. [83/80]
Open

        @foreign_keys = Array(options.fetch(:foreign_key, [])).map { |x| x.to_sym }

Unnecessary utf-8 encoding comment.
Open

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

There are no issues that match your filters.

Category
Status