Showing 842 of 1,379 total issues
Function map_target_to_interface
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def map_target_to_interface(
Function fatal
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def fatal(self, message=None, scope=None, user=None, type=LOG, url=None, other=None):
Function build_log_data
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def build_log_data(self, log_level, message, user=None, type=None, url=None, other=None):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Avoid deeply nested control flow statements. Open
Open
if String === value
value = value.clone
elsif Array === value
value = Marshal.load(Marshal.dump(value))
end
Function parse_loop
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def parse_loop(self, io, yield_non_keyword_lines, remove_quotes_arg, size, rx):
Avoid deeply nested control flow statements. Open
Open
if type == 'disconnect'
if json_hash['reason'] == 'unauthorized'
raise "Unauthorized"
end
end
Avoid deeply nested control flow statements. Open
Open
if input == "REJECTED":
raise RuntimeError("Critical Cmd Rejected")
return input
Avoid deeply nested control flow statements. Open
Open
break if @cancel_thread
Method prompt_for_critical_cmd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def prompt_for_critical_cmd(uuid, _username, _target_name, _cmd_name, _cmd_params, cmd_string)
Avoid deeply nested control flow statements. Open
Open
if String === value
value = value.clone
elsif Array === value
value = Marshal.load(Marshal.dump(value))
end
Method _wait_packet
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _wait_packet(check,
target_name,
packet_name,
num_packets,
timeout,
Avoid deeply nested control flow statements. Open
Open
raise ArgumentError, "#{@name}: maximum must be a Float but is a #{@range.last.class}" unless Float === @range.last or Integer === @range.last
Method build_cmd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def build_cmd(target_name, packet_name, params = {}, range_checking = true, raw = false, check_required_params = true)
Method initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def initialize(target_name = nil, packet_name = nil, default_endianness = :BIG_ENDIAN, description = nil, buffer = nil, item_class = PacketItem)
Avoid deeply nested control flow statements. Open
Open
raise ArgumentError, "#{@name}: maximum must be a Integer but is a #{@range.last.class}" unless Integer === @range.last
Function handle_exception
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def handle_exception(
Avoid deeply nested control flow statements. Open
Open
if method == "open_file_dialog": # Simply return the only file
files = files[0]
return files
Function parse_file
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def parse_file(
Avoid deeply nested control flow statements. Open
Open
raise ArgumentError, "#{@name}: minimum must be a Integer but is a #{@range.first.class}" unless Integer === @range.first