firehoseio/firehose

View on GitHub

Showing 65 of 65 total issues

Useless assignment to variable - cm.
Open

        cm = channel_metrics(channel)
Severity: Minor
Found in lib/firehose/server/metrics.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

Useless assignment to variable - interval.
Open

      interval = ENV["METRICS_INTERVAL"].to_i
Severity: Minor
Found in lib/firehose/server.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

Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.
Open

        if buffer_size = env["HTTP_X_FIREHOSE_BUFFER_SIZE"]
Severity: Minor
Found in lib/firehose/rack/publisher.rb by rubocop

This cop checks for assignments in the conditions of if/while/until.

Example:

# bad

if some_var = true
  do_something
end

Example:

# good

if some_var == true
  do_something
end

Unused method argument - error. If it's necessary, use _ or _error as an argument name to indicate that it won't be used.
Open

      def self.handle_parse_error(request, body, error)
Severity: Minor
Found in lib/firehose/rack/consumer.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.
Open

            if channel_names = msg[:multiplex_unsubscribe]

This cop checks for assignments in the conditions of if/while/until.

Example:

# bad

if some_var = true
  do_something
end

Example:

# good

if some_var == true
  do_something
end

Unused method argument - event. If it's necessary, use _ or _event as an argument name to indicate that it won't be used. You can also write as open(*) if you want the method to accept any arguments but don't care about them.
Open

          def open(event)

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.
Open

        if interval = options[:interval]
Severity: Minor
Found in lib/firehose/cli.rb by rubocop

This cop checks for assignments in the conditions of if/while/until.

Example:

# bad

if some_var = true
  do_something
end

Example:

# good

if some_var == true
  do_something
end

Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.
Open

          if realIp = env["HTTP_X_FORWARDED_FOR"]

This cop checks for assignments in the conditions of if/while/until.

Example:

# bad

if some_var = true
  do_something
end

Example:

# good

if some_var == true
  do_something
end

TODO found
Open

            # TODO - 'harden' this up with a GET request and throw a "Bad Request"
Severity: Minor
Found in lib/firehose/rack/app.rb by fixme

TODO found
Open

# TODO - Figure if we need to have an if/else for Rails::Engine loading and Firehose::Assets::Sprockets.auto_detect
Severity: Minor
Found in lib/firehose.rb by fixme

TODO found
Open

        # TODO I think this can be cleaned up so the top-level if/else can be ditched.
Severity: Minor
Found in lib/firehose/cli.rb by fixme

TODO found
Open

        # TODO: Instead of just raising an exception, it would probably be better
Severity: Minor
Found in lib/firehose/server/subscriber.rb by fixme

TODO found
Open

        # TODO -ARRRG!!!! We can't listen to deferrables here. Need to expose those

TODO found
Open

      # TODO - Replace the integration test clients with these guys. You'll want to refactor each
Severity: Minor
Found in lib/firehose/client/consumer.rb by fixme

TODO found
Open

      # TODO - This won't even work. Dropping ws:// above until this is tested. This thing
Severity: Minor
Found in lib/firehose/client/consumer.rb by fixme

TODO found
Open

        # TODO - Fix ws:// transport! See class WebSocket below to udnerstand
Severity: Minor
Found in lib/firehose/client/consumer.rb by fixme

TODO found
Open

# TODO - Spec this thing out. Unfortunately its not tested at all, mostly because the JSON client
Severity: Minor
Found in lib/firehose/client/consumer.rb by fixme

TODO found
Open

        # TODO hi-redis isn't that awesome... we have to setup an errback per even for wrong
Severity: Minor
Found in lib/firehose/server/publisher.rb by fixme

TODO found
Open

      # TODO: Make this FAR more robust. Ideally we'd whitelist the permitted
Severity: Minor
Found in lib/firehose/server/publisher.rb by fixme

TODO found
Open

        # TODO: See if we can just set Thin to use Firehose.logger instead of
Severity: Minor
Found in lib/firehose/server/app.rb by fixme
Severity
Category
Status
Source
Language