Showing 87 of 187 total issues
Function byFixedGroupByPlate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function byFixedGroupByPlate(_well, tags, _relIndex, absIndex, offset, _counters) {
Function processTagsPerWell
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function processTagsPerWell(acc, well, relIndex, absIndex, tagsPerWell, walker) {
Function byGroupByPlate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function byGroupByPlate(_well, tags, relIndex, _absIndex, offset, _counters) {
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 byPlateSeq
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function byPlateSeq(_well, tags, relIndex, _absIndex, offset, _counters) {
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
Method update_all_labware_metadata
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def update_all_labware_metadata(robot_barcode)
@robot.beds.each_value do |bed|
next unless bed.transitions? && bed.labware
update_bed_labware_metadata(bed, robot_barcode)
rescue Sequencescape::Api::ResourceNotFound
- 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 initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(name, options, store, submission_templates, label_template_config)
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 initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(type, target_state = 'passed', verify_robot = false, require_robot = false, &block)
Function extractChildUsedOligos
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function extractChildUsedOligos(parentUsedOligos, parentWellSubmDetails, tagLayout, tagSubstitutions, tagGroupOligos) {
Method load
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.load(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)