sanger/limber

View on GitHub

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) {
Severity: Minor
Found in app/frontend/javascript/custom-tagged-plate/tagLayoutFunctions.js - About 45 mins to fix

    Function processTagsPerWell has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function processTagsPerWell(acc, well, relIndex, absIndex, tagsPerWell, walker) {
    Severity: Minor
    Found in app/frontend/javascript/custom-tagged-plate/tagLayoutFunctions.js - About 45 mins to fix

      Function byGroupByPlate has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function byGroupByPlate(_well, tags, relIndex, _absIndex, offset, _counters) {
      Severity: Minor
      Found in app/frontend/javascript/custom-tagged-plate/tagLayoutFunctions.js - About 45 mins to fix

        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({})
        Severity: Minor
        Found in app/models/utility/normalised_binning_calculator.rb - About 45 mins to fix

        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) {
        Severity: Minor
        Found in app/frontend/javascript/custom-tagged-plate/tagLayoutFunctions.js - About 45 mins to fix

          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
          Severity: Minor
          Found in app/models/labware_creators/pcr_cycles_binned_plate_base.rb - About 45 mins to fix

          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

          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
          Severity: Minor
          Found in app/controllers/robots_controller.rb - About 45 mins to fix

          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
          Severity: Minor
          Found in app/frontend/javascript/custom-tagged-plate/tagClashFunctions.js - About 35 mins to fix

            Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              def initialize(name, options, store, submission_templates, label_template_config)
            Severity: Minor
            Found in lib/purpose_config.rb - About 35 mins to fix

              Method primary_index has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                def primary_index(row, column, scale, height, _width)
              Severity: Minor
              Found in app/models/limber/tag_layout_template/in_columns.rb - About 35 mins to fix

                Method primary_index has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  def primary_index(row, column, scale, _height, width)
                Severity: Minor
                Found in app/models/limber/tag_layout_template/in_rows.rb - About 35 mins to fix

                  Method primary_index has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    def primary_index(row, column, scale, height, width)
                  Severity: Minor
                  Found in app/models/limber/tag_layout_template/in_inverse_rows.rb - About 35 mins to fix

                    Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def initialize(type, target_state = 'passed', verify_robot = false, require_robot = false, &block)
                    Severity: Minor
                    Found in lib/robot_configuration.rb - About 35 mins to fix

                      Function extractChildUsedOligos has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      function extractChildUsedOligos(parentUsedOligos, parentWellSubmDetails, tagLayout, tagSubstitutions, tagGroupOligos) {
                      Severity: Minor
                      Found in app/frontend/javascript/custom-tagged-plate/tagClashFunctions.js - About 35 mins to fix

                        Method load has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          def self.load(name, options, store, submission_templates, label_template_config)
                        Severity: Minor
                        Found in lib/purpose_config.rb - About 35 mins to fix

                          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)
                          Severity: Minor
                          Found in app/models/utility/pcr_cycles_binning_calculator.rb - About 35 mins to fix

                            Method primary_index has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              def primary_index(row, column, scale, height, width)
                            Severity: Minor
                            Found in app/models/limber/tag_layout_template/in_inverse_columns.rb - About 35 mins to fix

                              Method primary_index has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                def primary_index(row, column, scale, height, _width)
                              Severity: Minor
                              Found in app/models/limber/tag_layout_template/in_column_then_rows.rb - About 35 mins to fix

                                Method primary_index has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                  def primary_index(row, _column, _scale, _height, _width)
                                Severity: Minor
                                Found in app/models/limber/tag_layout_template/in_combinatorial_by_rows.rb - About 35 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language