Showing 842 of 1,379 total issues
Avoid deeply nested control flow statements. Open
Open
for theFilename in input:
file = _get_storage_file(
f"tmp/{theFilename}", scope=RunningScript.instance.scope
)
Avoid deeply nested control flow statements. Open
Open
if type == 'reject_subscription'
raise "Subscription Rejected"
end
Method raise_critical_cmd_error
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def self.raise_critical_cmd_error(msg_hash, username, target_name, cmd_name, cmd_params, cmd_string)
Avoid deeply nested control flow statements. Open
Open
if @interface_or_router == 'INTERFACE'
@metric.set(name: 'interface_tlm_total', value: @count, type: 'counter')
else
@metric.set(name: 'router_cmd_total', value: @count, type: 'counter')
end
Method set_comm_timeouts
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def self.set_comm_timeouts(handle, read_interval_timeout = 4294967295, read_total_timeout_multiplier = 0, read_total_timeout_constant = 0, write_total_timeout_multiplier = 0, write_total_timeout_constant = 0)
Avoid deeply nested control flow statements. Open
Open
break if @cancel_thread
Method write_all_entries
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def write_all_entries(reducer_state, plw, type, target_name, stored, throttle = nil)
Method write_entry
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def write_entry(state, plw, type, target_name, packet_name, stored)
Avoid deeply nested control flow statements. Open
Open
if value > green_low
limits_state = :BLUE
else
limits_state = :GREEN_LOW
end
Method _log_cmd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _log_cmd(target_name, cmd_name, cmd_params, raw, no_range, no_hazardous)
Avoid deeply nested control flow statements. Open
Open
if timeout
end_time = Time.now
if (start_time - end_time) > timeout
raise Timeout::Error, "No Data Timeout"
end
Avoid deeply nested control flow statements. Open
Open
if defined? RunningScript and RunningScript.instance
raise StopScript if RunningScript.instance.stop?
end
Avoid deeply nested control flow statements. Open
Open
raise ArgumentError, "#{@name}: minimum must be a Float but is a #{@range.first.class}" unless Float === @range.first or Integer === @range.first
Avoid deeply nested control flow statements. Open
Open
if sync_index != 0
log_discard(sync_index, true)
# Delete Data Before Sync Pattern
@data.replace(@data[sync_index..-1])
end
Method initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def initialize(write_port,
read_port,
write_timeout,
read_timeout,
protocol_type = nil,
Avoid deeply nested control flow statements. Open
Open
if not other.variable_bit_size
return -1
end
Method deploy_decom_microservice
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def deploy_decom_microservice(target, gem_path, variables, topics, instance = nil, parent = nil)
Method append_item
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def append_item(name, bit_size, data_type, array_size = nil, endianness = @default_endianness, overflow = :ERROR)
Avoid deeply nested control flow statements. Open
Open
if type.initialValue.upcase.start_with?("0X")
item.default = type.initialValue.hex_to_byte_string
else
# Strip quotes from strings
if type.initialValue[0] == '"' && type.initialValue[-1] == '"'
Avoid deeply nested control flow statements. Open
Open
elsif other.variable_bit_size
return 1