ericduran/chromeHAR

View on GitHub
bower_components/es5-shim/es5-shim.js

Summary

Maintainability
F
5 days
Test Coverage

File es5-shim.js has 764 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Copyright 2009-2012 by contributors, MIT License
// vim: ts=4 sts=4 sw=4 expandtab

// Module systems magic dance
(function (definition) {
Severity: Major
Found in bower_components/es5-shim/es5-shim.js - About 1 day to fix

    Consider simplifying this complex logical expression.
    Open

                    if (
                        hour < (
                            minute > 0 || second > 0 || millisecond > 0 ?
                            24 : 25
                        ) &&
    Severity: Critical
    Found in bower_components/es5-shim/es5-shim.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

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

                  Date.parse = function parse(string) {
                      var match = isoDateExpression.exec(string);
                      if (match) {
                          // parse months, days, hours, minutes, seconds, and milliseconds
                          // provide default values if necessary
          Severity: Minor
          Found in bower_components/es5-shim/es5-shim.js - About 1 hr to fix

            Function reduceRight has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
                    var object = toObject(this),
                        self = splitString && _toString(this) == "[object String]" ?
                            this.split("") :
                            object,
            Severity: Minor
            Found in bower_components/es5-shim/es5-shim.js - About 1 hr to fix

              Function splice has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      Array.prototype.splice = function(start, deleteCount) {
                          var result
                              , args = _Array_slice_.call(arguments, 2)
                              , addElementsCount = args.length
                          ;
              Severity: Minor
              Found in bower_components/es5-shim/es5-shim.js - About 1 hr to fix

                Function reduce has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    Array.prototype.reduce = function reduce(fun /*, initial*/) {
                        var object = toObject(this),
                            self = splitString && _toString(this) == "[object String]" ?
                                this.split("") :
                                object,
                Severity: Minor
                Found in bower_components/es5-shim/es5-shim.js - About 1 hr to fix

                  Function bind has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      Function.prototype.bind = function bind(that) { // .length is 1
                          // 1. Let Target be the this value.
                          var target = this;
                          // 2. If IsCallable(Target) is false, throw a TypeError exception.
                          if (typeof target != "function") {
                  Severity: Minor
                  Found in bower_components/es5-shim/es5-shim.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 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

                        Avoid deeply nested control flow statements.
                        Open

                                            if(start == 0) { // tiny optimisation #2
                                                this.unshift.apply(this, args);
                                                return [];
                                            }
                        Severity: Major
                        Found in bower_components/es5-shim/es5-shim.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if(start == this.length) { // tiny optimisation #1
                                                  this.push.apply(this, args);
                                                  return [];
                                              }
                          Severity: Major
                          Found in bower_components/es5-shim/es5-shim.js - About 45 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return array_splice.call(this, start, deleteCount);
                            Severity: Major
                            Found in bower_components/es5-shim/es5-shim.js - About 30 mins to fix

                              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

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

                              (function (definition) {
                                  // RequireJS
                                  if (typeof define == "function") {
                                      define(definition);
                                  // YUI3
                              Severity: Major
                              Found in bower_components/es5-shim/es5-shim.js and 1 other location - About 1 hr to fix
                              bower_components/es5-shim/es5-sham.js on lines 5..444

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

                              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

                                      var object = toObject(this),
                                          self = splitString && _toString(this) == "[object String]" ?
                                              this.split("") :
                                              object,
                                          length = self.length >>> 0,
                              Severity: Major
                              Found in bower_components/es5-shim/es5-shim.js and 1 other location - About 1 hr to fix
                              bower_components/es5-shim/es5-shim.js on lines 437..442

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

                              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

                                      var object = toObject(this),
                                          self = splitString && _toString(this) == "[object String]" ?
                                              this.split("") :
                                              object,
                                          length = self.length >>> 0,
                              Severity: Major
                              Found in bower_components/es5-shim/es5-shim.js and 1 other location - About 1 hr to fix
                              bower_components/es5-shim/es5-shim.js on lines 411..416

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

                              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

                                      var object = toObject(this),
                                          self = splitString && _toString(this) == "[object String]" ?
                                              this.split("") :
                                              object,
                                          length = self.length >>> 0;
                              Severity: Major
                              Found in bower_components/es5-shim/es5-shim.js and 1 other location - About 1 hr to fix
                              bower_components/es5-shim/es5-shim.js on lines 512..516

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

                              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

                                      var object = toObject(this),
                                          self = splitString && _toString(this) == "[object String]" ?
                                              this.split("") :
                                              object,
                                          length = self.length >>> 0;
                              Severity: Major
                              Found in bower_components/es5-shim/es5-shim.js and 1 other location - About 1 hr to fix
                              bower_components/es5-shim/es5-shim.js on lines 463..467

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

                              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

                                      var self = splitString && _toString(this) == "[object String]" ?
                                              this.split("") :
                                              toObject(this),
                                          length = self.length >>> 0;
                              Severity: Minor
                              Found in bower_components/es5-shim/es5-shim.js and 1 other location - About 45 mins to fix
                              bower_components/es5-shim/es5-shim.js on lines 594..597

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

                              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

                                      var self = splitString && _toString(this) == "[object String]" ?
                                              this.split("") :
                                              toObject(this),
                                          length = self.length >>> 0;
                              Severity: Minor
                              Found in bower_components/es5-shim/es5-shim.js and 1 other location - About 45 mins to fix
                              bower_components/es5-shim/es5-shim.js on lines 564..567

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

                              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

                              There are no issues that match your filters.

                              Category
                              Status