ericduran/chromeHAR

View on GitHub

Showing 463 of 463 total issues

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

jQuery.support = (function( support ) {
    var input = document.createElement("input"),
        fragment = document.createDocumentFragment(),
        div = document.createElement("div"),
        select = document.createElement("select"),
Severity: Major
Found in bower_components/jquery/jquery.js - About 2 hrs to fix

    Function toFixed has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            Number.prototype.toFixed = function (fractionDigits) {
                var f, x, s, m, e, z, j, k;
    
                // Test for NaN and round fractionDigits down
                f = Number(fractionDigits);
    Severity: Major
    Found in bower_components/es5-shim/es5-shim.js - About 2 hrs to fix

      Function $Browser has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      angular.mock.$Browser = function() {
        var self = this;
      
        this.isMock = true;
        self.$$url = "http://server/";
      Severity: Major
      Found in bower_components/angular-mocks/angular-mocks.js - About 2 hrs to fix

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

              var get = function (value) {
                var results, hasMembers;
                if (value == "$") {
                  // Unexpected end of input.
                  abort();
        Severity: Major
        Found in bower_components/json3/lib/json3.js - About 2 hrs to fix

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

            this.$get = ['$parse', function($parse) {
              var startSymbolLength = startSymbol.length,
                  endSymbolLength = endSymbol.length;
          
              /**
          Severity: Major
          Found in bower_components/angular/angular.js - About 2 hrs to fix

            Function $http has 57 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function $http(config) {
                  config.method = uppercase(config.method);
            
                  var reqTransformFn = config.transformRequest || $config.transformRequest,
                      respTransformFn = config.transformResponse || $config.transformResponse,
            Severity: Major
            Found in bower_components/angular/angular.js - About 2 hrs to fix

              Function formatNumber has 57 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {
                if (isNaN(number) || !isFinite(number)) return '';
              
                var isNegative = number < 0;
                number = Math.abs(number);
              Severity: Major
              Found in bower_components/angular/angular.js - About 2 hrs to fix

                Function readInfo has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                fs.readFile(path.join(__dirname, "README.md"), "utf8", function readInfo(exception, source) {
                  if (exception) {
                    console.log(exception);
                  } else {
                    // Read the project page template.
                Severity: Major
                Found in bower_components/json3/build.js - About 2 hrs to fix

                  Function format has a Cognitive Complexity of 17 (exceeds 5 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 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

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

                  if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
                      defineGetter = call.bind(prototypeOfObject.__defineGetter__);
                      defineSetter = call.bind(prototypeOfObject.__defineSetter__);
                      lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
                      lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
                  Severity: Major
                  Found in bower_components/es5-shim/es5-shim.js and 1 other location - About 2 hrs to fix
                  bower_components/es5-shim/es5-sham.js on lines 29..34

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

                  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

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

                  if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
                      defineGetter = call.bind(prototypeOfObject.__defineGetter__);
                      defineSetter = call.bind(prototypeOfObject.__defineSetter__);
                      lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
                      lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
                  Severity: Major
                  Found in bower_components/es5-shim/es5-sham.js and 1 other location - About 2 hrs to fix
                  bower_components/es5-shim/es5-shim.js on lines 173..178

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

                  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 sendReq has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function sendReq(config, reqData, reqHeaders) {
                        var deferred = $q.defer(),
                            promise = deferred.promise,
                            cache,
                            cachedResp,
                  Severity: Major
                  Found in bower_components/angular/angular.js - About 2 hrs to fix

                    Function ajaxConvert has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function ajaxConvert( s, response, jqXHR, isSuccess ) {
                        var conv2, current, conv, tmp, prev,
                            converters = {},
                            // Work with a copy of dataTypes in case we need to modify it for conversion
                            dataTypes = s.dataTypes.slice();
                    Severity: Major
                    Found in bower_components/jquery/jquery.js - About 2 hrs to fix

                      Function $LocaleProvider has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function $LocaleProvider(){
                        this.$get = function() {
                          return {
                            id: 'en-us',
                      
                      
                      Severity: Major
                      Found in bower_components/angular/angular.js - About 2 hrs to fix

                        Function cspSafeGetterFn has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function cspSafeGetterFn(key0, key1, key2, key3, key4) {
                          return function(scope, locals) {
                            var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope,
                                promise;
                        
                        
                        Severity: Major
                        Found in bower_components/angular/angular.js - About 2 hrs to fix

                          Function init has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              init: function( selector, context, rootjQuery ) {
                                  var match, elem;
                          
                                  // HANDLE: $(""), $(null), $(undefined), $(false)
                                  if ( !selector ) {
                          Severity: Major
                          Found in bower_components/jquery/jquery.js - About 2 hrs to fix

                            Function compileNodes has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority) {
                                  var linkFns = [],
                                      nodeLinkFn, childLinkFn, directives, attrs, linkFnFound;
                            
                                  for(var i = 0; i < nodeList.length; i++) {
                            Severity: Major
                            Found in bower_components/angular/angular.js - About 2 hrs to fix

                              Function domManip has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  domManip: function( args, callback, allowIntersection ) {
                              
                                      // Flatten any nested arrays
                                      args = core_concat.apply( [], args );
                              
                              
                              Severity: Major
                              Found in bower_components/jquery/jquery.js - About 2 hrs to fix

                                Function name has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        Resource[name] = function(a1, a2, a3, a4) {
                                          var params = {};
                                          var data;
                                          var success = noop;
                                          var error = null;
                                Severity: Major
                                Found in bower_components/angular-resource/angular-resource.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
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language