preston/bittorious

View on GitHub

Showing 235 of 235 total issues

Function $$AnimateRunnerFactory has 114 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var $$AnimateRunnerFactory = ['$q', '$$rAFMutex', function($q, $$rAFMutex) {
  var INITIAL_STATE = 0;
  var DONE_PENDING_STATE = 1;
  var DONE_COMPLETE_STATE = 2;

Severity: Major
Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 4 hrs to fix

    Function $translateSanitizationProvider has 112 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function $translateSanitizationProvider () {
    
      'use strict';
    
      var $sanitize,
    Severity: Major
    Found in lib/assets/bower_components/angular-translate/angular-translate.js - About 4 hrs to fix

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

              user.post('approve', { 'id' : user.id }).then(function(u) {
                  growl.success(u.name + ' has been approved!');
                  var i = $scope.users.indexOf(u);
                  if(i > -1) {
                      $scope.users.splice(i, 1);
      app/assets/javascripts/angular-app/controllers/userController.js on lines 56..64

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

      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

              user.post('deny', { 'id' : user.id }).then(function(u) {
                  growl.success(user.name + ' has been denied and removed from the system.');
                  var i = $scope.users.indexOf(user);
                  if(i > -1) {
                      $scope.users.splice(i, 1);
      app/assets/javascripts/angular-app/controllers/userController.js on lines 34..42

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

      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

      function initMap() {
          if(map == null) {
              console.log("Initializing map...");
              var mapOptions = {
                  zoom: 4,
      Severity: Major
      Found in volunteer/app/javascripts/maps.js and 1 other location - About 4 hrs to fix
      app/assets/javascripts/maps.js on lines 4..18

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

      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

      function initMap() {
          if(map == null) {
              console.log("Initializing map...");
              var mapOptions = {
                  zoom: 4,
      Severity: Major
      Found in app/assets/javascripts/maps.js and 1 other location - About 4 hrs to fix
      volunteer/app/javascripts/maps.js on lines 4..18

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

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

          function ($rootScope, $interpolate, $sce, $filter, $timeout, growlMessages) {
            var translate;
            growlMessages.onlyUnique = _onlyUniqueMessages;
            growlMessages.reverseOrder = _reverseOrder;
            try {
      Severity: Major
      Found in lib/assets/bower_components/angular-growl-v2/build/angular-growl.js - About 4 hrs to fix

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

          typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
          typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
          typedArrayTags[dateTag] = typedArrayTags[errorTag] =
          typedArrayTags[funcTag] = typedArrayTags[mapTag] =
          typedArrayTags[numberTag] = typedArrayTags[objectTag] =
        Severity: Major
        Found in lib/assets/bower_components/lodash/lodash.js and 1 other location - About 3 hrs to fix
        lib/assets/bower_components/lodash/lodash.js on lines 173..179

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

        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

          cloneableTags[dateTag] = cloneableTags[float32Tag] =
          cloneableTags[float64Tag] = cloneableTags[int8Tag] =
          cloneableTags[int16Tag] = cloneableTags[int32Tag] =
          cloneableTags[numberTag] = cloneableTags[objectTag] =
          cloneableTags[regexpTag] = cloneableTags[stringTag] =
        Severity: Major
        Found in lib/assets/bower_components/lodash/lodash.js and 1 other location - About 3 hrs to fix
        lib/assets/bower_components/lodash/lodash.js on lines 161..167

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

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

            function debounce(func, wait, options) {
              var args,
                  maxTimeoutId,
                  result,
                  stamp,
        Severity: Major
        Found in lib/assets/bower_components/lodash/lodash.js - About 3 hrs to fix

          Function prepareAnchoredAnimation has 92 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function prepareAnchoredAnimation(classes, outAnchor, inAnchor) {
                var clone = jqLite(getDomNode(outAnchor).cloneNode(true));
                var startingClasses = filterCssClasses(getClassVal(clone));
          
                outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);
          Severity: Major
          Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 3 hrs to fix

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

            /**
             * @license AngularJS v1.4.3
             * (c) 2010-2015 Google, Inc. http://angularjs.org
             * License: MIT
             */
            Severity: Minor
            Found in lib/assets/bower_components/angular-route/angular-route.js - About 3 hrs to fix

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

                      java: function (tag) {
                        var temp = (tag || '').split('-').join('_');
                        var parts = temp.split('_');
                        return parts.length > 1 ? (parts[0].toLowerCase() + '_' + parts[1].toUpperCase()) : temp;
                      },
              lib/assets/bower_components/angular-translate/angular-translate.js on lines 364..368

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

              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

                      bcp47: function (tag) {
                        var temp = (tag || '').split('_').join('-');
                        var parts = temp.split('-');
                        return parts.length > 1 ? (parts[0].toLowerCase() + '-' + parts[1].toUpperCase()) : temp;
                      }
              lib/assets/bower_components/angular-translate/angular-translate.js on lines 359..363

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

              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 some(collection, predicate, thisArg) {
                    var func = isArray(collection) ? arraySome : baseSome;
                    if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
                      predicate = undefined;
                    }
              Severity: Major
              Found in lib/assets/bower_components/lodash/lodash.js and 1 other location - About 3 hrs to fix
              lib/assets/bower_components/lodash/lodash.js on lines 6246..6255

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

              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 every(collection, predicate, thisArg) {
                    var func = isArray(collection) ? arrayEvery : baseEvery;
                    if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
                      predicate = undefined;
                    }
              Severity: Major
              Found in lib/assets/bower_components/lodash/lodash.js and 1 other location - About 3 hrs to fix
              lib/assets/bower_components/lodash/lodash.js on lines 7043..7052

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

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

                  function template(string, options, otherOptions) {
                    // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)
                    // and Laura Doktorova's doT.js (https://github.com/olado/doT).
                    var settings = lodash.templateSettings;
              
              
              Severity: Major
              Found in lib/assets/bower_components/lodash/lodash.js - About 3 hrs to fix

                Function elemFunction has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function elemFunction(operation, what, params, obj, headers) {
                        var __this = this;
                        var deferred = $q.defer();
                        var resParams = params || {};
                        var route = what || this[config.restangularFields.route];
                Severity: Major
                Found in lib/assets/bower_components/restangular/dist/restangular.js - About 2 hrs to fix

                  Function elemFunction has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        function elemFunction(operation, what, params, obj, headers) {
                          var __this = this;
                          var deferred = $q.defer();
                          var resParams = params || {};
                          var route = what || this[config.restangularFields.route];
                  Severity: Major
                  Found in lib/assets/bower_components/restangular/src/restangular.js - About 2 hrs to fix

                    Function fetchFunction has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          function fetchFunction(what, reqParams, headers) {
                            var __this = this;
                            var deferred = $q.defer();
                            var operation = 'getList';
                            var url = urlHandler.fetchUrl(this, what);
                    Severity: Major
                    Found in lib/assets/bower_components/restangular/src/restangular.js - About 2 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language