wurmlab/sequenceserver

View on GitHub

Showing 119 of 7,605 total issues

Function Layout has 55 lines of code (exceeds 25 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: Major
Found in public/packages/circosJS@1.7.0.js - About 2 hrs to fix

    Function draw_axes has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        draw_axes() {
            var space, len;
            len = this._scale_y.ticks().length;
            if (len >= 5) {
                space = 5;
    Severity: Major
    Found in public/js/length_distribution.js - About 2 hrs to fix

      Function hspStats has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        hspStats() {
          // An array to hold text or span elements that make up the line.
          let line = [];
      
          // Bit score and total score.
      Severity: Major
      Found in public/js/hsp.js - About 2 hrs to fix

        Function assign has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            Object.assign = function(target) {
                'use strict';
                var index, key, source;
                if (target === null) {
                    throw new TypeError('Cannot convert undefined or null to object');
        Severity: Minor
        Found in public/packages/circosJS@1.7.0.js - About 2 hrs 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 render has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        circosJS.Core.prototype.render = function(ids, removeTracks) {
            var name, ref, ref1, renderAll, svg, track, trackStore, trackType, tracks, translated;
            if (typeof ids === 'undefined') {
                renderAll = true;
                ids = [];
        Severity: Minor
        Found in public/packages/circosJS@1.7.0.js - About 2 hrs 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 parseSpanValueData has 52 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        circosJS.parseSpanValueData = function(data, layoutSummary) {
            var groups, sample;
            if (!(data.length > 0)) {
                return {
                    data: [],
        Severity: Major
        Found in public/packages/circosJS@1.7.0.js - About 2 hrs to fix

          Function data has 52 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      _.bind(function (query) {
                          if (query_count < x) {
                              var label = query.id;
                              var len = query.length;
                              var item1 = {
          Severity: Major
          Found in public/js/circos.js - About 2 hrs to fix

            Function parseChordData has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            circosJS.parseChordData = function(data, layoutSummary) {
                var sample;
                sample = data[0];
                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) {
            Severity: Major
            Found in public/packages/circosJS@1.7.0.js - About 2 hrs to fix

              Function smartBorders has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              circosJS.Core.prototype.smartBorders = function() {
                  var border, borders, currentBorder, l, layout, len, ref, store, track, trackId, trackType, width;
                  width = this.conf.defaultTrackWidth;
                  layout = {
                      'in': this._layout.conf.innerRadius,
              Severity: Major
              Found in public/packages/circosJS@1.7.0.js - About 2 hrs to fix

                Function _render_polygons has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _render_polygons() {
                        var self = this;
                
                        // Remove all existing child elements.
                        this._svg.d3.selectAll('*').remove();
                Severity: Minor
                Found in public/js/kablammo.js - About 1 hr to fix

                  Function hspLines has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    hspLines() {
                      // Space reserved for showing coordinates
                      var width = this.width();
                  
                      // Number of residues we can draw per line is the total number of
                  Severity: Minor
                  Found in public/js/hsp.js - About 1 hr to fix

                    Function exports has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = (env, argv)  => {
                        const pluginsPath = env.pluginsPath || './public/js/null_plugins';
                    
                        return {
                            entry: {
                    Severity: Minor
                    Found in webpack.config.js - About 1 hr to fix

                      Function renderDatabases has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          renderDatabases(category) {
                          // Panel name and column width.
                              var panelTitle = category[0].toUpperCase() + category.substring(1).toLowerCase() + ' databases';
                              var columnClass = this.categories().length === 1 ? 'col-span-2' : '';
                      
                      
                      Severity: Minor
                      Found in public/js/databases.js - About 1 hr to fix

                        Function mixConf has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                        Open

                        circosJS.mixConf = function(conf, defaultConf) {
                            var key, newConf, value;
                            newConf = {};
                            for (key in defaultConf) {
                                value = defaultConf[key];
                        Severity: Minor
                        Found in public/packages/circosJS@1.7.0.js - About 1 hr 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 tableJSX has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            tableJSX() {
                                var hasName = _.every(this.props.query.hits, function (hit) {
                                    return hit.sciname !== '';
                                });
                        
                        
                        Severity: Minor
                        Found in public/js/query.js - About 1 hr to fix

                          Function render has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          circosJS.Core.prototype.render = function(ids, removeTracks) {
                              var name, ref, ref1, renderAll, svg, track, trackStore, trackType, tracks, translated;
                              if (typeof ids === 'undefined') {
                                  renderAll = true;
                                  ids = [];
                          Severity: Minor
                          Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                            Function Histogram has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            circosJS.Histogram = function() {
                                circosJS.Track.call(this);
                                this.parseData = circosJS.parseSpanValueData;
                                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 sharingPanelJSX has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  sharingPanelJSX() {
                                      return (
                                          <div className="sharing-panel">
                                              <div className="section-header-sidebar">
                                                  <h4>
                              Severity: Minor
                              Found in public/js/sidebar.js - About 1 hr to fix

                                Function parseSpanStringData has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                circosJS.parseSpanStringData = function(data, layoutSummary) {
                                    var groups, sample;
                                    sample = data[0];
                                    if ('parent_id' in sample && 'start' in sample && 'end' in sample && 'value' in sample) {
                                        data = data.map(function(datum) {
                                Severity: Minor
                                Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                                  Function renderDatabases has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      renderDatabases(category) {
                                          // Panel name and column width.
                                          var panelTitle = category[0].toUpperCase() +
                                              category.substring(1).toLowerCase() + ' databases';
                                          var columnClass = this.categories().length === 1 ? 'col-md-12' :
                                  Severity: Minor
                                  Found in public/js/databases_tree.js - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language