daniellmb/AQUA

View on GitHub

Showing 176 of 176 total issues

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

angular.mock.$AsyncCallbackDecorator = function($delegate) {
  var callbacks = [];
  var addFn = function(fn) {
    callbacks.push(fn);
  };
Severity: Major
Found in demos/requirejs/bower_components/mocks/angular-mocks.js and 1 other location - About 3 hrs to fix
demos/angularjs/bower_components/angular-mocks/angular-mocks.js on lines 1699..1711

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

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

angular.mock.$AsyncCallbackDecorator = function($delegate) {
  var callbacks = [];
  var addFn = function(fn) {
    callbacks.push(fn);
  };
demos/requirejs/bower_components/mocks/angular-mocks.js on lines 1699..1711

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

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

            makeRequire: function (relMap, options) {
                options = options || {};

                function localRequire(deps, callback, errback) {
                    var id, map, requireMod;
Severity: Major
Found in demos/requirejs/bower_components/requirejs/require.js - About 3 hrs to fix

Function _ has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var _ = (function (_) {
        _.defaults = function (object) {
            if (!object) {
                return object;
            }
Severity: Major
Found in demos/vanillajs/bower_components/todomvc-common/base.js - About 3 hrs to fix

Function _ has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var _ = (function (_) {
        _.defaults = function (object) {
            if (!object) {
                return object;
            }
Severity: Major
Found in demos/requirejs/bower_components/todomvc-common/base.js - About 3 hrs to fix

Function _ has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var _ = (function (_) {
        _.defaults = function (object) {
            if (!object) {
                return object;
            }
Severity: Major
Found in demos/angularjs/bower_components/todomvc-common/base.js - About 3 hrs to fix

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

    Controller.prototype.editItemCancel = function (id) {
        var that = this;
        that.model.read(id, function (data) {
            that.view.render('editItemDone', {id: id, title: data[0].title});
        });
Severity: Major
Found in demos/vanillajs/js/controller.js and 1 other location - About 2 hrs to fix
demos/vanillajs/js/controller.js on lines 111..116

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

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

    Controller.prototype.editItem = function (id) {
        var that = this;
        that.model.read(id, function (data) {
            that.view.render('editItem', {id: id, title: data[0].title});
        });
Severity: Major
Found in demos/vanillajs/js/controller.js and 1 other location - About 2 hrs to fix
demos/vanillajs/js/controller.js on lines 135..140

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

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

    function updateRoute() {
      var next = parseRoute(),
          last = $route.current;

      if (next && last && next.$$route === last.$$route
Severity: Major
Found in demos/angularjs/bower_components/angular-route/angular-route.js - About 2 hrs to fix

Function configure has 67 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            configure: function (cfg) {
                //Make sure the baseUrl ends in a slash.
                if (cfg.baseUrl) {
                    if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
                        cfg.baseUrl += '/';
Severity: Major
Found in demos/requirejs/bower_components/requirejs/require.js - About 2 hrs to fix

File angular-route.js has 278 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * @license AngularJS v1.2.16
 * (c) 2010-2014 Google, Inc. http://angularjs.org
 * License: MIT
 */
Severity: Minor
Found in demos/angularjs/bower_components/angular-route/angular-route.js - About 2 hrs to fix

Function $IntervalProvider has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

angular.mock.$IntervalProvider = function() {
  this.$get = ['$rootScope', '$q',
       function($rootScope,   $q) {
    var repeatFns = [],
        nextRepeatId = 0,
Severity: Major
Found in demos/angularjs/bower_components/angular-mocks/angular-mocks.js - About 2 hrs to fix

Function $IntervalProvider has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

angular.mock.$IntervalProvider = function() {
  this.$get = ['$rootScope', '$q',
       function($rootScope,   $q) {
    var repeatFns = [],
        nextRepeatId = 0,
Severity: Major
Found in demos/requirejs/bower_components/mocks/angular-mocks.js - About 2 hrs to fix

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

       function($rootScope,   $q) {
    var repeatFns = [],
        nextRepeatId = 0,
        now = 0;

Severity: Major
Found in demos/angularjs/bower_components/angular-mocks/angular-mocks.js - About 2 hrs to fix

Function check has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            check: function () {
                if (!this.enabled || this.enabling) {
                    return;
                }

Severity: Major
Found in demos/requirejs/bower_components/requirejs/require.js - About 2 hrs to fix

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

       function($rootScope,   $q) {
    var repeatFns = [],
        nextRepeatId = 0,
        now = 0;

Severity: Major
Found in demos/requirejs/bower_components/mocks/angular-mocks.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 demos/angularjs/bower_components/angular-mocks/angular-mocks.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 demos/requirejs/bower_components/mocks/angular-mocks.js - About 2 hrs to fix

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

        $scope.addTodo = function () {
            var newTodo = $scope.newTodo.trim();
            if (!newTodo.length) {
                return;
            }
Severity: Major
Found in demos/angularjs/js/controllers/todoCtrl.js and 1 other location - About 2 hrs to fix
demos/requirejs/js/controllers/todo.js on lines 38..50

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

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

            $scope.addTodo = function () {
                var newTodo = $scope.newTodo.trim();
                if (!newTodo.length) {
                    return;
                }
Severity: Major
Found in demos/requirejs/js/controllers/todo.js and 1 other location - About 2 hrs to fix
demos/angularjs/js/controllers/todoCtrl.js on lines 35..47

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

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

Severity
Category
Status
Source
Language