inertia186/radiator

View on GitHub
lib/radiator/ssc/stream.rb

Summary

Maintainability
A
0 mins
Test Coverage

Trailing whitespace detected.
Open

      
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Trailing whitespace detected.
Open

      
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Trailing whitespace detected.
Open

    # 
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Trailing whitespace detected.
Open

      # 
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Trailing whitespace detected.
Open

      # 
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Trailing whitespace detected.
Open

      
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Trailing whitespace detected.
Open

      # 
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Trailing whitespace detected.
Open

          
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Use && instead of and.
Open

            sleep MIN_BLOCK_PRODUCTION and next
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

This cop checks for uses of and and or, and suggests using && and || instead. It can be configured to check only in conditions, or in all contexts.

Example: EnforcedStyle: always (default)

# bad
foo.save and return

# bad
if foo and bar
end

# good
foo.save && return

# good
if foo && bar
end

Example: EnforcedStyle: conditionals

# bad
if foo and bar
end

# good
foo.save && return

# good
foo.save and return

# good
if foo && bar
end

Trailing whitespace detected.
Open

          
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Trailing whitespace detected.
Open

        
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Trailing whitespace detected.
Open

      # 
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Line is too long. [124/80]
Open

      # @option options [String] :url Specify the full node end-point.  Default: https://api.steem-engine.net/rpc/blockchain
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
Open

          if block.nil?
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Checks for if and unless statements that would fit on one line if written as a modifier if/unless. The maximum line length is configured in the Metrics/LineLength cop.

Example:

# bad
if condition
  do_stuff(bar)
end

unless qux.empty?
  Foo.do_something
end

# good
do_stuff(bar) if condition
Foo.do_something unless qux.empty?

Line is too long. [81/80]
Open

      # @option options [Integer] :at_block_num start stream at this block number
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Trailing whitespace detected.
Open

          
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Line is too long. [81/80]
Open

      # @option options [Integer] :at_block_num start stream at this block number
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

Shadowing outer local variable - block.
Open

        blocks(options) do |block, block_num|
Severity: Minor
Found in lib/radiator/ssc/stream.rb by rubocop

This cop looks for use of the same name as outer local variables for block arguments or block local variables. This is a mimic of the warning "shadowing outer local variable - foo" from ruby -cw.

Example:

# bad

def some_method
  foo = 1

  2.times do |foo| # shadowing outer `foo`
    do_something(foo)
  end
end

Example:

# good

def some_method
  foo = 1

  2.times do |bar|
    do_something(bar)
  end
end

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

      def transactions(options = {}, &block)
Severity: Minor
Found in lib/radiator/ssc/stream.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

There are no issues that match your filters.

Category
Status