preston/bittorious

View on GitHub

Showing 235 of 235 total issues

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/dist/restangular.js - About 2 hrs to fix

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

            function triggerAnimationStart() {
              // just incase a stagger animation kicks in when the animation
              // itself was cancelled entirely
              if (animationClosed) return;
    
    
    Severity: Major
    Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 2 hrs to fix

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

            function groupAnimations(animations) {
              var preparedAnimations = [];
              var refLookup = {};
              forEach(animations, function(animation, index) {
                var element = animation.element;
      Severity: Major
      Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 2 hrs to fix

        Function resource has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            BaseCreator.prototype.resource = function(current, $http, localHttpConfig, callHeaders, callParams, what, etag,operation) {
        
              var params = _.defaults(callParams || {}, this.config.defaultRequestParams.common);
              var headers = _.defaults(callHeaders || {}, this.config.defaultHeaders);
        
        
        Severity: Major
        Found in lib/assets/bower_components/restangular/dist/restangular.js - About 2 hrs to fix

          Function resource has 66 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              BaseCreator.prototype.resource = function(current, $http, localHttpConfig, callHeaders, callParams, what, etag,operation) {
          
                var params = _.defaults(callParams || {}, this.config.defaultRequestParams.common);
                var headers = _.defaults(callHeaders || {}, this.config.defaultHeaders);
          
          
          Severity: Major
          Found in lib/assets/bower_components/restangular/src/restangular.js - About 2 hrs to fix

            Function commitRoute has 62 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function commitRoute() {
                  var lastRoute = $route.current;
                  var nextRoute = preparedRoute;
            
                  if (preparedRouteIsUpdateOnly) {
            Severity: Major
            Found in lib/assets/bower_components/angular-route/angular-route.js - About 2 hrs to fix

              Function createHybridWrapper has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
                    var isAry = bitmask & ARY_FLAG,
                        isBind = bitmask & BIND_FLAG,
                        isBindKey = bitmask & BIND_KEY_FLAG,
                        isCurry = bitmask & CURRY_FLAG,
              Severity: Major
              Found in lib/assets/bower_components/lodash/lodash.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 lib/assets/bower_components/angular-route/angular-route.js - About 2 hrs to fix

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

                        var $translate = function (translationId, interpolateParams, interpolationId, defaultTranslationText) {
                  
                          // Duck detection: If the first argument is an array, a bunch of translations was requested.
                          // The result is an object.
                          if (angular.isArray(translationId)) {
                  Severity: Major
                  Found in lib/assets/bower_components/angular-translate/angular-translate.js - About 2 hrs to fix

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

                        this.addMessage = function (message) {
                          var directive, messages, found, msgText;
                          if (this.directives[message.referenceId]) {
                            directive = this.directives[message.referenceId];
                          } else {
                    Severity: Major
                    Found in lib/assets/bower_components/angular-growl-v2/build/angular-growl.js - About 2 hrs to fix

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

                      function refreshMap(peers) {
                          if(map == null) {
                              initMap();
                          }
                          console.log('Refreshing map...');
                      Severity: Major
                      Found in volunteer/app/javascripts/maps.js and 1 other location - About 2 hrs to fix
                      app/assets/javascripts/maps.js on lines 62..71

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

                      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 refreshMap(peers) {
                          if(map == null) {
                              initMap();
                          }
                          console.log('Refreshing map...');
                      Severity: Major
                      Found in app/assets/javascripts/maps.js and 1 other location - About 2 hrs to fix
                      volunteer/app/javascripts/maps.js on lines 62..71

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

                      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 coordinatesToLatLong(latitude, longitude) {
                          var ll = null;
                          if(latitude == "" || longitude == ""){
                              console.log("Peer coordinates are invalid. They will not be mapped.");
                          } else {
                      Severity: Major
                      Found in volunteer/app/javascripts/maps.js and 1 other location - About 2 hrs to fix
                      app/assets/javascripts/maps.js on lines 21..30

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

                      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 coordinatesToLatLong(latitude, longitude) {
                          var ll = null;
                          if(latitude == "" || longitude == ""){
                              console.log("Peer coordinates are invalid. They will not be mapped.");
                          } else {
                      Severity: Major
                      Found in app/assets/javascripts/maps.js and 1 other location - About 2 hrs to fix
                      volunteer/app/javascripts/maps.js on lines 21..30

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

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

                              function ($scope, $timeout, growl, growlMessages) {
                                $scope.referenceId = $scope.reference || 0;
                                growlMessages.initDirective($scope.referenceId, $scope.limitMessages);
                                $scope.growlMessages = growlMessages;
                                $scope.inlineMessage = angular.isDefined($scope.inline) ? $scope.inline : growl.inlineMessages();
                      Severity: Major
                      Found in lib/assets/bower_components/angular-growl-v2/build/angular-growl.js - About 2 hrs to fix

                        Function refresh has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              $translate.refresh = function (langKey) {
                                if (!$loaderFactory) {
                                  throw new Error('Couldn\'t refresh translation table, no loader registered!');
                                }
                        
                        
                        Severity: Minor
                        Found in lib/assets/bower_components/angular-translate/angular-translate.js - About 2 hrs to fix

                          Function baseIsEqualDeep has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
                                var objIsArr = isArray(object),
                                    othIsArr = isArray(other),
                                    objTag = arrayTag,
                                    othTag = arrayTag;
                          Severity: Minor
                          Found in lib/assets/bower_components/lodash/lodash.js - About 2 hrs to fix

                            Function wrapper has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  function wrapper() {
                                    // Avoid `arguments` object use disqualifying optimizations by
                                    // converting it to an array before providing it to other functions.
                                    var length = arguments.length,
                                        index = length,
                            Severity: Minor
                            Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

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

                                  $scope.updateFeed = function() {
                                      $scope.selectedFeed.patch().then(function(f) {
                                          growl.success("Feed updated.", {title : "Success!"});
                                          console.log("Successfully updated feed.");
                                      });
                              app/assets/javascripts/angular-app/controllers/feedController.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 73.

                              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

                                  $scope.updateTorrent = function() {
                                      $scope.selectedTorrent.patch().then(function(t) {
                                          growl.success("Torrent updated.", {title : "Success!"});
                                          console.log("Successfully updated torrent.");
                                      });
                              app/assets/javascripts/angular-app/controllers/feedController.js on lines 82..87

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

                              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