yannickwurm/sequenceserver

View on GitHub

Showing 119 of 7,450 total issues

File circosJS@1.7.0.js has 1590 lines of code (exceeds 1000 allowed). Consider refactoring.
Open

var circosJS,
    indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

if (typeof Object.assign !== 'function') {
    Object.assign = function(target) {
Severity: Major
Found in public/packages/circosJS@1.7.0.js - About 2 days to fix

    Function Track has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
    Open

    circosJS.Track = function() {
        this.build = function(instance, conf, data) {
            this.dispatch = d3.dispatch('mouseover', 'mouseout');
            this.loadData(data, instance);
            this.conf = this.processConf(conf, this.defaultConf, this.meta, instance, this);
    Severity: Minor
    Found in public/packages/circosJS@1.7.0.js - About 1 day 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 Track has 214 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    circosJS.Track = function() {
        this.build = function(instance, conf, data) {
            this.dispatch = d3.dispatch('mouseover', 'mouseout');
            this.loadData(data, instance);
            this.conf = this.processConf(conf, this.defaultConf, this.meta, instance, this);
    Severity: Major
    Found in public/packages/circosJS@1.7.0.js - About 1 day to fix

      Function Stack has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
      Open

      circosJS.Stack = function() {
          circosJS.Track.call(this);
          this.parseData = circosJS.parseSpanValueData;
          this.build = function(instance, conf, data, rules, backgrounds) {
              this.loadData(data, instance);
      Severity: Minor
      Found in public/packages/circosJS@1.7.0.js - About 1 day 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 Stack has 158 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      circosJS.Stack = function() {
          circosJS.Track.call(this);
          this.parseData = circosJS.parseSpanValueData;
          this.build = function(instance, conf, data, rules, backgrounds) {
              this.loadData(data, instance);
      Severity: Major
      Found in public/packages/circosJS@1.7.0.js - About 6 hrs to fix

        Function graphIt has 140 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            graphIt($queryDiv, $graphDiv, index, howMany, opts, inhits) {
            /* barHeight: Height of each hit track.
             * legend: Height reserved for the overview legend.
             * margin: Margin around the svg element.
             */
        Severity: Major
        Found in public/js/hits_overview.js - About 5 hrs to fix

          Function Chord has 108 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          circosJS.Chord = function() {
              circosJS.Track.call(this);
              this.parseData = circosJS.parseChordData;
              this.applyRules = function(rules, data) {
                  var datum, l, len, results, rule;
          Severity: Major
          Found in public/packages/circosJS@1.7.0.js - About 4 hrs to fix

            Function setupTooltip has 102 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                setupTooltip() {
                    var selected = {};
                    $('.circos-distribution').on(
                        'click',
                        _.bind(function (event) {
            Severity: Major
            Found in public/js/circos.js - About 4 hrs to fix

              Function updateState has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
              Open

                  updateState() {
                      var results = [];
                      var numHSPsProcessed = 0;
                      while (this.nextQuery < this.state.queries.length) {
                          var query = this.state.queries[this.nextQuery];
              Severity: Minor
              Found in public/js/report.js - About 3 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 get_styles has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

              var get_styles = function () {
                  var styles = '';
              
                  for (var i = 0; i < document.styleSheets.length; i++) {
                      (function process_ss(ss) {
              Severity: Minor
              Found in public/js/svgExporter.js - About 3 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 Grapher has 89 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function Grapher(Graph) {
                  return class extends React.Component {
                      constructor(props) {
                          super(props);
                          this.name = Graph.name();
              Severity: Major
              Found in public/js/grapher.js - About 3 hrs to fix

                Function updateState has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    updateState() {
                        var results = [];
                        var numHSPsProcessed = 0;
                        while (this.nextQuery < this.state.queries.length) {
                            var query = this.state.queries[this.nextQuery];
                Severity: Major
                Found in public/js/report.js - About 3 hrs to fix

                  Function graphControls has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      graphControls($queryDiv, $graphDiv, isInit, opts, hits) {
                          var MIN_HITS_TO_SHOW = 20;
                  
                          var totalHits, shownHits, lessButton, moreButton;
                  
                  
                  Severity: Major
                  Found in public/js/hits_overview.js - About 3 hrs to fix

                    Function renderLayoutTicks has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    circosJS.renderLayoutTicks = function(conf, layout, d3, instance) {
                        var blockTicks, displayLabel, ticks;
                        blockTicks = function(d) {
                            var k,space;
                            k = (d.end - d.start) / d.len;
                    Severity: Major
                    Found in public/packages/circosJS@1.7.0.js - About 2 hrs to fix

                      Function componentDidMount has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          componentDidMount() {
                              var self = this;
                              var FASTA_FORMAT = /^>/;
                      
                              $(document).ready(function () {
                      Severity: Major
                      Found in public/js/dnd.js - About 2 hrs to fix

                        Function downloadsPanelJSX has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            downloadsPanelJSX() {
                                return (
                                    <div className="downloads">
                                        <div className="section-header-sidebar">
                                            <h4>
                        Severity: Major
                        Found in public/js/sidebar.js - About 2 hrs to fix

                          Function construct_layout has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              construct_layout() {
                                  var hsp_count = 0;
                                  var query_count = 0;
                                  var num_karyotype = 32;
                                  var num_queries = this.queries.length;
                          Severity: Major
                          Found in public/js/circos.js - About 2 hrs to fix

                            Function removeTracks has a Cognitive Complexity of 18 (exceeds 5 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 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 drawLegend has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                drawLegend() {
                                    this.ratioHSP = [];
                                    _.each(
                                        this.chords_arr,
                                        _.bind(function (obj) {
                            Severity: Major
                            Found in public/js/circos.js - About 2 hrs to fix

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

                                  render() {
                                      var methods = this.state.methods;
                                      var method = methods[0];
                                      var multi = methods.length > 1;
                              
                              
                              Severity: Major
                              Found in public/js/search_button.js - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language