Showing 842 of 1,379 total issues
Method process_file
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_file(filename)
# Partial files are included into another file and thus aren't directly processed
return if File.basename(filename)[0] == '_' # Partials start with underscore
@filename = filename
@last_config = [File.basename(filename), File.read(filename)]
Method initialize
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(name, is_plugin: false)
@shutdown_complete = false
raise "Microservice must be named" unless name
@name = name
Method process_file
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_file(filename, process_target_name, language = 'ruby')
# Handle .xtce files
extension = File.extname(filename).to_s.downcase
if extension == ".xtce" or extension == ".xml"
XtceParser.process(@commands, @telemetry, @warnings, filename, process_target_name)
Function diff_cleanupSemanticLossless
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.diff_cleanupSemanticLossless = function (diffs) {
/**
* Given two strings, compute a score representing whether the internal
* boundary falls on logical boundaries.
* Scores range from 6 (best) to 0 (worst).
Method process_file
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_file(filename, type, entry_nanoseconds, file_nanoseconds)
throttle = OpenC3::Throttle.new(@max_cpu_utilization)
file = BucketFile.new(filename)
file.retrieve
unless File.exist?(file.local_path)
Method read_item
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def read_item(item, value_type = :CONVERTED, buffer = @buffer, given_raw = nil)
if given_raw
# Must clone this since value is returned
value = given_raw.clone
else
Function __init__
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def __init__(self, target_name):
super().__init__(target_name)
self.target = System.targets[target_name]
position_filename = os.path.join(self.target.dir, "data", "position.bin")
Method handle_config
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def handle_config(parser, keyword, parameters)
case keyword
when 'MAP_TARGET'
parser.verify_num_parameters(1, 1, "#{keyword} <Target Name>")
target_name = parameters[0].upcase
Function patch_apply
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.patch_apply = function (patches, text) {
if (patches.length == 0) {
return [text, []]
}
// Deep copy the patches so that no changes are made to originals.
Method handle_write_variable_bit_size
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def handle_write_variable_bit_size(item, value, buffer)
# Update length field to new size
if (item.data_type == :INT or item.data_type == :UINT) and not item.original_array_size
# QUIC encoding is currently assumed for individual variable sized integers
# see https://datatracker.ietf.org/doc/html/rfc9000#name-variable-length-integer-enc
Method process_targets
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_targets(parser, filename, targets_config_dir)
parser.parse_file(filename) do |keyword, parameters|
case keyword
when 'AUTO_DECLARE_TARGETS'
usage = "#{keyword}"
Function patch_splitMax
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.patch_splitMax = function (patches) {
var patch_size = this.Match_MaxBits
for (var x = 0; x < patches.length; x++) {
if (patches[x].length1 <= patch_size) {
continue
Method process_suite
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.process_suite(name, contents, new_process: true, username: nil, scope:)
python = false
python = true if File.extname(name) == '.py'
start = Time.now
Method update
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def update
@previous_microservices = @microservices.dup
# Get all the microservice configuration
@microservices = MicroserviceModel.all
Function created
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
created: function () {
this.settings.forEach((setting) => {
switch (setting[0]) {
case 'ITEM':
this.items.push({
Function exports
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = (webpackConfigEnv, argv) => {
const orgName = 'openc3'
const defaultConfig = singleSpaDefaults({
orgName,
projectName: 'tool-base',
Method each_lexed_segment
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def each_lexed_segment(text)
inside_begin = false
lex = RubyLex.new
lex_io = StringIO.new(text)
lex.set_input(lex_io, context: @context)
Method read
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def read(name, value_type = :CONVERTED, reduced_type = nil)
value = nil
array_index = nil
# Check for array index to handle array items but also make sure there
# isn't a REAL item that has brackets in the name
Function diff_halfMatch_
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.diff_halfMatch_ = function (text1, text2) {
if (this.Diff_Timeout <= 0) {
// Don't risk returning a non-optimal diff if we have unlimited time.
return null
}
Method initialize
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(
write_item_name = nil,
strip_crc = false,
bad_strategy = "ERROR",
bit_offset = -32,