preston/bittorious

View on GitHub

Showing 235 of 235 total issues

Function link has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

    Function trunc has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function trunc(string, options, guard) {
          if (guard && isIterateeCall(string, options, guard)) {
            options = undefined;
          }
          var length = DEFAULT_TRUNC_LENGTH,
    Severity: Minor
    Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

      Function instant has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            $translate.instant = function (translationId, interpolateParams, interpolationId) {
      
              // Detect undefined and null values to shorten the execution and prevent exceptions
              if (translationId === null || angular.isUndefined(translationId)) {
                return translationId;
      Severity: Minor
      Found in lib/assets/bower_components/angular-translate/angular-translate.js - About 1 hr to fix

        Function $$AnimateJsDriverProvider has 46 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var $$AnimateJsDriverProvider = ['$$animationProvider', function($$animationProvider) {
          $$animationProvider.drivers.push('$$animateJsDriver');
          this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) {
            return function initDriverFn(animationDetails) {
              if (animationDetails.from && animationDetails.to) {
        Severity: Minor
        Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

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

          function resolveElementClasses(existing, toAdd, toRemove) {
            var ADD_CLASS = 1;
            var REMOVE_CLASS = -1;
          
            var flags = {};
          Severity: Minor
          Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

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

                    var okCallback = function(response) {
                      var resData = response.data;
                      var fullParams = response.config.params;
                      var data = parseResponse(resData, operation, whatFetched, url, response, deferred);
            
            
            Severity: Minor
            Found in lib/assets/bower_components/restangular/dist/restangular.js - About 1 hr to fix

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

                      var okCallback = function(response) {
                        var resData = response.data;
                        var fullParams = response.config.params;
                        var data = parseResponse(resData, operation, whatFetched, url, response, deferred);
              
              
              Severity: Minor
              Found in lib/assets/bower_components/restangular/src/restangular.js - About 1 hr to fix

                Function mixin has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function mixin(object, source, options) {
                      if (options == null) {
                        var isObj = isObject(source),
                            props = isObj ? keys(source) : undefined,
                            methodNames = (props && props.length) ? baseFunctions(source, props) : undefined;
                Severity: Minor
                Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

                  Function baseClone has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
                        var result;
                        if (customizer) {
                          result = object ? customizer(value, key, object) : customizer(value);
                        }
                  Severity: Minor
                  Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

                    Function loadAsync has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          var loadAsync = function (key) {
                            if (!key) {
                              throw 'No language key specified for loading.';
                            }
                    
                    
                    Severity: Minor
                    Found in lib/assets/bower_components/angular-translate/angular-translate.js - About 1 hr to fix

                      Function start has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              start: function() {
                                var closeActiveAnimations;
                                var chain = [];
                      
                                if (before) {
                      Severity: Minor
                      Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                        Function areAnimationsAllowed has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function areAnimationsAllowed(element, parentElement, event) {
                              var bodyElementDetected = false;
                              var rootElementDetected = false;
                              var parentAnimationDetected = false;
                              var animateChildren;
                        Severity: Minor
                        Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

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

                            this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) {
                              return function initDriverFn(animationDetails) {
                                if (animationDetails.from && animationDetails.to) {
                                  var fromAnimation = prepareAnimation(animationDetails.from);
                                  var toAnimation = prepareAnimation(animationDetails.to);
                          Severity: Minor
                          Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

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

                            function removeMarkers() {
                                console.log('Removing markers from map...');
                                $.each(markers, function(i, m) {
                                    m.setMap(null);
                                });
                            Severity: Major
                            Found in volunteer/app/javascripts/maps.js and 1 other location - About 1 hr to fix
                            app/assets/javascripts/maps.js on lines 52..59

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

                            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 removeMarkers() {
                                console.log('Removing markers from map...');
                                $.each(markers, function(i, m) {
                                    m.setMap(null);
                                });
                            Severity: Major
                            Found in app/assets/javascripts/maps.js and 1 other location - About 1 hr to fix
                            volunteer/app/javascripts/maps.js on lines 52..59

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

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

                              this.$get = ['$injector', '$log', function ($injector, $log) {
                            
                                var applyStrategies = function (value, mode, selectedStrategies) {
                                  angular.forEach(selectedStrategies, function (selectedStrategy) {
                                    if (angular.isFunction(selectedStrategy)) {
                            Severity: Minor
                            Found in lib/assets/bower_components/angular-translate/angular-translate.js - About 1 hr to fix

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

                                  function lazyValue() {
                                    var array = this.__wrapped__.value(),
                                        dir = this.__dir__,
                                        isArr = isArray(array),
                                        isRight = dir < 0,
                              Severity: Minor
                              Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

                                Function mergeData has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function mergeData(data, source) {
                                      var bitmask = data[1],
                                          srcBitmask = source[1],
                                          newBitmask = bitmask | srcBitmask,
                                          isCommon = newBitmask < ARY_FLAG;
                                Severity: Minor
                                Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

                                  Function createFlow has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function createFlow(fromRight) {
                                        return function() {
                                          var wrapper,
                                              length = arguments.length,
                                              index = fromRight ? length : -1,
                                  Severity: Minor
                                  Found in lib/assets/bower_components/lodash/lodash.js - About 1 hr to fix

                                    Function exports has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    module.exports = function (grunt) {
                                      require('load-grunt-tasks')(grunt);
                                      require('time-grunt')(grunt);
                                    
                                      grunt.initConfig({
                                    Severity: Minor
                                    Found in lib/assets/bower_components/angular-relative-date/Gruntfile.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language