alexminichino/trawell

View on GitHub

Showing 224 of 303 total issues

Function Dropzone has a Cognitive Complexity of 1133 (exceeds 5 allowed). Consider refactoring.
Open

var Dropzone = function (_Emitter) {
  _inherits(Dropzone, _Emitter);

  _createClass(Dropzone, null, [{
    key: "initClass",
Severity: Minor
Found in src/main/resources/static/js/dropzone.js - About 3 wks 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

File jQuery.js has 6789 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v3.4.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in src/main/resources/static/js/jQuery.js - About 2 wks to fix

    Function Dropzone has 1794 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Dropzone = function (_Emitter) {
      _inherits(Dropzone, _Emitter);
    
      _createClass(Dropzone, null, [{
        key: "initClass",
    Severity: Major
    Found in src/main/resources/static/js/dropzone.js - About 1 wk to fix

      Function Sizzle has 1457 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              (function(window) {
      
                  var i,
                      support,
                      Expr,
      Severity: Major
      Found in src/main/resources/static/js/jQuery.js - About 1 wk to fix

        File dropzone.js has 2373 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        "use strict";
        
        var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
        
        function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
        Severity: Major
        Found in src/main/resources/static/js/dropzone.js - About 6 days to fix

          Function initClass has 354 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              value: function initClass() {
          
                // Exposing the emitter class, mainly for tests
                this.prototype.Emitter = Emitter;
          
          
          Severity: Major
          Found in src/main/resources/static/js/dropzone.js - About 1 day to fix

            Function ajax has 252 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    ajax: function(url, options) {
            
                        // If url is an object, simulate pre-1.5 signature
                        if (typeof url === "object") {
                            options = url;
            Severity: Major
            Found in src/main/resources/static/js/jQuery.js - About 1 day to fix

              Function setDocument has 245 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          setDocument = Sizzle.setDocument = function(node) {
                              var hasCompare, subWindow,
                                  doc = node ? node.ownerDocument || node : preferredDoc;
              
                              // Return early if doc is invalid or already selected
              Severity: Major
              Found in src/main/resources/static/js/jQuery.js - About 1 day to fix

                Function Deferred has 181 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        Deferred: function(func) {
                            var tuples = [
                
                                    // action, add listener, callbacks,
                                    // ... .then handlers, argument index, [final state]
                Severity: Major
                Found in src/main/resources/static/js/jQuery.js - About 7 hrs to fix

                  Function Emitter has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var Emitter = function () {
                    function Emitter() {
                      _classCallCheck(this, Emitter);
                    }
                  
                  
                  Severity: Minor
                  Found in src/main/resources/static/js/dropzone.js - About 6 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 getElements has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Dropzone.getElements = function (els, name) {
                    var el = void 0,
                        elements = void 0;
                    if (els instanceof Array) {
                      elements = [];
                  Severity: Minor
                  Found in src/main/resources/static/js/dropzone.js - About 6 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 ExifRestore has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var ExifRestore = function () {
                    function ExifRestore() {
                      _classCallCheck(this, ExifRestore);
                    }
                  
                  
                  Severity: Minor
                  Found in src/main/resources/static/js/dropzone.js - About 6 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 ExifRestore has 156 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var ExifRestore = function () {
                    function ExifRestore() {
                      _classCallCheck(this, ExifRestore);
                    }
                  
                  
                  Severity: Major
                  Found in src/main/resources/static/js/dropzone.js - About 6 hrs to fix

                    User has 42 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    @Entity
                    @Inheritance(strategy = InheritanceType.JOINED)
                    /**
                     * @author Milione Vincent class a user on platform
                     */
                    Severity: Minor
                    Found in src/main/java/com/trawell/models/User.java - About 5 hrs to fix

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

                          value: function init() {
                            var _this3 = this;
                      
                            // In case it isn't set already
                            if (this.element.tagName === "form") {
                      Severity: Major
                      Found in src/main/resources/static/js/dropzone.js - About 5 hrs to fix

                        Function discover has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
                        Open

                        Dropzone.discover = function () {
                          var dropzones = void 0;
                          if (document.querySelectorAll) {
                            dropzones = document.querySelectorAll(".dropzone");
                          } else {
                        Severity: Minor
                        Found in src/main/resources/static/js/dropzone.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 defaultPrefilter has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function defaultPrefilter(elem, props, opts) {
                                var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
                                    isBox = "width" in props || "height" in props,
                                    anim = this,
                                    orig = {},
                        Severity: Major
                        Found in src/main/resources/static/js/jQuery.js - About 4 hrs to fix

                          Function Callbacks has 121 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              jQuery.Callbacks = function(options) {
                          
                                  // Convert options from String-formatted to Object-formatted if needed
                                  // (we check in cache first)
                                  options = typeof options === "string" ?
                          Severity: Major
                          Found in src/main/resources/static/js/jQuery.js - About 4 hrs to fix

                            Function isBrowserSupported has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                            Open

                            Dropzone.isBrowserSupported = function () {
                              var capableBrowser = true;
                            
                              if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {
                                if (!("classList" in document.createElement("a"))) {
                            Severity: Minor
                            Found in src/main/resources/static/js/dropzone.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 then has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                                then: function(onFulfilled, onRejected, onProgress) {
                                                    var maxDepth = 0;
                            
                                                    function resolve(depth, deferred, handler, special) {
                                                        return function() {
                            Severity: Major
                            Found in src/main/resources/static/js/jQuery.js - About 4 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language