wurmlab/sequenceserver

View on GitHub

Showing 119 of 7,605 total issues

Function handleLoadTree has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    handleLoadTree(category) {
        var tree_id = '#' + category + '_database_tree';
        // hack that is needed to sync the selected tree db with the hidden main db
        window.jstree_node_change_timeout = null;

Severity: Minor
Found in public/js/databases_tree.js - About 1 hr to fix

    Function Highlight has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    circosJS.Highlight = function() {
        circosJS.Track.call(this);
        this.parseData = circosJS.parseSpanStringData;
        this.renderDatumContainer = (function(_this) {
            return function(instance, parentElement, name, data, conf) {
    Severity: Minor
    Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

      Function removeTracks has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      circosJS.Core.prototype.removeTracks = function(trackIds) {
          var id, l, len, ref, store, svg, trackId, type;
          svg = d3.select(this.conf.container);
          ref = this.tracks;
          for (type in ref) {
      Severity: Minor
      Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

        Function renderChords has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            this.renderChords = function(parentElement, name, conf, data, layout, ratio, getSource, getTarget) {
        Severity: Major
        Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

          Method init_database has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              def init_database
                fail DATABASE_DIR_NOT_SET unless config[:database_dir]
          
                config[:database_dir] = File.expand_path(config[:database_dir])
                unless File.exist?(config[:database_dir]) &&
          Severity: Minor
          Found in lib/sequenceserver.rb - About 55 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 Layout has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

          circosJS.Layout = function(conf, data) {
              var block_nb, gap, k, offset, ref, ref1, size, v;
              if (data == null) {
                  circosJS.log(2, 'no layout data', '');
              }
          Severity: Minor
          Found in public/packages/circosJS@1.7.0.js - About 55 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 retrieve has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

                def retrieve(loci)
                  # Exit early if loci is nil.
                  return unless loci
          
                  # String -> Array
          Severity: Minor
          Found in lib/sequenceserver/database.rb - About 55 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 parse_advanced has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

                def parse_advanced(param_line)
                  param_list = (param_line || '').split(' ')
                  res = {}
          
                  param_list.each_with_index do |word, i|
          Severity: Minor
          Found in lib/sequenceserver/blast/report.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 ratio has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              this.ratio = function(value, min, max, scope, reverse, logScale) {
          Severity: Minor
          Found in public/packages/circosJS@1.7.0.js - About 45 mins to fix

            Method open_in_browser has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                def open_in_browser(server_url)
                  return if using_ssh? || verbose?
                  if RUBY_PLATFORM =~ /linux/ && xdg?
                    sys("xdg-open #{server_url}")
                  elsif RUBY_PLATFORM =~ /darwin/
            Severity: Minor
            Found in lib/sequenceserver.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

            Avoid deeply nested control flow statements.
            Open

                                if (Object.prototype.hasOwnProperty.call(source, key)) {
                                    target[key] = source[key];
                                }
            Severity: Major
            Found in public/packages/circosJS@1.7.0.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                                  if (rule.condition(v.parent, datum, i)) {
                                                      results3.push(datum[rule.parameter] = rule.value);
                                                  } else {
                                                      results3.push(void 0);
                                                  }
              Severity: Major
              Found in public/packages/circosJS@1.7.0.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                            for (trackId in store) {
                                svg.select('.' + trackId).remove();
                                delete store[trackId];
                            }
                Severity: Major
                Found in public/packages/circosJS@1.7.0.js - About 45 mins to fix

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

                      this.ratio = function(value, min, max, scope, reverse, logScale) {
                  Severity: Minor
                  Found in public/packages/circosJS@1.7.0.js - About 45 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                        if ('source_id' in sample && 'source_start' in sample && 'source_end' && 'target_id' in sample && 'target_start' in sample && 'target_end' in sample) {
                            data = data.map(function(datum) {
                                var elts;
                                elts = [datum.source_id, datum.source_start, datum.source_end, datum.target_id, datum.target_start, datum.target_end];
                                if (datum.value != null) {
                    Severity: Major
                    Found in public/packages/circosJS@1.7.0.js - About 40 mins to fix

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

                      function composeEmail(dbsArr, program, numQueries, url, isOpenAccess) {
                      Severity: Minor
                      Found in public/js/mailto.js - About 35 mins to fix

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

                            this.processConf = function(conf, defaultConf, meta, instance, utils) {
                        Severity: Minor
                        Found in public/packages/circosJS@1.7.0.js - About 35 mins to fix

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

                              def make_blast_database(action, file, title, type, non_parse_seqids = false)
                          Severity: Minor
                          Found in lib/sequenceserver/makeblastdb.rb - About 35 mins to fix

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

                            export default function asMailtoHref(querydb, program, numQueries, url, isOpenAccess) {
                            Severity: Minor
                            Found in public/js/mailto.js - About 35 mins to fix

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

                                  this.build = function(instance, conf, data, rules, backgrounds) {
                              Severity: Minor
                              Found in public/packages/circosJS@1.7.0.js - About 35 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language