ericduran/chromeHAR

View on GitHub

Showing 463 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 $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 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

        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

            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

              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

                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 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

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      function toggleValidCss(isValid, validationErrorKey) {
                        validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
                        element.
                          removeClass((isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey).
                          addClass((isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);
                    Severity: Major
                    Found in bower_components/angular/angular.js and 1 other location - About 2 hrs to fix
                    bower_components/angular/angular.js on lines 12306..12311

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 75.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      function toggleValidCss(isValid, validationErrorKey) {
                        validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
                        $element.
                          removeClass((isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey).
                          addClass((isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);
                    Severity: Major
                    Found in bower_components/angular/angular.js and 1 other location - About 2 hrs to fix
                    bower_components/angular/angular.js on lines 11080..11085

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 75.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    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

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                    if (!(next = (current.$$childHead || (current !== target && current.$$nextSibling)))) {
                                      while(current !== target && !(next = current.$$nextSibling)) {
                                        current = current.$parent;
                                      }
                                    }
                          Severity: Major
                          Found in bower_components/angular/angular.js and 1 other location - About 1 hr to fix
                          bower_components/angular/angular.js on lines 8117..8121

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 73.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      if (!(next = (current.$$childHead || (current !== target && current.$$nextSibling)))) {
                                        while(current !== target && !(next = current.$$nextSibling)) {
                                          current = current.$parent;
                                        }
                                      }
                          Severity: Major
                          Found in bower_components/angular/angular.js and 1 other location - About 1 hr to fix
                          bower_components/angular/angular.js on lines 8477..8481

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 73.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          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
                                Severity
                                Category
                                Status
                                Source
                                Language