decko-commons/decko

View on GitHub

Showing 661 of 695 total issues

Use let instead of an instance variable.
Open

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

Freeze mutable objects assigned to constants.
Open

  OK4KEY_RE = '\p{Word}\*'
Severity: Minor
Found in cardname/lib/cardname.rb by rubocop

This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

Example:

# bad
CONST = [1, 2, 3]

# good
CONST = [1, 2, 3].freeze

Use let instead of an instance variable.
Open

      @account = @signup.account

Use let instead of an instance variable.
Open

      expect(@account.status).to eq("unverified")

Use let instead of an instance variable.
Open

      account = @signup.account

Use let instead of an instance variable.
Open

      expect(@account.status).to eq("unapproved")

Use let instead of an instance variable.
Open

        expect(@signup.account.status).to eq("unverified")

Use let instead of an instance variable.
Open

      expect(@mail.body.raw_source).to include("Welcome Big Bad Sheep")

Use let instead of an instance variable.
Open

    rps_view = @card.format.render_reset_password_success

Use let instead of an instance variable.
Open

      @card.update! "+*email" => "joe@admin.com", trigger: :send_reset_password_token

Use let instead of an instance variable.
Open

          .to eq([Card::AnyoneSignedInID, Card::SharkID, @joe_user_card.id])

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

  context "signup form form" do

Use let instead of an instance variable.
Open

      expect(@account.password.length).to be > 10 # encrypted

Use let instead of an instance variable.
Open

      expect(@account.email).to eq("wolf@decko.org")

Use let instead of an instance variable.
Open

        @parties = @joe_user_card.parties # NOTE: must be called to test resets

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

      expect(@card).not_to be_ok(:read)

Missing top-level module documentation comment.
Open

  module Variants
Severity: Minor
Found in cardname/lib/cardname/variants.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

        expect(@signup.format.render_core).to have_tag "div.invite-links" do

Use let instead of an instance variable.
Open

      @account = @signup.account
Severity
Category
Status
Source
Language