voxable-labs/hg

View on GitHub

Showing 436 of 436 total issues

Line is too long. [93/80] (https://github.com/voxable-labs/voxable-style-guide#80-character-limits)
Open

      # @param referral [Facebook::Messenger::Incoming::Referral] The postback referral code.
Severity: Minor
Found in lib/hg/workers/base.rb by rubocop

Missing method documentation comment.
Open

      def initialize(action)
        super("No route registered for action #{action}")
      end
Severity: Minor
Found in lib/hg/router.rb by rubocop

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

      elsif args.first.is_a?(Class)
        # ....deliver the chunk
        chunk_class = args[0]
        chunk_context = args[1] || {}

Severity: Minor
Found in lib/hg/controller.rb by rubocop

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

                           intent: intent,
                           text: text,
                           not_handled: not_handled
Severity: Minor
Found in lib/hg/workers/base.rb by rubocop

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

          params = nlu_response[:parameters].reject {|k, v| v.blank?}
Severity: Minor
Found in lib/hg/workers/base.rb 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

Useless assignment to variable - request. (https://github.com/voxable-labs/voxable-style-guide#underscore-unused-vars)
Open

        request = Hg::Request.new(
Severity: Minor
Found in lib/hg/workers/base.rb by rubocop

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

      # TODO: which logger?
Severity: Minor
Found in lib/hg/api_ai_client.rb by fixme

TODO found
Open

      # TODO: Seems like we need a method for fetching params value.
Severity: Minor
Found in lib/hg/controller.rb by fixme

TODO found
Open

  # TODO: Add description
Severity: Minor
Found in hg.gemspec by fixme

TODO found
Open

          # TODO: BUG - @context is a class instance variable, this isn't going to work correctly
Severity: Minor
Found in lib/hg/chunk.rb by fixme

BUG found
Open

          # TODO: BUG - @context is a class instance variable, this isn't going to work correctly
Severity: Minor
Found in lib/hg/chunk.rb by fixme

TODO found
Open

        # TODO: BUG Thread.current isn't going to work in case of multiple routers
Severity: Minor
Found in lib/hg/router.rb by fixme

TODO found
Open

            # TODO: What should we do if attachments aren't recognized?
Severity: Minor
Found in app/workers/hg/message_worker.rb by fixme

TODO found
Open

  # TODO: Move to Bot itself, default to User.
Severity: Minor
Found in lib/hg.rb by fixme

TODO found
Open

    # TODO: Make number of retries configurable.
Severity: Minor
Found in app/workers/hg/postback_worker.rb by fixme

TODO found
Open

# TODO: test
Severity: Minor
Found in lib/hg/queues/queue.rb by fixme

TODO found
Open

        # TODO: text needs a better name
Severity: Minor
Found in lib/hg/chunk.rb by fixme

TODO found
Open

      # TODO: Test that params or parameters works, here.
Severity: Minor
Found in lib/hg/controller.rb by fixme

TODO found
Open

    # TODO: Document & test

TODO found
Open

    # TODO: Document these params
Severity: Minor
Found in lib/hg/controller.rb by fixme
Severity
Category
Status
Source
Language