Showing 667 of 699 total issues
Missing top-level module documentation comment. Open
module Merging
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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.
- Create a ticketCreate a ticket
- Exclude checks
Remove debugger entry point binding.pry
. Open
binding.pry
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
- Create a ticketCreate a ticket
- Exclude checks
Missing top-level class documentation comment. Open
class Engine < ::Rails::Engine
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
- Create a ticketCreate a ticket
- Exclude checks
Start context description with 'when', 'with', or 'without'. Open
context "js" do
- Create a ticketCreate a ticket
- Exclude checks
Start context description with 'when', 'with', or 'without'. Open
context "html format" do
- Create a ticketCreate a ticket
- Exclude checks
Redundant curly braces around a hash parameter. Open
expect({ d: :e }.bury(:a, :b, 4)).to eq({ a: { b: 4 }, d: :e })
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
- Create a ticketCreate a ticket
- Exclude checks
Use meaningful heredoc delimiters. Open
END_TAG
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
- Create a ticketCreate a ticket
- Exclude checks
The second argument to describe should be the method being tested. '#instance' or '.class'. Open
RSpec.describe CardController, "location test from old integration" do
- Create a ticketCreate a ticket
- Exclude checks
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")
- Create a ticketCreate a ticket
- Exclude checks
Start context description with 'when', 'with', or 'without'. Open
context "pointer format" do
- Create a ticketCreate a ticket
- Exclude checks
Line is too long. [125/90] Open
# watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
- Create a ticketCreate a ticket
- Exclude checks
Missing top-level module documentation comment. Open
module NavigationHelpers
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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