Showing 24 of 24 total issues
Unused block argument - s
. You can omit the argument if you don't care about it. Open
Open
force = (ARGV[2..-1]||[]).any? { |s| /-(f|-force)/ }
- Read upRead up
- 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
end
at 40, 8 is not aligned with stations.collect(&:to_i).each do |station|
at 38, 6. Open
Open
end
- Read upRead up
- Exclude checks
This cop checks whether the end keywords are aligned properly for do end blocks.
Three modes are supported through the EnforcedStyleAlignWith
configuration parameter:
start_of_block
: the end
shall be aligned with the
start of the line where the do
appeared.
start_of_line
: the end
shall be aligned with the
start of the line where the expression started.
either
(which is the default) : the end
is allowed to be in either
location. The autofixer will default to start_of_line
.
Example: EnforcedStyleAlignWith: either (default)
# bad
foo.bar
.each do
baz
end
# good
variable = lambda do |i|
i
end
Example: EnforcedStyleAlignWith: startofblock
# bad
foo.bar
.each do
baz
end
# good
foo.bar
.each do
baz
end
Example: EnforcedStyleAlignWith: startofline
# bad
foo.bar
.each do
baz
end
# good
foo.bar
.each do
baz
end
Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the *
if it should be a multiplication. Open
Open
Velibe::KvStore.reset_favorite_stations *pattern.split(', ')
- Read upRead up
- Exclude checks
This cop checks for ambiguous operators in the first argument of a method invocation without parentheses.
Example:
# bad
# The `*` is interpreted as a splat operator but it could possibly be
# a `*` method invocation (i.e. `do_something.*(some_array)`).
do_something *some_array
Example:
# good
# With parentheses, there's no ambiguity.
do_something(*some_array)
Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the *
if it should be a multiplication. Open
Open
KvStore.add_favorite_station *stations
- Read upRead up
- Exclude checks
This cop checks for ambiguous operators in the first argument of a method invocation without parentheses.
Example:
# bad
# The `*` is interpreted as a splat operator but it could possibly be
# a `*` method invocation (i.e. `do_something.*(some_array)`).
do_something *some_array
Example:
# good
# With parentheses, there's no ambiguity.
do_something(*some_array)
TODO found Open
Open
# TODO: try catch network exception
- Exclude checks
FIXME found Open
Open
# FIXME: text display from there
- Exclude checks
FIXME found Open
Open
# FIXME: ensure backup!! [store in history array]
- Exclude checks
TODO found Open
Open
# TODO lazy singleton!!
- Exclude checks
TODO found Open
Open
# TODO: sanity check of jzon
- Exclude checks
TODO found Open
Open
# TODO: voir si objet de base marche
- Exclude checks
FIXME found Open
Open
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
- Exclude checks
HACK found Open
Open
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
- Exclude checks
TODO found Open
Open
# TODO: creation Timestamp
- Exclude checks
TODO found Open
Open
# TODO: handle setup
- Exclude checks
TODO found Open
Open
# TODO extract cli class, and include!
- Exclude checks
TODO found Open
Open
# TODO: maybe extract in Trajet: + method: velo dispo, stand dispo
- Exclude checks
TODO found Open
Open
# TODO: check existing station
- Exclude checks
FIXME found Open
Open
# FIXME: replace comment with doc
- Exclude checks
TODO found Open
Open
nil # TODO: maybe raise error! (and handle 404, and no internet)
- Exclude checks
TODO found Open
Open
require 'velibe/db/kv_store' # TODO: refactor injection?
- Exclude checks