Showing 436 of 436 total issues
Line is too long. [93/80] (https://github.com/voxable-labs/voxable-style-guide#80-character-limits) Open
Open
# @param referral [Facebook::Messenger::Incoming::Referral] The postback referral code.
- Create a ticketCreate a ticket
- Exclude checks
Missing method documentation comment. Open
Open
def initialize(action)
super("No route registered for action #{action}")
end
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for missing documentation comment for public methods. It can optionally be configured to also require documentation for non-public methods.
Example:
# bad
class Foo
def bar
puts baz
end
end
module Foo
def bar
puts baz
end
end
def foo.bar
puts baz
end
# good
class Foo
# Documentation
def bar
puts baz
end
end
module Foo
# Documentation
def bar
puts baz
end
end
# Documentation
def foo.bar
puts baz
end
if
condition requires an else
-clause. Open
Open
elsif args.first.is_a?(Class)
# ....deliver the chunk
chunk_class = args[0]
chunk_context = args[1] || {}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for if
expressions that do not have an else
branch.
SupportedStyles
if
Example:
# bad
if condition
statement
end
case
Example:
# bad
case var
when condition
statement
end
Example:
# good
if condition
statement
else
# the content of the else branch will be determined by Style/EmptyElse
end
Indent the first parameter one step more than the start of the previous line. Open
Open
intent: intent,
text: text,
not_handled: not_handled
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks the indentation of the first parameter in a method call. Parameters after the first one are checked by Style/AlignParameters, not by this cop.
Example:
# bad
some_method(
first_param,
second_param)
# good
some_method(
first_param,
second_param)
Unused block argument - k
. If it's necessary, use _
or _k
as an argument name to indicate that it won't be used. (https://github.com/voxable-labs/voxable-style-guide#underscore-unused-vars) Open
Open
params = nlu_response[:parameters].reject {|k, v| v.blank?}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for unused block arguments.
Example:
# bad
do_something do |used, unused|
puts used
end
do_something do |bar|
puts :foo
end
define_method(:foo) do |bar|
puts :baz
end
Example:
#good
do_something do |used, _unused|
puts used
end
do_something do
puts :foo
end
define_method(:foo) do |_bar|
puts :baz
end
Useless assignment to variable - request
. (https://github.com/voxable-labs/voxable-style-guide#underscore-unused-vars) Open
Open
request = Hg::Request.new(
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for every useless assignment to local variable in every
scope.
The basic idea for this cop was from the warning of ruby -cw
:
assigned but unused variable - foo
Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.
Example:
# bad
def some_method
some_var = 1
do_something
end
Example:
# good
def some_method
some_var = 1
do_something(some_var)
end
TODO found Open
Open
# TODO: Seems like we need a method for fetching params value.
- Create a ticketCreate a ticket
- Exclude checks
TODO found Open
Open
# TODO: BUG - @context is a class instance variable, this isn't going to work correctly
- Create a ticketCreate a ticket
- Exclude checks
BUG found Open
Open
# TODO: BUG - @context is a class instance variable, this isn't going to work correctly
- Create a ticketCreate a ticket
- Exclude checks
TODO found Open
Open
# TODO: BUG Thread.current isn't going to work in case of multiple routers
- Create a ticketCreate a ticket
- Exclude checks
TODO found Open
Open
# TODO: What should we do if attachments aren't recognized?
- Create a ticketCreate a ticket
- Exclude checks
TODO found Open
Open
# TODO: Move to Bot itself, default to User.
- Create a ticketCreate a ticket
- Exclude checks
TODO found Open
Open
# TODO: Make number of retries configurable.
- Create a ticketCreate a ticket
- Exclude checks
TODO found Open
Open
# TODO: Test that params or parameters works, here.
- Create a ticketCreate a ticket
- Exclude checks