Showing 842 of 1,379 total issues
Method initialize
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize
@name = self.class.to_s.split("::")[-1] # Remove namespacing if present
@state = 'DISCONNECTED'
@target_names = []
@cmd_target_names = []
Method initialize
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(
hostname,
write_dest_port,
read_port,
write_src_port = nil,
Method initialize
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(poly, seed, xor, reflect)
@poly = poly
@seed = seed
@xor = xor
@reflect = reflect
Method next_packet_and_topic
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def next_packet_and_topic
next_time = nil
next_reader = nil
closed_readers = nil
@open_readers.each do |reader|
Method files
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def files
return unless authorization('system')
root = ENV[params[:root]] # Get the actual bucket / volume name
raise "Unknown bucket / volume #{params[:root]}" unless root
results = []
Method index
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def index
OpenC3::Logger.debug("request for aggregator metrics")
begin
scopes = OpenC3::ScopeModel.names()
rescue RuntimeError => e
Function data
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
data() {
return {
curValue: null,
prevValue: null,
grayLevel: 80,
Function deleteItem
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
deleteItem(item) {
let start = null
let api = ''
switch (item.type.toLowerCase()) {
case 'activity':
Method _wait_tolerance_process_args
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def _wait_tolerance_process_args(args)
case args.length
when 4, 5
target_name, packet_name, item_name = extract_fields_from_tlm_text(args[0])
expected_value = args[1]
Method process_result
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_result(results)
openc3_lib = Regexp.new(File.join(OpenC3::PATH, 'lib'))
# If we were passed an array we concat it to the results global
if results.is_a? Array
@results.concat(results)
Method initialize
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(
name:,
config_params: [],
target_names: [],
cmd_target_names: [],
Method handle_sync_pattern
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def handle_sync_pattern
if @sync_pattern and @sync_state == :SEARCHING
loop do
# Make sure we have some data to look for a sync word in
return :STOP if @data.length < @sync_pattern.length
Method connect
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def connect
@cancel_threads = false
@read_queue.clear if @read_queue
if @write_port == @read_port # One socket
start_listen_thread(@read_port, true, true)
Method retrieve
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def retrieve(client = @bucket, uncompress = true)
@mutex.synchronize do
local_path = "#{BucketFileCache.instance.cache_dir}/#{File.basename(@bucket_path)}"
unless File.exist?(local_path)
OpenC3::Logger.debug "Retrieving #{@bucket_path} from logs bucket"
Method generate_widget
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.generate_widget(args)
if args.length < 2 or args.length > 3
abort("Usage: cli generate #{args[0]} <SuperdataWidget> (--ruby or --python)")
end
# Per https://stackoverflow.com/a/47591707/453280
Method setup_thread_body
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def setup_thread_body
# The goal of this mode is to determine if we are starting with files or from
# realtime
if @start_time
# start_time can be at most 1 minute in the future to prevent
Method add
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def add(data)
# OpenC3::Logger.debug "start:#{Time.at(data["start_time"].to_i/1_000_000_000.0).formatted}" if data["start_time"]
# OpenC3::Logger.debug "end:#{Time.at(data["end_time"].to_i/1_000_000_000.0).formatted}" if data["end_time"]
@mutex.synchronize do
# Preprocess request fields
Function __init__
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function define_item
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def define_item(
Function formatted
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def formatted(