Showing 842 of 1,379 total issues
Method limits_change_callback
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def limits_change_callback(packet, item, old_limits_state, value, log_change)
return if @cancel_thread
# Make a copy because packet_time is frozen
packet_time = packet.packet_time.dup
if value
Method wait
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def wait(*args, type: :CONVERTED, quiet: false, scope: $openc3_scope, token: $openc3_token)
time_diff = nil
case args.length
# wait() # indefinitely until they click Go
Method read_packet
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def read_packet(packet)
if @response_template && @response_packet
# If lines make it this far they are part of a response
@response_packets << packet
return :STOP if @response_packets.length < (@ignore_lines + @response_lines)
Method formatted
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def formatted(
word_size = 1,
words_per_line = 16,
word_separator = ' ',
indent = 0,
Consider simplifying this complex logical expression. Open
Open
if (
instance.cycle_time
and (utc_now - instance.start_time).total_seconds() > instance.cycle_time
):
Logger.debug("Log writer start new file due to cycle time")
Method sync_system_thread_body
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.sync_system_thread_body(scope:, block_ms: nil)
telemetry = System.telemetry.all
topics = ["#{scope}__openc3_limits_events"]
Topic.read_topics(topics, nil, block_ms) do |_topic, _msg_id, event, _redis|
event = JSON.parse(event['event'], :allow_nan => true, :create_additions => true)
Method <=>
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def <=>(other)
return nil unless other.kind_of?(StructureItem)
other_original_bit_offset = other.original_bit_offset
Method linc_interface_command
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def linc_interface_command(packet)
if @error_ignore_commands
@error_ignore_commands.each do |error_ignore_command|
if error_ignore_command.identify?(packet.buffer(false))
linc_cmd = error_ignore_command.clone
Method ensure_public
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def ensure_public(bucket)
unless ENV['OPENC3_NO_BUCKET_POLICY']
policy = <<~EOL
{
"Version": "2012-10-17",
Function set_limits
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def set_limits(
Function __init__
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Method initialize
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
write_termination_characters,
read_termination_characters,
ignore_lines = 0,
initial_read_delay = nil,
response_lines = 1,
Method write_interface
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def write_interface(data, extra = nil)
extra ||= {}
queries = extra['HTTP_QUERIES']
queries ||= {}
headers = extra['HTTP_HEADERS']
Method write_item_internal
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.write_item_internal(item, value, decoded)
return nil if item.data_type == :DERIVED
# Save traversal state
parent_node = nil
Method list_files
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def list_files(bucket:, path:, only_directories: false, metadata: false)
# Trailing slash is important in AWS S3 when listing files
# See https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Types/ListObjectsV2Output.html#common_prefixes-instance_method
if path[-1] != '/'
path += '/'
Method parse_options
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def parse_options(options)
settings = {}
if options.include?('manual')
settings['Manual'] = true
$manual = true
Function copy
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function copy(acediff, e, dir) {
const diffIndex = parseInt(e.target.getAttribute('data-diff-index'), 10)
const diff = acediff.diffs[diffIndex]
let sourceEditor
let targetEditor
Function diff
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff() {
const dmp = new diff_match_patch()
const val1 = this.editors.left.ace.getSession().getValue()
const val2 = this.editors.right.ace.getSession().getValue()
// Main diff method that calculates the diffs
Function __init__
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def __init__(
self,
write_port,
read_port,
write_timeout,