Showing 81 of 177 total issues
Method wells_have_required_information
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def wells_have_required_information
filtered_wells.each do |well|
next if well.aliquots.empty?
errors.add(:csv_file, format(MISSING_WELL_DETAIL, well.location)) unless well_details.include? well.location
- 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 generate_position_details_hash
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def generate_position_details_hash
return {} unless valid?
tube_rack_scan.each_with_object({}) do |row, position_details_hash|
# ignore blank rows in file
- 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
Function byPlateFixed
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function byPlateFixed(_well, tags, _relIndex, absIndex, offset, _counters) {
Function byPlateSeq
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function byPlateSeq(_well, tags, relIndex, _absIndex, offset, _counters) {
Method build_pools
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def build_pools
pools = []
current_pool = 0
# wells_grouped_by_collected_by = {0=>['w1', 'w4'], 1=>['w6', 'w2'], 2=>['w9', 'w23']}
- 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_transfers_hash
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def build_transfers_hash(bins, number_of_rows, compression_reqd) # rubocop:todo Metrics/AbcSize
binner = Binner.new(compression_reqd, number_of_rows)
bins
.values
.each_with_object({})
- 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
Function isValidChildUsedOligoParameters
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
parentUsedOligos,
parentWellSubmDetails,
tagLayout,
tagSubstitutions,
tagGroupOligos,
Method primary_index
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def primary_index(row, column, scale, height, _width)
Method primary_index
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def primary_index(row, column, scale, _height, width)
Method load
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.load(name, options, store, submission_templates, label_template_config)
Function extractChildUsedOligos
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function extractChildUsedOligos(parentUsedOligos, parentWellSubmDetails, tagLayout, tagSubstitutions, tagGroupOligos) {
Method primary_index
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def primary_index(row, _column, _scale, _height, _width)
Method primary_index
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def primary_index(row, column, scale, height, width)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(name, options, store, submission_templates, label_template_config)
Method binner_next_well
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def binner_next_well(binner, bins, bin, bin_index_within_bins, well_index_within_bin)
Method primary_index
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def primary_index(row, column, scale, height, _width)
Method primary_index
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def primary_index(row, column, scale, height, _width)
Method primary_index
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def primary_index(row, column, scale, height, width)
Method check_for_invalid_characters
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def check_for_invalid_characters
return if empty?
@row_data.each_with_index do |cell, i|
next if cell.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 validate_each
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def validate_each(record, attribute, value)
Array(value).each do |nested|
next if nested.valid?
nested.errors.each do |error|
- 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"