Showing 688 of 938 total issues
Method write
has a Cognitive Complexity of 159 (exceeds 5 allowed). Consider refactoring. 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)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method read
has a Cognitive Complexity of 131 (exceeds 5 allowed). Consider refactoring. 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)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method write_array
has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring. 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
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method process_file
has a Cognitive Complexity of 107 (exceeds 5 allowed). Consider refactoring. Open
def process_file(filename, recursive = false)
current_interface_or_router = nil
current_type = nil
current_interface_log_added = false
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method xtce_process_element
has a Cognitive Complexity of 105 (exceeds 5 allowed). Consider refactoring. Open
def xtce_process_element(element)
if XTCE_IGNORED_ELEMENTS.include?(element.name)
return false
end
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method read_array
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. 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
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method start
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
def start
@thread_sleeper = Sleeper.new
@thread = Thread.new do
@cancel_thread = false
begin
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method limits_monitor_thread
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
def limits_monitor_thread
@@cancel_limits = false
@@limits_sleeper = Cosmos::Sleeper.new
queue_id = nil
begin
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method parse_loop
has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring. Open
def parse_loop(io, yield_non_keyword_lines, remove_quotes, size, rx)
line_continuation = false
@line_number = 0
@keyword = nil
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method histogram
has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring. Open
def histogram(num_buckets = nil, numeric = false, &block)
buckets = {}
# Count the occurance of each value
self.each do |value|
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method process_file
has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring. Open
def process_file(filename, type, entry_seconds, file_seconds)
file = S3File.new(filename)
file.retrieve
# Determine if we already have a PacketLogWriter created
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method process_file
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
def process_file(filename, process_target_name)
# Handle .xtce files
if File.extname(filename).to_s.downcase == ".xtce"
XtceParser.process(@commands, @telemetry, @warnings, filename, process_target_name)
return
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method read_item
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
def read_item(item, value_type = :CONVERTED, buffer = @buffer)
value = super(item, :RAW, buffer)
derived_raw = false
if item.data_type == :DERIVED && value_type == :RAW
value_type = :CONVERTED
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method build_suites
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
def self.build_suites
@@suites = []
# @@suites = @@suites.select { |my_suite| my_suite.name == 'CustomSuite' }
suites = {}
groups = []
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method each_lexed_segment
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
def each_lexed_segment(text)
inside_begin = false
indent = 0
lex = RubyLex.new
lex_io = StringIO.new(text)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method run
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
def run
begin
if @interface.read_allowed?
Logger.info "#{@interface.name}: Starting packet reading"
else
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method thread_body
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
def thread_body
objects = @collection.objects_by_thread_id[@thread_id]
# Cancel if we don't have any objects ... this can happen as things are processed
# or if someone calls remove() from the StreamingApi
@cancel_thread = true unless objects and objects.length > 0
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method check_default_and_range_data_types
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
def check_default_and_range_data_types
if @default and !@write_conversion
if @array_size
raise ArgumentError, "#{@name}: default must be an Array but is a #{default.class}" unless Array === @default
else
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method run
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
def run
InterfaceTopic.receive_commands(@interface, scope: @scope) do |topic, msg_hash|
# Check for a raw write to the interface
if topic =~ /CMD}INTERFACE/
if msg_hash['shutdown']
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method run_group
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
def run_group(group_class, internal = false, &block)
ScriptResult.suite = name() unless internal
# Determine if this group_class is in the plan and the number of scripts associated with this group_class
in_plan = false
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"