decko-commons/decko

View on GitHub

Showing 667 of 699 total issues

Missing top-level module documentation comment.
Open

    module Merging

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 Mysql2Adapter

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

Line is too long. [96/90]
Open

  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.

Remove debugger entry point binding.pry.
Open

    binding.pry
Severity: Minor
Found in decko/features/support/debugger.rb by rubocop

This cop checks for calls to debugger or pry.

Example:

# bad (ok during development)

# using pry
def some_method
  binding.pry
  do_something
end

Example:

# bad (ok during development)

# using byebug
def some_method
  byebug
  do_something
end

Example:

# good

def some_method
  do_something
end

Re-enable Lint/AmbiguousRegexpLiteral cop with # rubocop:enable after disabling it.
Open

# rubocop:disable Lint/AmbiguousRegexpLiteral

Missing top-level class documentation comment.
Open

  class Engine < ::Rails::Engine
Severity: Minor
Found in decko/lib/decko/engine.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

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

    context "css" do

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

    context "js" do

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

  context "html format" do
Severity: Minor
Found in card/spec/card/diff_spec.rb by rubocop

Redundant curly braces around a hash parameter.
Open

        expect({ d: :e }.bury(:a, :b, 4)).to eq({ a: { b: 4 }, d: :e })

This cop checks for braces around the last parameter in a method call if the last parameter is a hash. It supports braces, no_braces and context_dependent styles.

Example: EnforcedStyle: braces

# The `braces` style enforces braces around all method
# parameters that are hashes.

# bad
some_method(x, y, a: 1, b: 2)

# good
some_method(x, y, {a: 1, b: 2})

Example: EnforcedStyle: no_braces (default)

# The `no_braces` style checks that the last parameter doesn't
# have braces around it.

# bad
some_method(x, y, {a: 1, b: 2})

# good
some_method(x, y, a: 1, b: 2)

Example: EnforcedStyle: context_dependent

# The `context_dependent` style checks that the last parameter
# doesn't have braces around it, but requires braces if the
# second to last parameter is also a hash literal.

# bad
some_method(x, y, {a: 1, b: 2})
some_method(x, y, {a: 1, b: 2}, a: 1, b: 2)

# good
some_method(x, y, a: 1, b: 2)
some_method(x, y, {a: 1, b: 2}, {a: 1, b: 2})

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

      context "called on Integer" do

Use meaningful heredoc delimiters.
Open

END_TAG

This cop checks that your heredocs are using meaningful delimiters. By default it disallows END and EO*, and can be configured through blacklisting additional delimiters.

Example:

# good
<<-SQL
  SELECT * FROM foo
SQL

# bad
<<-END
  SELECT * FROM foo
END

# bad
<<-EOS
  SELECT * FROM foo
EOS

Use SCREAMING_SNAKE_CASE for constants.
Open

Decko::ModsSpecHelper = :needs_a_value_so_spring_loader_is_happy
Severity: Minor
Found in decko/lib/decko/mods_spec_helper.rb by rubocop

This cop checks whether constant names are written using SCREAMINGSNAKECASE.

To avoid false positives, it ignores cases in which we cannot know for certain the type of value that would be assigned to a constant.

Example:

# bad
InchInCm = 2.54
INCHinCM = 2.54
Inch_In_Cm = 2.54

# good
INCH_IN_CM = 2.54

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

    context "view = new" do

The second argument to describe should be the method being tested. '#instance' or '.class'.
Open

RSpec.describe CardController, "location test from old integration" do

Prefer have_received for setting message expectations. Setup store as a spy using allow or instance_spy.
Open

      expect(store).to receive(:read).with("#{prefix}/foo")
Severity: Minor
Found in card/spec/card/cache_spec.rb by rubocop

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

  context "pointer format" do
Severity: Minor
Found in card/spec/card/diff_spec.rb by rubocop

Line is too long. [125/90]
Open

  #  watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$})   { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
Severity: Minor
Found in decko/Guardfile by rubocop

Missing top-level module documentation comment.
Open

module NavigationHelpers
Severity: Minor
Found in decko/features/support/paths.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 class documentation comment.
Open

        class Flagger

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