decko-commons/decko

View on GitHub

Showing 661 of 695 total issues

Empty example group detected.
Open

describe Card::Set::Right::Help do

Use let instead of an instance variable.
Open

      ["/update/#{@account.left.name.url_key}",

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

    context "create permissions" do

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

  context "deleting" do

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

          expect(subject.file.url).to(

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

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

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

        subject.update!(

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

      subject.delete_files_for_action(subject.last_action)

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

        expect(subject.attachment.db_content)

Do not prefix writer method names with set_.
Open

  def set_modules_accordion subject
Severity: Minor
Found in mod/monkey/set/all/debug.rb by rubocop

This cop makes sure that accessor methods are named properly.

Example:

# bad
def set_attribute(value)
end

# good
def attribute=(value)
end

# bad
def get_attribute
end

# good
def attribute
end

Use let instead of an instance variable.
Open

      @account = Card::Auth.find_account_by_email(@email)

Use let instead of an instance variable.
Open

      @account.update! trigger: :reset_password

Empty example group detected.
Open

describe Card::Set::Right::Update do

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

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

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

      expect(subject.content).to eq ":#{subject.codename}/bootstrap.png"

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

      path = subject.image.path

Do not prefix writer method names with set_.
Open

  def set_patterns_breadcrumb subject
Severity: Minor
Found in mod/monkey/set/all/debug.rb by rubocop

This cop makes sure that accessor methods are named properly.

Example:

# bad
def set_attribute(value)
end

# good
def attribute=(value)
end

# bad
def get_attribute
end

# good
def attribute
end

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

#! no set module

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

          %p
Severity: Minor
Found in mod/rules/set/type/setting.rb by rubocop

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>
Severity
Category
Status
Source
Language