decko-commons/decko

View on GitHub

Showing 661 of 695 total issues

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

    context "updated file card" do

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

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

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

      expect(subject.image.small.size).to be < 6000

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

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

Use let instead of an instance variable.
Open

      item_names_args = @context ? { context: @context } : {}

Empty example group detected.
Open

describe Card::Set::Self::Alerts do

Missing top-level class documentation comment.
Open

class StopFollowLink < FollowLink

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

Prefer annotated tokens (like %<foo>s</foo>) over unannotated tokens (like %s).
Open

        "%s/%s/%s" % [local_url_base(opts), file_dir, full_filename(url_filename)]

Use a consistent style for named format string tokens.

Note: unannotated style cop only works for strings which are passed as arguments to those methods: sprintf, format, %. The reason is that unannotated format is very similar to encoded URLs or Date/Time formatting strings.

Example: EnforcedStyle: annotated (default)

# bad
format('%{greeting}', greeting: 'Hello')
format('%s', 'Hello')

# good
format('%<greeting>s', greeting: 'Hello')</greeting>

Example: EnforcedStyle: template

# bad
format('%<greeting>s', greeting: 'Hello')
format('%s', 'Hello')

# good
format('%{greeting}', greeting: 'Hello')</greeting>

Example: EnforcedStyle: unannotated

# bad
format('%<greeting>s', greeting: 'Hello')
format('%{greeting}', 'Hello')

# good
format('%s', 'Hello')</greeting>

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

          expect(File).to be_exist(subject.file.path)

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

      expect(subject.file.url)

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

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

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

        act_summary = subject.format.render_content_changes

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

        expect(subject.image.original_filename).to eq "rails.gif"

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

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

The first argument to describe should be the class or module being tested.
Open

describe "#bucket config" do

Missing top-level class documentation comment.
Open

    class ProcLayout < Layout

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 UnknownLayout < Layout

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

Do not stub your test subject.
Open

      allow(format).to receive(:view_setting)

Script file stop_follow_link.rb doesn't have execute permission.
Open

#! no set module

Use let instead of an instance variable.
Open

      @account.password_card.update!(content: "new Pas5word!")
Severity
Category
Status
Source
Language