decko-commons/decko

View on GitHub

Showing 661 of 695 total issues

Name your test subject if you need to reference it explicitly.
Open

          .to eq("/files/~#{subject.id}/#{subject.last_action_id}-medium.jpg")

Name your test subject if you need to reference it explicitly.
Open

        expect(subject.image.size).to eq 8533

Name your test subject if you need to reference it explicitly.
Open

          .to eq "/files/~#{subject.id}/#{subject.last_action_id}-original.gif"

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

    context "coded file" do

Missing top-level class documentation comment.
Open

  class Layout
Severity: Minor
Found in mod/layout/lib/card/layout.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

Use caller_locations(3..3).first instead of caller_locations[2].
Open

    base_path = locals.delete(:template_path) || caller_locations[2].path
Severity: Minor
Found in mod/format/set/all/haml.rb by rubocop

This cop identifies places where caller[n] can be replaced by caller(n..n).first.

Example:

# bad
caller[1]
caller.first
caller_locations[1]
caller_locations.first

# good
caller(2..2).first
caller(1..1).first
caller_locations(2..2).first
caller_locations(1..1).first

Name your test subject if you need to reference it explicitly.
Open

      expect(subject.file.read.strip).to eq "file2"

Name your test subject if you need to reference it explicitly.
Open

        .to eq "/files/~#{subject.id}/#{subject.last_action_id}.txt"

Name your test subject if you need to reference it explicitly.
Open

          Card["#{subject.name}+*self+*read"].delete

Name your test subject if you need to reference it explicitly.
Open

        expect(subject.image.url)

Empty example group detected.
Open

  context "when admin is following" do

Missing top-level class documentation comment.
Open

  class Bootstrap
Severity: Minor
Found in mod/bootstrap/lib/card/bootstrap.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 Delegate

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 Panel < OldComponent

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 Link < Reference

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

When using method_missing, fall back on super.
Open

      def method_missing method_name, *args, &block
        if block_given?
          @format.send(method_name, *args, &block)
        else
          @format.send(method_name, *args)

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

Use let instead of an instance variable.
Open

      described_class.new(described_class.full_match(@chunk), nil)

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

  context "references" do

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

@@options = {

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.

Use let instead of an instance variable.
Open

      expect(@hat.type_name).to eq("Hat")
Severity
Category
Status
Source
Language