Showing 55 of 55 total issues
Avoid too many return
statements within this method. Open
return store
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return info
Avoid too many return
statements within this method. Open
return '*' unless temp
Avoid too many return
statements within this method. Open
return capture_attribute :temperature, upcase
Method sync_with_play
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def sync_with_play
loop do
break if sentence_index_current?
break if quit?
sleep 0.015
- 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 mid
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def mid first, last
results = []
count = 0
File.foreach(dictionary).collect do |line|
if (count >= first) && (count <= last)
- 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 receive_mode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def receive_mode
print_mode :rx
loop do
char = key_input.read
check_clear char
- 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 close_threads
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def close_threads
await_termination_count = 0
loop do
sleep 0.1
break unless any_thread_open?()
- 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 missing_letters_or_numbers?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def missing_letters_or_numbers?
if @options && @options[:letters_numbers]
return true if has_no_letter?
return true if has_no_number?
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 build_word_maybe
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def build_word_maybe
@input_word ||= ''
@input_word << key_chr if is_relevant_char?
if @book_details.args[:output] == :letter
move_word_to_process if is_relevant_char? #todo
- 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 select_part
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def select_part country = :uk, partial
pc = rand_val
weight = callsigns[country][partial][:weight]
tot_wt = 0
weight.each_with_index do |wt, idx|
- 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 print_words
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def print_words words
timing.init_char_timer
(words.to_s + ' ').each_char do |letr|
process_letter letr
loop do
- 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 wait_for_start_sync
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def wait_for_start_sync
timeout = Time.now + 5
until play.start_sync?
sleep 0.001
break if quit?
- 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 fail_unmarked_inactive_elements
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def fail_unmarked_inactive_elements
if(( ! stream_empty?) && (count > @active_region))
@first_element.upto(inactive_region) do |count|
@success[count] = false unless @success[count] == true
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"