KarrLab/test_history_server

View on GitHub

Showing 406 of 624 total issues

Function plotLineArea has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            function plotLineArea(datapoints, axisx, axisy) {
                var points = datapoints.points,
                    ps = datapoints.pointsize,
                    bottom = Math.min(Math.max(0, axisy.min), axisy.max),
                    i = 0, top, areaOpen = false,
Severity: Major
Found in public/static/js/flot-0.8.3/jquery.flot.js - About 3 hrs to fix

    Function computeFillBottoms has 96 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function computeFillBottoms( plot, s, datapoints ) {
    
                if ( s.fillBetween == null ) {
                    return;
                }
    Severity: Major
    Found in public/static/js/flot-0.8.3/jquery.flot.fillbetween.js - About 3 hrs to fix

      Function defaultPrefilter has 95 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function defaultPrefilter( elem, props, opts ) {
          var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire,
              anim = this,
              style = elem.style,
              orig = {},
      Severity: Major
      Found in public/static/js/flot-0.8.3/jquery.js - About 3 hrs to fix

        Function setupTickGeneration has 95 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function setupTickGeneration(axis) {
                    var opts = axis.options;
        
                    // estimate number of ticks
                    var noTicks;
        Severity: Major
        Found in public/static/js/flot-0.8.3/jquery.flot.js - About 3 hrs to fix

          Function trigger has 93 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              trigger: function( event, data, elem, onlyHandlers ) {
                  // Don't do events on text and comment nodes
                  if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
                      return;
                  }
          Severity: Major
          Found in public/static/js/flot-0.8.3/jquery.js - About 3 hrs to fix

            Function stackData has 92 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function stackData(plot, s, datapoints) {
                        if (s.stack == null || s.stack === false)
                            return;
            
                        var other = findMatchingSeries(s, plot.getData());
            Severity: Major
            Found in public/static/js/flot-0.8.3/jquery.flot.stack.js - About 3 hrs to fix

              Function send has 90 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                              send: function( headers, complete ) {
              
                                  // Get a new xhr
                                  var handle, i,
                                      xhr = s.xhr();
              Severity: Major
              Found in public/static/js/flot-0.8.3/jquery.js - About 3 hrs to fix

                Function events has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    events : function (scope) {
                      var self = this,
                          S = self.S;
                
                      S(this.scope)
                Severity: Major
                Found in public/static/js/foundation.min.js - About 3 hrs to fix

                  Function events has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      events : function (scope) {
                        var self = this,
                            S = self.S;
                  
                        S(this.scope)
                  Severity: Major
                  Found in public/static/js/foundation/foundation.dropdown.js - About 3 hrs to fix

                    Function clean has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        clean: function( elems, context, fragment, scripts ) {
                            var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
                                safe = context === document && safeFragment,
                                ret = [];
                    
                    
                    Severity: Major
                    Found in public/static/js/flot-0.8.3/jquery.js - About 3 hrs to fix

                      Function insertLegend has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function insertLegend() {
                      
                                  if (options.legend.container != null) {
                                      $(options.legend.container).html("");
                                  } else {
                      Severity: Major
                      Found in public/static/js/flot-0.8.3/jquery.flot.js - About 3 hrs to fix

                        File jquery.flot.time.js has 308 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /* Pretty handling of time axes.
                        
                        Copyright (c) 2007-2014 IOLA and Ole Laursen.
                        Licensed under the MIT license.
                        
                        
                        Severity: Minor
                        Found in public/static/js/flot-0.8.3/jquery.flot.time.js - About 3 hrs to fix

                          Consider simplifying this complex logical expression.
                          Open

                          if (!document.createElement('canvas').getContext) {
                          
                          (function() {
                          
                            // alias some functions to make (compiled) code shorter
                          Severity: Critical
                          Found in public/static/js/flot-0.8.3/excanvas.js - About 3 hrs to fix

                            Function submit_report has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def submit_report(request):
                                ''' Save a report and returns result in JSON
                            
                                Args:
                                    request (:obj:`django.http.request.HttpRequest`): HTTP POST request with these arguments
                            Severity: Minor
                            Found in test_history_server/rest/views.py - 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 drawBar has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function drawBar(x, y, b, barLeft, barRight, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {
                                        var left, right, bottom, top,
                                            drawLeft, drawRight, drawTop, drawBottom,
                                            tmp;
                            
                            
                            Severity: Major
                            Found in public/static/js/flot-0.8.3/jquery.flot.js - About 3 hrs to fix

                              Function init has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function init(plot) {
                                      plot.hooks.processOptions.push(function (plot, options) {
                              
                                          if (!options.axisLabels.show)
                                              return;
                              Severity: Major
                              Found in public/static/js/jquery.flot.axislabels.js - About 3 hrs to fix

                                Function appendFill has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function appendFill(ctx, lineStr, min, max) {
                                    var fillStyle = ctx.fillStyle;
                                    var arcScaleX = ctx.arcScaleX_;
                                    var arcScaleY = ctx.arcScaleY_;
                                    var width = max.x - min.x;
                                Severity: Major
                                Found in public/static/js/flot-0.8.3/excanvas.js - About 3 hrs to fix

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

                                      events : function () {
                                        var self = this,
                                            S = self.S,
                                            move_class = '',
                                            right_postfix = '',
                                  Severity: Major
                                  Found in public/static/js/foundation.min.js - About 3 hrs to fix

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

                                        events : function () {
                                          var self = this,
                                              S = self.S,
                                              move_class = '',
                                              right_postfix = '',
                                    Severity: Major
                                    Found in public/static/js/foundation/foundation.offcanvas.js - About 3 hrs to fix

                                      Function Animation has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function Animation( elem, properties, options ) {
                                          var result,
                                              index = 0,
                                              tweenerIndex = 0,
                                              length = animationPrefilters.length,
                                      Severity: Major
                                      Found in public/static/js/flot-0.8.3/jquery.js - About 3 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language