daniellmb/AQUA

View on GitHub

Showing 176 of 176 total issues

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

  function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
    var xhr = new MockXhr(),
        expectation = expectations[0],
        wasExpected = false;

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

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

  function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
    var xhr = new MockXhr(),
        expectation = expectations[0],
        wasExpected = false;

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

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

        function checkLoaded() {
            var err, usingPathFallback,
                waitInterval = config.waitSeconds * 1000,
                //It is possible to disable the wait interval by using waitSeconds of 0.
                expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
Severity: Major
Found in demos/requirejs/bower_components/requirejs/require.js - About 2 hrs to fix

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

    .controller('TodoCtrl', function TodoCtrl($scope, $routeParams, $filter, todoStorage) {
        'use strict';

        var todos = $scope.todos = todoStorage.get();

Severity: Major
Found in demos/angularjs/js/controllers/todoCtrl.js - About 2 hrs to fix

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

function ngViewFactory(   $route,   $anchorScroll,   $animate) {
  return {
    restrict: 'ECA',
    terminal: true,
    priority: 400,
Severity: Major
Found in demos/angularjs/bower_components/angular-route/angular-route.js - About 2 hrs to fix

Function makeModuleMap has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
            var url, pluginModule, suffix, nameParts,
                prefix = null,
                parentName = parentModuleMap ? parentModuleMap.name : null,
                originalName = name,
Severity: Major
Found in demos/requirejs/bower_components/requirejs/require.js - About 2 hrs to fix

Function TodoController has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function TodoController($scope, $location, todoStorage, filterFilter) {
            var todos = $scope.todos = todoStorage.get();

            $scope.newTodo = '';
            $scope.editedTodo = null;
Severity: Major
Found in demos/requirejs/js/controllers/todo.js - About 2 hrs to fix

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

angular.mock.$LogProvider = function() {
  var debug = true;

  function concat(array1, array2, index) {
    return array1.concat(Array.prototype.slice.call(array2, index));
Severity: Major
Found in demos/requirejs/bower_components/mocks/angular-mocks.js - About 2 hrs to fix

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

angular.mock.$LogProvider = function() {
  var debug = true;

  function concat(array1, array2, index) {
    return array1.concat(Array.prototype.slice.call(array2, index));
Severity: Major
Found in demos/angularjs/bower_components/angular-mocks/angular-mocks.js - About 2 hrs to fix

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

        function normalize(name, baseName, applyMap) {
            var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
                foundMap, foundI, foundStarMap, starI, normalizedBaseParts,
                baseParts = (baseName && baseName.split('/')),
                map = config.map,
Severity: Major
Found in demos/requirejs/bower_components/requirejs/require.js - About 2 hrs to fix

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

    Controller.prototype.showCompleted = function () {
        var that = this;
        that.model.read({ completed: true }, function (data) {
            that.view.render('showEntries', data);
        });
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 74..79

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

    Controller.prototype.showActive = function () {
        var that = this;
        that.model.read({ completed: false }, function (data) {
            that.view.render('showEntries', data);
        });
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 84..89

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

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

        $scope.doneEditing = function (todo) {
            $scope.editedTodo = null;
            todo.title = todo.title.trim();

            if (!todo.title) {
Severity: Major
Found in demos/angularjs/js/controllers/todoCtrl.js and 1 other location - About 1 hr to fix
demos/requirejs/js/controllers/todo.js on lines 58..65

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

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.doneEditing = function (todo) {
                $scope.editedTodo = null;
                todo.title = todo.title.trim();

                if (!todo.title) {
Severity: Major
Found in demos/requirejs/js/controllers/todo.js and 1 other location - About 1 hr to fix
demos/angularjs/js/controllers/todoCtrl.js on lines 55..62

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

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

    link: function(scope, $element, attr, ctrl, $transclude) {
        var currentScope,
            currentElement,
            previousElement,
            autoScrollExp = attr.autoscroll,
Severity: Minor
Found in demos/angularjs/bower_components/angular-route/angular-route.js - About 1 hr to fix

Function dump has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

angular.mock.dump = function(object) {
  return serialize(object);

  function serialize(object) {
    var out;
Severity: Minor
Found in demos/requirejs/bower_components/mocks/angular-mocks.js - About 1 hr to fix

Function dump has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

angular.mock.dump = function(object) {
  return serialize(object);

  function serialize(object) {
    var out;
Severity: Minor
Found in demos/angularjs/bower_components/angular-mocks/angular-mocks.js - About 1 hr to fix

Function template has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _.template = function(text, data, settings) {
            var render;
            settings = _.defaults({}, settings, _.templateSettings);

            // Combine delimiters into one regular expression via alternation.
Severity: Minor
Found in demos/requirejs/bower_components/todomvc-common/base.js - About 1 hr to fix

Function template has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _.template = function(text, data, settings) {
            var render;
            settings = _.defaults({}, settings, _.templateSettings);

            // Combine delimiters into one regular expression via alternation.
Severity: Minor
Found in demos/vanillajs/bower_components/todomvc-common/base.js - About 1 hr to fix

Function template has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _.template = function(text, data, settings) {
            var render;
            settings = _.defaults({}, settings, _.templateSettings);

            // Combine delimiters into one regular expression via alternation.
Severity: Minor
Found in demos/angularjs/bower_components/todomvc-common/base.js - About 1 hr to fix
Severity
Category
Status
Source
Language