decko-commons/decko

View on GitHub

Showing 661 of 695 total issues

Missing top-level class documentation comment.
Open

    class SubdirectorArray < Array

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 class documentation comment.
Open

      class Abstract

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 ClassMethods

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 Fasten

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

Use args[:optional] = true instead of args.merge! optional: true.
Open

      args.merge! optional: true
Severity: Minor
Found in card/spec/card/format_spec.rb by rubocop

This cop identifies places where Hash#merge! can be replaced by Hash#[]=.

Example:

hash.merge!(a: 1)
hash.merge!({'key' => 'value'})
hash.merge!(a: 1, b: 2)

Use let instead of an instance variable.
Open

      expect(@called).to eq true
Severity: Minor
Found in card/spec/card/set/event_spec.rb by rubocop

Use let instead of an instance variable.
Open

        expect(cobj.inject(classes, &@check_proc)).to eq(true)
Severity: Minor
Found in card/spec/card/content_spec.rb by rubocop

Prefer have_received for setting message expectations. Setup card_double as a spy using allow or instance_spy.
Open

      expect(card_double).not_to receive(:find_by_key)
Severity: Minor
Found in card/spec/card/fetch_spec.rb by rubocop

Prefer have_received for setting message expectations. Setup format as a spy using allow or instance_spy.
Open

    expect(format).to receive(:render!).with("viewname", { optional: :show })

Missing top-level module documentation comment.
Open

  module Set
Severity: Minor
Found in card/lib/card/set/i18n_scanner.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 KeyLists

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

Ambiguous keyword splat operator. Parenthesize the method arguments if it's surely a keyword splat operator, or add a whitespace to the right of the ** if it should be a exponent.
Open

        act(as_subcard: as_subcard) { super **args }
Severity: Minor
Found in card/lib/card/director/all.rb by rubocop

This cop checks for ambiguous operators in the first argument of a method invocation without parentheses.

Example:

# bad

# The `*` is interpreted as a splat operator but it could possibly be
# a `*` method invocation (i.e. `do_something.*(some_array)`).
do_something *some_array

Example:

# good

# With parentheses, there's no ambiguity.
do_something(*some_array)

Replace class var @@prefix_map_by_list with a class instance var.
Open

      @@prefix_map_by_list = Hash.new { |h, k| h[k] = {} }
Severity: Minor
Found in card/lib/card/content/chunk.rb by rubocop

This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.

Line is too long. [109/90]
Open

  #   #expect(Card).to receive(:tracks).with(:any_args) # so Card still loads without core in failure testing
Severity: Minor
Found in card/spec/cardio/mod/loader_spec.rb by rubocop

Use nested module/class definitions instead of compact style.
Open

    module Card::Set::Self::SetTestLoad
Severity: Minor
Found in card/spec/cardio/mod/loader_spec.rb by rubocop

This cop checks the style of children definitions at classes and modules. Basically there are two different styles:

Example: EnforcedStyle: nested (default)

# good
# have each child on its own line
class Foo
  class Bar
  end
end

Example: EnforcedStyle: compact

# good
# combine definitions as much as possible
class Foo::Bar
end

The compact style is only forced for classes/modules with one child.

Missing top-level module documentation comment.
Open

          module Phrase
Severity: Minor
Found in card/spec/card/set/trait_spec.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

Start context description with 'when', 'with', or 'without'.
Open

  context "if accessor type is defined by a symbol" do
Severity: Minor
Found in card/spec/card/set/trait_spec.rb by rubocop

Use let instead of an instance variable.
Open

        cobj.process_chunks(&@render_block)
Severity: Minor
Found in card/spec/card/content_spec.rb by rubocop

Use let instead of an instance variable.
Open

        card2 = Card[@card.id]
Severity: Minor
Found in card/spec/card/content_spec.rb by rubocop

When using method_missing, fall back on super.
Open

    def method_missing method, *args
      return unless respond_to_missing?(method)

      @keys.send method, *args
    end
Severity: Minor
Found in card/lib/card/subcards.rb by rubocop

This cop checks for the presence of method_missing without also defining respond_to_missing? and falling back on super.

Example:

#bad
def method_missing(name, *args)
  # ...
end

#good
def respond_to_missing?(name, include_private)
  # ...
end

def method_missing(name, *args)
  # ...
  super
end
Severity
Category
Status
Source
Language