Showing 842 of 1,379 total issues
Method xtce_process_element
has 267 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def xtce_process_element(element)
if XTCE_IGNORED_ELEMENTS.include?(element.name)
return false
end
Method run
has 216 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run
InterfaceTopic.receive_commands(@interface, scope: @scope) do |topic, msg_id, msg_hash, _redis|
OpenC3.with_context(msg_hash) do
release_critical = false
msgid_seconds_from_epoch = msg_id.split('-')[0].to_i / 1000.0
Method write
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.write(value, bit_offset, bit_size, data_type, buffer, endianness, overflow)
given_bit_offset = bit_offset
given_bit_size = bit_size
bit_offset = check_bit_offset_and_size(:write, given_bit_offset, given_bit_size, data_type, buffer)
Method write_array
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.write_array(values, bit_offset, bit_size, data_type, array_size, buffer, endianness, overflow)
# Save given values of bit offset, bit size, and array_size
given_bit_offset = bit_offset
given_bit_size = bit_size
given_array_size = array_size
Method process_current_packet
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_current_packet(parser, keyword, params)
case keyword
# Select or delete an item in the current packet
when 'SELECT_PARAMETER', 'SELECT_ITEM', 'DELETE_PARAMETER', 'DELETE_ITEM'
Method read
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def read(count_100hz, time)
pending_packets = get_pending_packets(count_100hz)
pending_packets.each do |packet|
case packet.packet_name
Method process_current_item
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_current_item(parser, keyword, params)
case keyword
# Add a state to the current telemety item
when 'STATE'
Function diff_cleanupMerge
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.diff_cleanupMerge = function (diffs) {
// Add a dummy entry at the end.
diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''))
var pointer = 0
var count_delete = 0
Method read
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.read(bit_offset, bit_size, data_type, buffer, endianness)
given_bit_offset = bit_offset
given_bit_size = bit_size
bit_offset = check_bit_offset_and_size(:read, given_bit_offset, given_bit_size, data_type, buffer)
Method read_array
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.read_array(bit_offset, bit_size, data_type, array_size, buffer, endianness)
# Save given values of bit offset, bit size, and array_size
given_bit_offset = bit_offset
given_bit_size = bit_size
given_array_size = array_size
Function AceDiff
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function AceDiff(options = {}) {
// Ensure instance is a constructor with `new`
if (!(this instanceof AceDiff)) {
return new AceDiff(options)
}
Method install_phase2
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.install_phase2(plugin_hash, scope:, gem_file_path: nil, validate_only: false)
# Register plugin to aid in uninstall if install fails
plugin_hash.delete("existing_plugin_txt_lines")
plugin_model = PluginModel.new(**(plugin_hash.transform_keys(&:to_sym)), scope: scope)
plugin_model.create unless validate_only
Method handle_config
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def handle_config(parser, keyword, parameters)
case keyword
when 'CMD_BUFFER_DEPTH'
parser.verify_num_parameters(1, 1, "#{keyword} <Number of commands to buffer to ensure logged in order>")
@cmd_buffer_depth = parameters[0].to_i
Function diff_cleanupSemantic
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.diff_cleanupSemantic = function (diffs) {
var changes = false
var equalities = [] // Stack of indices where equalities are found.
var equalitiesLength = 0 // Keeping our own length var is faster in JS.
/** @type {?string} */
Method read
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def read(identify_and_define = true)
# Read entry length
length = @file.read(4)
return nil if !length or length.length <= 0
Method write_entry
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def write_entry(entry_type, cmd_or_tlm, target_name, packet_name, time_nsec_since_epoch, stored, data, id, received_time_nsec_since_epoch: nil, extra: nil)
raise ArgumentError.new("Length of id must be 64, got #{id.length}") if id and id.length != 64 # 64 hex digits, gets packed to 32 bytes with .pack('H*')
length = OPENC3_PRIMARY_FIXED_SIZE
flags = 0
Method initialize
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(target_name)
super(target_name)
@target = System.targets[target_name]
position_filename = File.join(@target.dir, 'data', 'position.bin')
Function patch_make
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.patch_make = function (a, opt_b, opt_c) {
var text1, diffs
if (
typeof a == 'string' &&
typeof opt_b == 'string' &&
Function diff_bisect_
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.diff_bisect_ = function (text1, text2, deadline) {
// Cache the text lengths to prevent multiple calls.
var text1_length = text1.length
var text2_length = text2.length
var max_d = Math.ceil((text1_length + text2_length) / 2)
Method process_file
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_file(filename, existing_variables = {})
current_interface_or_router = nil
current_type = nil
current_interface_log_added = false