jamesrwhite/minicron

View on GitHub

Showing 82 of 181 total issues

File bootstrap.js has 1596 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Bootstrap v3.3.7 (http://getbootstrap.com)
 * Copyright 2011-2016 Twitter, Inc.
 * Licensed under the MIT license
 */
Severity: Major
Found in server/lib/minicron/hub/assets/js/bootstrap.js - About 4 days to fix

    File perfect-scrollbar.js has 1302 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* perfect-scrollbar v0.6.16 */
    (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
    'use strict';
    
    var ps = require('../main');
    Severity: Major
    Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 3 days to fix

      Function 13 has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
      Open

      },{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(require,module,exports){
      'use strict';
      
      var instances = require('../instances');
      var updateGeometry = require('../update-geometry');
      Severity: Minor
      Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.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 16 has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
      Open

      },{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(require,module,exports){
      'use strict';
      
      var _ = require('../../lib/helper');
      var instances = require('../instances');
      Severity: Minor
      Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.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 19 has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
      Open

      },{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(require,module,exports){
      'use strict';
      
      var _ = require('../lib/helper');
      var cls = require('../lib/class');
      Severity: Minor
      Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 7 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 16 has 145 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(require,module,exports){
      'use strict';
      
      var _ = require('../../lib/helper');
      var instances = require('../instances');
      Severity: Major
      Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 5 hrs to fix

        Function 20 has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
        Open

        },{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(require,module,exports){
        'use strict';
        
        var instances = require('./instances');
        
        
        Severity: Minor
        Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 5 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 12 has 139 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(require,module,exports){
        'use strict';
        
        var _ = require('../../lib/helper');
        var dom = require('../../lib/dom');
        Severity: Major
        Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 5 hrs to fix

          Function bindTouchHandler has 132 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
            function shouldPreventDefault(deltaX, deltaY) {
              var scrollTop = element.scrollTop;
              var scrollLeft = element.scrollLeft;
              var magnitudeX = Math.abs(deltaX);
          Severity: Major
          Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 5 hrs to fix

            Function bindKeyboardHandler has 128 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function bindKeyboardHandler(element, i) {
              var hovered = false;
              i.event.bind(element, 'mouseenter', function () {
                hovered = true;
              });
            Severity: Major
            Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 5 hrs to fix

              Function 19 has 112 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(require,module,exports){
              'use strict';
              
              var _ = require('../lib/helper');
              var cls = require('../lib/class');
              Severity: Major
              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 4 hrs to fix

                Function 13 has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                },{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(require,module,exports){
                'use strict';
                
                var instances = require('../instances');
                var updateGeometry = require('../update-geometry');
                Severity: Major
                Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 4 hrs to fix

                  Function 3 has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                  Open

                  },{}],3:[function(require,module,exports){
                  'use strict';
                  
                  var DOM = {};
                  
                  
                  Severity: Minor
                  Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 4 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 15 has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{"../instances":18,"../update-geometry":19}],15:[function(require,module,exports){
                  'use strict';
                  
                  var _ = require('../../lib/helper');
                  var instances = require('../instances');
                  Severity: Major
                  Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 4 hrs to fix

                    Function bindMouseWheelHandler has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function bindMouseWheelHandler(element, i) {
                      var shouldPrevent = false;
                    
                      function shouldPreventDefault(deltaX, deltaY) {
                        var scrollTop = element.scrollTop;
                    Severity: Major
                    Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 4 hrs to fix

                      Function bindSelectionHandler has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function bindSelectionHandler(element, i) {
                        function getRangeNode() {
                          var selection = window.getSelection ? window.getSelection() :
                                          document.getSelection ? document.getSelection() : '';
                          if (selection.toString().length === 0) {
                      Severity: Major
                      Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 3 hrs to fix

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

                        },{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(require,module,exports){
                        'use strict';
                        
                        var _ = require('../../lib/helper');
                        var dom = require('../../lib/dom');
                        Severity: Minor
                        Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.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 18 has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        },{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(require,module,exports){
                        'use strict';
                        
                        var _ = require('../lib/helper');
                        var cls = require('../lib/class');
                        Severity: Major
                        Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 3 hrs to fix

                          Function 1 has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                          Open

                          (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
                          'use strict';
                          
                          var ps = require('../main');
                          var psInstances = require('../plugin/instances');
                          Severity: Minor
                          Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.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 11 has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          },{"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(require,module,exports){
                          'use strict';
                          
                          var _ = require('../../lib/helper');
                          var dom = require('../../lib/dom');
                          Severity: Major
                          Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 3 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language