AdrieanKhisbe/velibe

View on GitHub

Showing 24 of 24 total issues

Unused block argument - s. You can omit the argument if you don't care about it.
Open

        force = (ARGV[2..-1]||[]).any? { |s| /-(f|-force)/ }
Severity: Minor
Found in bin/velibe by rubocop

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

        end
Severity: Minor
Found in lib/velibe/db/kv_store.rb by rubocop

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

  Velibe::KvStore.reset_favorite_stations *pattern.split(', ')

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

    KvStore.add_favorite_station *stations
Severity: Minor
Found in lib/velibe.rb by rubocop

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

  # TODO: try catch network exception
Severity: Minor
Found in lib/velibe.rb by fixme

FIXME found
Open

  # FIXME: text display from there
Severity: Minor
Found in lib/velibe.rb by fixme

FIXME found
Open

    # FIXME: ensure backup!! [store in history array]
Severity: Minor
Found in lib/velibe.rb by fixme

TODO found
Open

  # TODO lazy singleton!!
Severity: Minor
Found in lib/velibe.rb by fixme

TODO found
Open

      # TODO: sanity check of jzon
Severity: Minor
Found in lib/velibe/station_status.rb by fixme

TODO found
Open

      # TODO: voir si objet de base marche
Severity: Minor
Found in lib/velibe/db/models.rb by fixme

FIXME found
Open

                 (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
Severity: Minor
Found in .rubocop.yml by fixme

HACK found
Open

                 (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
Severity: Minor
Found in .rubocop.yml by fixme

TODO found
Open

      # TODO: creation Timestamp
Severity: Minor
Found in lib/velibe/station_status.rb by fixme

TODO found
Open

      # TODO: handle setup
Severity: Minor
Found in lib/velibe/db/kv_store.rb by fixme

TODO found
Open

  # TODO extract cli class, and include!
Severity: Minor
Found in lib/velibe.rb by fixme

TODO found
Open

    # TODO: maybe extract in Trajet: + method: velo dispo, stand dispo
Severity: Minor
Found in lib/velibe/station_status.rb by fixme

TODO found
Open

      # TODO: check existing station
Severity: Minor
Found in lib/velibe/db/kv_store.rb by fixme

FIXME found
Open

    # FIXME: replace comment with doc
Severity: Minor
Found in lib/velibe/station_status.rb by fixme

TODO found
Open

        nil # TODO: maybe raise error! (and handle 404, and no internet)
Severity: Minor
Found in lib/velibe/api_velib.rb by fixme

TODO found
Open

require 'velibe/db/kv_store' # TODO: refactor injection?
Severity: Minor
Found in lib/velibe/api_velib.rb by fixme
Severity
Category
Status
Source
Language