cequel/cequel

View on GitHub
lib/cequel/schema/table_desc_dsl.rb

Summary

Maintainability
A
0 mins
Test Coverage

Extra blank line detected.
Open


      def has_partition_key?
Severity: Minor
Found in lib/cequel/schema/table_desc_dsl.rb by rubocop

This cops checks for two or more consecutive blank lines.

Example:

# bad - It has two empty lines.
some_method
# one empty line
# two empty lines
some_method

# good
some_method
# one empty line
some_method

Space between { and | missing.
Open

        columns.any?{|c| c.partition_key? }
Severity: Minor
Found in lib/cequel/schema/table_desc_dsl.rb by rubocop

Checks that block braces have or don't have surrounding space inside them on configuration. For blocks taking parameters, it checks that the left brace has or doesn't have trailing space depending on configuration.

Example: EnforcedStyle: space (default)

# The `space` style enforces that block braces have
# surrounding space.

# bad
some_array.each {puts e}

# good
some_array.each { puts e }

Example: EnforcedStyle: no_space

# The `no_space` style enforces that block braces don't
# have surrounding space.

# bad
some_array.each { puts e }

# good
some_array.each {puts e}

Example: EnforcedStyleForEmptyBraces: no_space (default)

# The `no_space` EnforcedStyleForEmptyBraces style enforces that
# block braces don't have a space in between when empty.

# bad
some_array.each {   }
some_array.each {  }
some_array.each { }

# good
some_array.each {}

Example: EnforcedStyleForEmptyBraces: space

# The `space` EnforcedStyleForEmptyBraces style enforces that
# block braces have at least a spece in between when empty.

# bad
some_array.each {}

# good
some_array.each { }
some_array.each {  }
some_array.each {   }

Example: SpaceBeforeBlockParameters: true (default)

# The SpaceBeforeBlockParameters style set to `true` enforces that
# there is a space between `{` and `|`. Overrides `EnforcedStyle`
# if there is a conflict.

# bad
[1, 2, 3].each {|n| n * 2 }

# good
[1, 2, 3].each { |n| n * 2 }

Example: SpaceBeforeBlockParameters: true

# The SpaceBeforeBlockParameters style set to `false` enforces that
# there is no space between `{` and `|`. Overrides `EnforcedStyle`
# if there is a conflict.

# bad
[1, 2, 3].each { |n| n * 2 }

# good
[1, 2, 3].each {|n| n * 2 }

Extra blank line detected.
Open


      # Describe (one of) the key(s) of the table.
Severity: Minor
Found in lib/cequel/schema/table_desc_dsl.rb by rubocop

This cops checks for two or more consecutive blank lines.

Example:

# bad - It has two empty lines.
some_method
# one empty line
# two empty lines
some_method

# good
some_method
# one empty line
some_method

Line is too long. [86/80]
Open

                                  figure_index_name(name, options.fetch(:index, nil)))
Severity: Minor
Found in lib/cequel/schema/table_desc_dsl.rb by rubocop

Add an empty line after magic comments.
Open

module Cequel
Severity: Minor
Found in lib/cequel/schema/table_desc_dsl.rb by rubocop

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

Line is too long. [117/80]
Open

                     (fail ArgumentError, "Can't set clustering order for partition key #{name}") if clustering_order
Severity: Minor
Found in lib/cequel/schema/table_desc_dsl.rb by rubocop

Empty line detected around arguments.
Open


                     PartitionKey.new(name, type(type))
Severity: Minor
Found in lib/cequel/schema/table_desc_dsl.rb by rubocop

This cops checks if empty lines exist around the arguments of a method invocation.

Example:

# bad
do_something(
  foo

)

process(bar,

        baz: qux,
        thud: fred)

some_method(

  [1,2,3],
  x: y
)

# good
do_something(
  foo
)

process(bar,
        baz: qux,
        thud: fred)

some_method(
  [1,2,3],
  x: y
)

Unnecessary spacing detected.
Open

        columns <<  PartitionKey.new(name, type(type))
Severity: Minor
Found in lib/cequel/schema/table_desc_dsl.rb by rubocop

This cop checks for extra/unnecessary whitespace.

Example:

# good if AllowForAlignment is true
name      = "RuboCop"
# Some comment and an empty line

website  += "/bbatsov/rubocop" unless cond
puts        "rubocop"          if     debug

# bad for any configuration
set_app("RuboCop")
website  = "https://github.com/bbatsov/rubocop"

Space missing to the left of {.
Open

        columns.any?{|c| c.partition_key? }
Severity: Minor
Found in lib/cequel/schema/table_desc_dsl.rb by rubocop

Checks that block braces have or don't have a space before the opening brace depending on configuration.

Example:

# bad
foo.map{ |a|
  a.bar.to_s
}

# good
foo.map { |a|
  a.bar.to_s
}

Unnecessary utf-8 encoding comment.
Open

# -*- encoding : utf-8 -*-
Severity: Minor
Found in lib/cequel/schema/table_desc_dsl.rb by rubocop

Use empty lines between method definitions.
Open

      def key(name, type, clustering_order = nil)
Severity: Minor
Found in lib/cequel/schema/table_desc_dsl.rb by rubocop

This cop checks whether method definitions are separated by one empty line.

NumberOfEmptyLines can be and integer (e.g. 1 by default) or an array (e.g. [1, 2]) to specificy a minimum and a maximum of empty lines.

AllowAdjacentOneLineDefs can be used to configure is adjacent one line methods definitions are an offense

Example:

# bad
def a
end
def b
end

Example:

# good
def a
end

def b
end

There are no issues that match your filters.

Category
Status