lib/radiator/ssc/stream.rb
Trailing whitespace detected. Open
Open
- Exclude checks
Trailing whitespace detected. Open
Open
- Exclude checks
Trailing whitespace detected. Open
Open
#
- Exclude checks
Trailing whitespace detected. Open
Open
#
- Exclude checks
Trailing whitespace detected. Open
Open
#
- Exclude checks
Trailing whitespace detected. Open
Open
- Exclude checks
Trailing whitespace detected. Open
Open
#
- Exclude checks
Trailing whitespace detected. Open
Open
- Exclude checks
Use &&
instead of and
. Open
Open
sleep MIN_BLOCK_PRODUCTION and next
- Read upRead up
- Exclude checks
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
Open
- Exclude checks
Trailing whitespace detected. Open
Open
- Exclude checks
Trailing whitespace detected. Open
Open
#
- Exclude checks
Line is too long. [124/80] Open
Open
# @option options [String] :url Specify the full node end-point. Default: https://api.steem-engine.net/rpc/blockchain
- Exclude checks
Favor modifier if
usage when having a single-line body. Another good alternative is the usage of control flow &&
/||
. Open
Open
if block.nil?
- Read upRead up
- Exclude checks
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
Open
# @option options [Integer] :at_block_num start stream at this block number
- Exclude checks
Trailing whitespace detected. Open
Open
- Exclude checks
Line is too long. [81/80] Open
Open
# @option options [Integer] :at_block_num start stream at this block number
- Exclude checks
Shadowing outer local variable - block
. Open
Open
blocks(options) do |block, block_num|
- Read upRead up
- Exclude checks
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
Open
def transactions(options = {}, &block)
- Read upRead up
- Exclude checks
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