ericduran/chromeHAR

View on GitHub

Showing 371 of 463 total issues

Function $get has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  this.$get = function() {
    return {
      id: 'en-us',

      NUMBER_FORMATS: {
Severity: Major
Found in bower_components/angular/angular.js - About 2 hrs to fix

    Function dateFilter has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function dateFilter($locale) {
    
    
      var R_ISO8601_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
      function jsonStringToDate(string){
    Severity: Major
    Found in bower_components/angular/angular.js - About 2 hrs to fix

      Function $Browser has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

      angular.mock.$Browser = function() {
        var self = this;
      
        this.isMock = true;
        self.$$url = "http://server/";
      Severity: Minor
      Found in bower_components/angular-mocks/angular-mocks.js - About 2 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 data has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          data: function( key, value ) {
              var attrs, name,
                  elem = this[ 0 ],
                  i = 0,
                  data = null;
      Severity: Major
      Found in bower_components/jquery/jquery.js - About 2 hrs to fix

        Function collectDirectives has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function collectDirectives(node, directives, attrs, maxPriority) {
              var nodeType = node.nodeType,
                  attrsMap = attrs.$attr,
                  match,
                  className;
        Severity: Major
        Found in bower_components/angular/angular.js - About 2 hrs to fix

          Function defer has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var defer = function() {
              var pending = [],
                  value, deferred;
          
              deferred = {
          Severity: Major
          Found in bower_components/angular/angular.js - About 2 hrs to fix

            Function numberInputType has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
              textInputType(scope, element, attr, ctrl, $sniffer, $browser);
            
              ctrl.$parsers.push(function(value) {
                var empty = isEmpty(value);
            Severity: Major
            Found in bower_components/angular/angular.js - About 2 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                              if ( ( mappedTypes || origType === handleObj.origType ) &&
                                  ( !handler || handler.guid === handleObj.guid ) &&
                                  ( !tmp || tmp.test( handleObj.namespace ) ) &&
                                  ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
                                  handlers.splice( j, 1 );
              Severity: Critical
              Found in bower_components/jquery/jquery.js - About 2 hrs to fix

                Consider simplifying this complex logical expression.
                Open

                            if (match) {
                                // parse months, days, hours, minutes, seconds, and milliseconds
                                // provide default values if necessary
                                // parse the UTC offset component
                                var year = Number(match[1]),
                Severity: Critical
                Found in bower_components/es5-shim/es5-shim.js - About 2 hrs to fix

                  Function remove has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      remove: function( elem, types, handler, selector, mappedTypes ) {
                  
                          var j, origCount, tmp,
                              events, t, handleObj,
                              special, handlers, type, namespaces, origType,
                  Severity: Minor
                  Found in bower_components/jquery/jquery.js - About 2 hrs to fix

                    Function readTemplate has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function readTemplate(exception, page) {
                        var headers, lines, lastSection, lastLevel, navigation;
                        if (exception) {
                          console.log(exception);
                        } else {
                    Severity: Minor
                    Found in bower_components/json3/build.js - About 2 hrs to fix

                      Function updateHar has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          $scope.updateHar = function(newData) {
                            // Reset data
                            var data = {};
                            data.lastOnLoad = 0;
                      
                      
                      Severity: Minor
                      Found in js/controllers.js - About 1 hr to fix

                        Function setupModuleLoader has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function setupModuleLoader(window) {
                        
                          function ensure(obj, name, factory) {
                            return obj[name] || (obj[name] = factory());
                          }
                        Severity: Minor
                        Found in bower_components/angular/angular.js - About 1 hr to fix

                          Function buildFragment has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              buildFragment: function( elems, context, scripts, selection ) {
                                  var elem, tmp, tag, wrap, contains, j,
                                      i = 0,
                                      l = elems.length,
                                      fragment = context.createDocumentFragment(),
                          Severity: Minor
                          Found in bower_components/jquery/jquery.js - About 1 hr to fix

                            Function tokenizeFormatString has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            String.tokenizeFormatString = function(format, formatters)
                            {
                                var tokens = [];
                                var substitutionIndex = 0;
                            
                            
                            Severity: Minor
                            Found in js/libs/devTools.js - About 1 hr to fix

                              Function orderByFilter has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function orderByFilter($parse){
                                return function(array, sortPredicate, reverseOrder) {
                                  if (!isArray(array)) return array;
                                  if (!sortPredicate) return array;
                                  sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate];
                              Severity: Minor
                              Found in bower_components/angular/angular.js - About 1 hr to fix

                                Function format has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                String.format = function(format, substitutions, formatters, initialValue, append)
                                {
                                    if (!format || !substitutions || !substitutions.length)
                                        return { formattedResult: append(initialValue, format), unusedSubstitutions: substitutions };
                                
                                
                                Severity: Minor
                                Found in js/libs/devTools.js - About 1 hr to fix

                                  Function extractComments has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function extractComments(source) {
                                    var index = 0, length = source.length, results = [], symbol, position, original;
                                    while (index < length) {
                                      symbol = source[index];
                                      switch (symbol) {
                                  Severity: Minor
                                  Found in bower_components/json3/build.js - About 1 hr to fix

                                    Function $interpolate has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function $interpolate(text, mustHaveExpression) {
                                          var startIndex,
                                              endIndex,
                                              index = 0,
                                              parts = [],
                                    Severity: Minor
                                    Found in bower_components/angular/angular.js - About 1 hr to fix

                                      Function send has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                  send: function( headers, complete ) {
                                                      var i, id,
                                                          xhr = options.xhr();
                                                      xhr.open( options.type, options.url, options.async, options.username, options.password );
                                                      // Apply custom fields if provided
                                      Severity: Minor
                                      Found in bower_components/jquery/jquery.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language