decko-commons/decko

View on GitHub

Showing 668 of 700 total issues

Missing top-level class documentation comment.
Open

class Object
Severity: Minor
Found in cardname/lib/core_ext.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 let instead of an instance variable.
Open

      Card::Env.params[:token] = Card::Auth::Token.encode @signup.id, anonymous: true

Method Cardname#key is defined at both cardname/lib/cardname.rb:42 and cardname/lib/cardname.rb:74.
Open

  def key
Severity: Minor
Found in cardname/lib/cardname.rb by rubocop

This cop checks for duplicated instance (or singleton) method definitions.

Example:

# bad

def duplicated
  1
end

def duplicated
  2
end

Example:

# bad

def duplicated
  1
end

alias duplicated other_duplicated

Example:

# good

def duplicated
  1
end

def other_duplicated
  2
end

Use let instead of an instance variable.
Open

    @card.delete

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

    context "stabilize" do
Severity: Minor
Found in cardname/spec/lib/cardname_spec.rb by rubocop

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

    context "for Joe User" do

Use let instead of an instance variable.
Open

      body = @mail.parts[0].body.raw_source

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

  context "+*account+*email" do

Use let instead of an instance variable.
Open

      expect(@signup.refresh(true).type_id).to eq(Card::UserID)

Use let instead of an instance variable.
Open

      expect(@account.salt).not_to eq("")

Use let instead of an instance variable.
Open

        expect(@format.render_raw).to eq("u1@user.com")

Use let instead of an instance variable.
Open

        @email_card.update content: "joe@user.com"

Use let instead of an instance variable.
Open

        expect(@email_card.errors[:content].first).to match(/must be unique/)

Use let instead of an instance variable.
Open

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

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

  context "a welcome email card exists" do

Use let instead of an instance variable.
Open

        expect(@signup.account).to be_active

Use let instead of an instance variable.
Open

    rps_view = @card.format.render_reset_password_success

Empty example group detected.
Open

RSpec.describe Card::Set::All::Comment do

Beware of using before(:all) as it may cause state to leak between tests. If you are using rspec-rails, and use_transactional_fixtures is enabled, then records created in before(:all) are not automatically rolled back.
Open

    before(:all) do

Use let instead of an instance variable.
Open

      account = @signup.account
Severity
Category
Status
Source
Language