Showing 1,476 of 1,476 total issues
Class has too many lines. [658/100] Open
class Api
include Utils
DEFAULT_STEEM_URL = 'https://api.steemit.com'
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [306/100] Open
class Stream < Api
# @private
INITIAL_TIMEOUT = 0.0200
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for method_missing is too high. [160.8/15] Open
def method_missing(m, *args, &block)
super unless respond_to_missing?(m)
current_rpc_id = rpc_id
method_name = [api_name, m].join('.')
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Method has too many lines. [149/10] Open
def method_missing(m, *args, &block)
super unless respond_to_missing?(m)
current_rpc_id = rpc_id
method_name = [api_name, m].join('.')
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [262/100] Open
class Transaction
include ChainConfig
include Utils
VALID_OPTIONS = %w(
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method method_missing
has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring. Open
def method_missing(m, *args, &block)
super unless respond_to_missing?(m)
current_rpc_id = rpc_id
method_name = [api_name, m].join('.')
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method blocks
has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring. Open
def blocks(start = nil, mode = :irreversible, max_blocks_per_node = MAX_BLOCKS_PER_NODE, &block)
reset_api
replay = !!start
counter = 0
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Class has too many lines. [178/100] Open
class ErrorParser
include Utils
attr_reader :response, :error, :error_code, :error_message,
:api_name, :api_method, :api_params,
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Class has too many lines. [168/100] Open
class Chain
include Mixins::ActsAsPoster
include Mixins::ActsAsVoter
include Mixins::ActsAsWallet
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
File api.rb
has 669 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'uri'
require 'base64'
require 'hashie'
require 'hashie/logger'
require 'openssl'
Method has too many lines. [98/10] Open
def parse_error_response
if response.nil?
@expiry = false
@can_retry = false
@can_reprepare = false
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method has too many lines. [94/10] Open
def blocks(start = nil, mode = :irreversible, max_blocks_per_node = MAX_BLOCKS_PER_NODE, &block)
reset_api
replay = !!start
counter = 0
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Module has too many lines. [146/100] Open
module OperationTypes
TYPES = {
transfer: {
amount: Hive::Type::Amount
},
- Read upRead up
- Exclude checks
This cop checks if the length a module exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for parse_error_response is too high. [91.95/15] Open
def parse_error_response
if response.nil?
@expiry = false
@can_retry = false
@can_reprepare = false
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Module has too many lines. [137/100] Open
module Utils
def extract_signatures(options)
return [] unless defined? options[:params].map
params = options[:params]
- Read upRead up
- Exclude checks
This cop checks if the length a module exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for blocks is too high. [87.25/15] Open
def blocks(start = nil, mode = :irreversible, max_blocks_per_node = MAX_BLOCKS_PER_NODE, &block)
reset_api
replay = !!start
counter = 0
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Class has too many lines. [113/100] Open
class BaseSteemSmartContractRPC
# @private
POST_HEADERS = {
'Content-Type' => 'application/json',
'User-Agent' => Radiator::AGENT_ID
- Read upRead up
- Exclude checks
This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method has too many lines. [68/10] Open
def initialize(options = {})
@user = options[:user]
@password = options[:password]
@chain = (options[:chain] || 'hive').to_sym
@url = options[:url] || Api::default_url(@chain)
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Block has too many lines. [121/25] Open
loop do
tries += 1
if tries > 5 && flappy? && !check_file_open?
raise ApiError, 'PANIC: Out of file resources'
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Assignment Branch Condition size for initialize is too high. [63.8/15] Open
def initialize(options = {})
@user = options[:user]
@password = options[:password]
@chain = (options[:chain] || 'hive').to_sym
@url = options[:url] || Api::default_url(@chain)
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric