alexminichino/trawell

View on GitHub

Showing 224 of 303 total issues

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

    function Animation(elem, properties, options) {
        var result,
            stopped,
            index = 0,
            length = Animation.prefilters.length,
Severity: Major
Found in src/main/resources/static/js/jQuery.js - About 3 hrs to fix

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

    Dropzone.isValidFile = function (file, acceptedFiles) {
      if (!acceptedFiles) {
        return true;
      } // If there are no accepted mime types, it's OK
      acceptedFiles = acceptedFiles.split(",");
    Severity: Minor
    Found in src/main/resources/static/js/dropzone.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 trigger has 93 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            trigger: function(event, data, elem, onlyHandlers) {
    
                var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
                    eventPath = [elem || document],
                    type = hasOwn.call(event, "type") ? event.type : event,
    Severity: Major
    Found in src/main/resources/static/js/jQuery.js - About 3 hrs to fix

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

          value: function _updateFilesUploadProgress(files, xhr, e) {
            var progress = void 0;
            if (typeof e !== 'undefined') {
              progress = 100 * e.loaded / e.total;
      
      
      Severity: Major
      Found in src/main/resources/static/js/dropzone.js - About 3 hrs to fix

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

                            "CHILD": function(type, what, argument, first, last) {
                                var simple = type.slice(0, 3) !== "nth",
                                    forward = type.slice(-4) !== "last",
                                    ofType = what === "of-type";
        
        Severity: Major
        Found in src/main/resources/static/js/jQuery.js - About 3 hrs to fix

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

              value: function _uploadData(files, dataBlocks) {
                var _this15 = this;
          
                var xhr = new XMLHttpRequest();
          
          
          Severity: Major
          Found in src/main/resources/static/js/dropzone.js - About 3 hrs to fix

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

                        function Sizzle(selector, context, results, seed) {
                            var m, i, elem, nid, match, groups, newSelector,
                                newContext = context && context.ownerDocument,
            
                                // nodeType defaults to 9, since context defaults to document
            Severity: Major
            Found in src/main/resources/static/js/jQuery.js - About 3 hrs to fix

              Function contentLoaded has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
              Open

              var contentLoaded = function contentLoaded(win, fn) {
                var done = false;
                var top = true;
                var doc = win.document;
                var root = doc.documentElement;
              Severity: Minor
              Found in src/main/resources/static/js/dropzone.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 send has 75 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                              send: function(headers, complete) {
                                  var i,
                                      xhr = options.xhr();
              
                                  xhr.open(
              Severity: Major
              Found in src/main/resources/static/js/jQuery.js - About 3 hrs to fix

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

                            function matcherFromGroupMatchers(elementMatchers, setMatchers) {
                                var bySet = setMatchers.length > 0,
                                    byElement = elementMatchers.length > 0,
                                    superMatcher = function(seed, context, xml, results, outermost) {
                                        var elem, j, matcher,
                Severity: Major
                Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

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

                          add: function(elem, types, handler, data, selector) {
                  
                              var handleObjIn, eventHandle, tmp,
                                  events, t, handleObj,
                                  special, handlers, type, namespaces, origType,
                  Severity: Major
                  Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

                    Function createThumbnailFromUrl has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        value: function createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback, crossOrigin) {
                          var _this13 = this;
                    
                          // Not using `new Image` here because of a bug in latest Chrome versions.
                          // See https://github.com/enyo/dropzone/pull/226
                    Severity: Major
                    Found in src/main/resources/static/js/dropzone.js - About 2 hrs to fix

                      Function uploadFiles has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          value: function uploadFiles(files) {
                            var _this14 = this;
                      
                            this._transformFiles(files, function (transformedFiles) {
                              if (files[0].upload.chunked) {
                      Severity: Major
                      Found in src/main/resources/static/js/dropzone.js - About 2 hrs to fix

                        Function resolve has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                                function resolve(depth, deferred, handler, special) {
                                                    return function() {
                                                        var that = this,
                                                            args = arguments,
                                                            mightThrow = function() {
                        Severity: Major
                        Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

                          Function addedfile has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  addedfile: function addedfile(file) {
                                    var _this2 = this;
                          
                                    if (this.element === this.previewsContainer) {
                                      this.element.classList.add("dz-started");
                          Severity: Major
                          Found in src/main/resources/static/js/dropzone.js - About 2 hrs to fix

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

                              function Dropzone(el, options) {
                                _classCallCheck(this, Dropzone);
                            
                                var _this = _possibleConstructorReturn(this, (Dropzone.__proto__ || Object.getPrototypeOf(Dropzone)).call(this));
                            
                            
                            Severity: Major
                            Found in src/main/resources/static/js/dropzone.js - About 2 hrs to fix

                              Consider simplifying this complex logical expression.
                              Open

                                                                  if (forward && useCache) {
                              
                                                                      // Seek `elem` from a previously-cached index
                              
                                                                      // ...in a gzip-friendly way
                              Severity: Critical
                              Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

                                Function done has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                            function done(status, nativeStatusText, responses, headers) {
                                                var isSuccess, success, error, response, modified,
                                                    statusText = nativeStatusText;
                                
                                                // Ignore repeat invocations
                                Severity: Major
                                Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

                                  Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                              function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
                                                  if (postFilter && !postFilter[expando]) {
                                                      postFilter = setMatcher(postFilter);
                                                  }
                                                  if (postFinder && !postFinder[expando]) {
                                  Severity: Major
                                  Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix

                                    Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                        superMatcher = function(seed, context, xml, results, outermost) {
                                                            var elem, j, matcher,
                                                                matchedCount = 0,
                                                                i = "0",
                                                                unmatched = seed && [],
                                    Severity: Major
                                    Found in src/main/resources/static/js/jQuery.js - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language