Showing 842 of 1,379 total issues
Method spawn
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.spawn(scope, name, suite_runner = nil, disconnect = false, environment = nil, user_full_name = nil, username = nil)
if File.extname(name) == '.py'
process_name = 'python'
runner_path = File.join(RAILS_ROOT, 'scripts', 'run_script.py')
else
Function __init__
has 25 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Method run
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run
RouterTopic.receive_telemetry(@router, scope: @scope) do |topic, msg_id, msg_hash, _redis|
msgid_seconds_from_epoch = msg_id.split('-')[0].to_i / 1000.0
delta = Time.now.to_f - msgid_seconds_from_epoch
@metric.set(name: 'router_topic_delta_seconds', value: delta, type: 'gauge', unit: 'seconds', help: 'Delta time between data written to stream and router tlm start') if @metric
Method build_suites
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.build_suites
@@suites = []
suites = {}
groups = []
ObjectSpace.each_object(Class) do |object|
Method process_request
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_request(request_data:, request_headers:, start_time:)
@request_count += 1
begin
request = JsonRpcRequest.from_json(request_data, request_headers)
response = nil
Function parse_string
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parse_string(
input_string,
original_filename,
yield_non_keyword_lines,
remove_quotes,
Function match_bitap_
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.match_bitap_ = function (text, pattern, loc) {
if (pattern.length > this.Match_MaxBits) {
throw new Error('Pattern too long for this browser.')
}
Function parse_string
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parse_string(
input_string,
original_filename,
yield_non_keyword_lines,
remove_quotes,
Method run_text
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run_text(text,
line_offset = 0,
text_binding = nil,
close_on_complete = false,
initial_filename: nil)
Method build_page
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_page(meta, page)
modifiers = {}
meta.each do |keyword, data|
page << "\n#{'#' * @level} #{keyword}\n"
if data['since']
Method check_tool_base
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def check_tool_base(path, base_pkgs)
Dir.chdir(path) do
# List the remote tags and sort reverse order (latest on top)
# Pipe to sed to get the second line because the output looks like:
# 6b7bfd3c201c1185129e819e02dc2505dbb82994 refs/tags/v7.0.96^{}
Function decodeURI
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
diff_match_patch.prototype.decodeURI = function (text) {
try {
return decodeURI(text)
} catch (e) {
var i = 0
Method to_config
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def to_config(cmd_or_tlm)
config = ''
if cmd_or_tlm == :TELEMETRY
config << "TELEMETRY #{@target_name.to_s.quote_if_necessary} #{@packet_name.to_s.quote_if_necessary} #{@default_endianness} \"#{@description}\"\n"
Method to_config
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def to_config(cmd_or_tlm, default_endianness)
config = ''
if cmd_or_tlm == :TELEMETRY
if self.array_size
config << " ARRAY_ITEM #{self.name.to_s.quote_if_necessary} #{self.bit_offset} #{self.bit_size} #{self.data_type} #{self.array_size} \"#{self.description.to_s.gsub("\"", "'")}\""
Method get_packet_index
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_packet_index(cmd_or_tlm, target_name, packet_name, entry_type, data)
if cmd_or_tlm == :CMD
target_table = @cmd_packet_table[target_name]
else
target_table = @tlm_packet_table[target_name]
Method write
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def write(packet)
name = packet.packet_name.upcase
hs_packet = @tlm_packets['HEALTH_STATUS']
params_packet = @tlm_packets['PARAMS']
Method as_json
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def as_json(*a)
config = {}
config['name'] = self.name
config['bit_offset'] = self.bit_offset
config['bit_size'] = self.bit_size
Method _cmd_implementation
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def _cmd_implementation(method_name, *args, range_check:, hazardous_check:, raw:, timeout: nil, log_message: nil, manual: false, validate: true,
scope: $openc3_scope, token: $openc3_token, **kwargs)
extract_string_kwargs_to_args(args, kwargs)
unless [nil, true, false].include?(log_message)
raise "Invalid log_message parameter: #{log_message}. Must be true or false."
Function computeDiff
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function computeDiff(acediff, diffType, offsetLeft, offsetRight, diffText) {
let lineInfo = {}
if (diffType === C.DIFF_INSERT) {
// pretty confident this returns the right stuff for the left editor: start & end line & char
Method identify_and_finish_packet
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def identify_and_finish_packet
packet_data = nil
identified_packet = nil
if @telemetry