ericduran/chromeHAR

View on GitHub

Showing 371 of 463 total issues

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

    jQuery.clean = function( elems, context, fragment, scripts ) {
        // Set context per 1.8 logic
        context = context || document;
        context = !context.nodeType && context[0] || context;
        context = context.ownerDocument || context;
Severity: Minor
Found in bower_components/jquery/jquery-migrate.js - About 1 hr to fix

    Function toISOString has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Date.prototype.toISOString = function toISOString() {
            var result, length, value, year, month;
            if (!isFinite(this)) {
                throw new RangeError("Date.prototype.toISOString called on non-finite value.");
            }
    Severity: Minor
    Found in bower_components/es5-shim/es5-shim.js - About 1 hr to fix

      Function $ExceptionHandlerProvider has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      angular.mock.$ExceptionHandlerProvider = function() {
        var handler;
      
        /**
         * @ngdoc method
      Severity: Minor
      Found in bower_components/angular-mocks/angular-mocks.js - About 1 hr to fix

        Function * has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                "*": [function( prop, value ) {
                    var tween = this.createTween( prop, value ),
                        target = tween.cur(),
                        parts = rfxnum.exec( value ),
                        unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
        Severity: Minor
        Found in bower_components/jquery/jquery.js - About 1 hr to fix

          Function off has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              off: function( types, selector, fn ) {
                  var handleObj, type;
                  if ( types && types.preventDefault && types.handleObj ) {
                      // ( event )  dispatched jQuery.Event
                      handleObj = types.handleObj;
          Severity: Minor
          Found in bower_components/jquery/jquery.js - About 1 hr to fix

            Function clone has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                    var i, l, srcElements, destElements,
                        clone = elem.cloneNode( true ),
                        inPage = jQuery.contains( elem.ownerDocument, elem );
            
            
            Severity: Minor
            Found in bower_components/jquery/jquery.js - About 1 hr to fix

              Function offset has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jQuery.fn.offset = function( options ) {
                  if ( arguments.length ) {
                      return options === undefined ?
                          this :
                          this.each(function( i ) {
              Severity: Minor
              Found in bower_components/jquery/jquery.js - About 1 hr to fix

                Function serialize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function serialize(object) {
                    var out;
                
                    if (angular.isElement(object)) {
                      object = angular.element(object);
                Severity: Minor
                Found in bower_components/angular-mocks/angular-mocks.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                    if (value && value.length !== 0) {
                      var v = lowercase("" + value);
                      value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');
                    } else {
                      value = false;
                  Severity: Major
                  Found in bower_components/angular/angular.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                      if (decodeURIComponent(match.path) == basePath && !isUndefined(match.hash) &&
                          match.hash.indexOf(hashPrefix) === 0) {
                        return url;
                      // convert html5 url -> hashbang url
                      } else {
                    Severity: Major
                    Found in bower_components/angular/angular.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                                  if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                          support.getById && context.nodeType === 9 && documentIsHTML &&
                                          Expr.relative[ tokens[1].type ] ) {
                      
                                      context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                      Severity: Major
                      Found in bower_components/jquery/jquery.js - About 1 hr to fix

                        Function readSource has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                        fs.readFile(path.join(__dirname, "lib", "json3.js"), "utf8", function readSource(exception, source) {
                          var error, output, compiler, results;
                          if (exception) {
                            console.log(exception);
                          } else {
                        Severity: Minor
                        Found in bower_components/json3/build.js - About 55 mins 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 compileTemplateUrl has 7 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            function compileTemplateUrl(directives, beforeTemplateNodeLinkFn, $compileNode, tAttrs,
                                $rootElement, replace, childTranscludeFn) {
                        Severity: Major
                        Found in bower_components/angular/angular.js - About 50 mins to fix

                          Function $get has 7 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                function( $rootScope,   $location,   $routeParams,   $q,   $injector,   $http,   $templateCache) {
                          Severity: Major
                          Found in bower_components/angular/angular.js - About 50 mins to fix

                            Function Date has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    function Date(Y, M, D, h, m, s, ms) {
                            Severity: Major
                            Found in bower_components/es5-shim/es5-shim.js - About 50 mins to fix

                              Function access has 7 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
                              Severity: Major
                              Found in bower_components/jquery/jquery.js - About 50 mins to fix

                                Function serialize has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                      var serialize = function (property, object, callback, properties, whitespace, indentation, stack) {
                                Severity: Major
                                Found in bower_components/json3/lib/json3.js - About 50 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                          if (obj.hasOwnProperty(key)) {
                                            iterator.call(context, obj[key], key);
                                          }
                                  Severity: Major
                                  Found in bower_components/angular/angular.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                              for(key=0; key<length; key++) {
                                                if (!equals(o1[key], o2[key])) return false;
                                              }
                                    Severity: Major
                                    Found in bower_components/angular/angular.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                              for(key in o1) {
                                                if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
                                                if (!equals(o1[key], o2[key])) return false;
                                                keySet[key] = true;
                                              }
                                      Severity: Major
                                      Found in bower_components/angular/angular.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language