mjackson/mach

View on GitHub

Showing 200 of 382 total issues

File jquery-1.8.3.js has 6532 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v1.8.3
 * http://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in modules/middleware/__tests__/fixtures/jquery-1.8.3.js - About 2 wks to fix

    File mach.js has 2315 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function webpackUniversalModuleDefinition(root, factory) {
        if(typeof exports === 'object' && typeof module === 'object')
            module.exports = factory();
        else if(typeof define === 'function' && define.amd)
            define(factory);
    Severity: Major
    Found in lib/umd/mach.js - About 6 days to fix

      Function makePromise has 553 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              return function makePromise(environment) {
      
                  var tasks = environment.scheduler;
                  var emitRejection = initEmitRejection();
      
      
      Severity: Major
      Found in lib/umd/mach.js - About 2 days to fix

        Function execute has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
        Open

        Parser.prototype.execute = function (chunk) {
          var chunkLength = chunk.length,
              prevIndex = this.index,
              index = this.index,
              state = this.state,
        Severity: Minor
        Found in modules/multipart/Parser.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 ajax has 240 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 modules/middleware/__tests__/fixtures/jquery-1.8.3.js - About 1 day to fix

          Function execute has 166 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Parser.prototype.execute = function (chunk) {
            var chunkLength = chunk.length,
                prevIndex = this.index,
                index = this.index,
                state = this.state,
          Severity: Major
          Found in modules/multipart/Parser.js - About 6 hrs to fix

            Function support has 143 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            jQuery.support = (function() {
            
                var support,
                    all,
                    a,
            Severity: Major
            Found in modules/middleware/__tests__/fixtures/jquery-1.8.3.js - About 5 hrs to fix

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

              function createRouter(app, map) {
                // Allow mach.router(map)
                if (typeof app === 'object') {
                  map = app;
                  app = null;
              Severity: Minor
              Found in modules/middleware/router.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 exports has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
              Open

              module.exports = function (mach) {
                mach.bind = require('../utils/bindApp');
                mach.createConnection = require('../utils/createConnection');
                mach.serve = require('../utils/serveApp');
              
              
              Severity: Minor
              Found in modules/extensions/server.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 Callbacks has 127 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 modules/middleware/__tests__/fixtures/jquery-1.8.3.js - About 5 hrs to fix

                Consider simplifying this complex logical expression.
                Open

                            if ( event.pageX == null && original.clientX != null ) {
                                eventDoc = event.target.ownerDocument || document;
                                doc = eventDoc.documentElement;
                                body = eventDoc.body;
                
                
                Severity: Critical
                Found in modules/middleware/__tests__/fixtures/jquery-1.8.3.js - About 5 hrs to fix

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

                  function describeSessionStore(store, skip) {
                    if (!skip) {
                      beforeEach(function () {
                        if (typeof store.purge === 'function')
                          return store.purge();
                  Severity: Major
                  Found in modules/middleware/session/__tests__/describeSessionStore.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 modules/middleware/__tests__/fixtures/jquery-1.8.3.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 modules/middleware/__tests__/fixtures/jquery-1.8.3.js - About 3 hrs to fix

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

                        module.exports = function (mach) {
                          mach.bind = require('../utils/bindApp');
                          mach.createConnection = require('../utils/createConnection');
                          mach.serve = require('../utils/serveApp');
                        
                        
                        Severity: Major
                        Found in modules/extensions/server.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 modules/middleware/__tests__/fixtures/jquery-1.8.3.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 modules/middleware/__tests__/fixtures/jquery-1.8.3.js - About 3 hrs to fix

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

                              function createMapper(app, map) {
                                // Allow mach.mapper(map)
                                if (typeof app === 'object') {
                                  map = app;
                                  app = null;
                              Severity: Minor
                              Found in modules/middleware/mapper.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 exports has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                              Open

                              module.exports = function (mach) {
                                mach.Message.PARSERS['multipart/form-data'] = function (message, maxLength) {
                                  function partHandler(part) {
                                    return message.handlePart(part);
                                  }
                              Severity: Minor
                              Found in modules/extensions/multipart.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 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 modules/middleware/__tests__/fixtures/jquery-1.8.3.js - About 3 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language