insideout10/wordlift-plugin-js

View on GitHub
app/lib/angular/angular-animate.js

Summary

Maintainability
F
5 days
Test Coverage

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

/**
 * @license AngularJS v1.2.14
 * (c) 2010-2014 Google, Inc. http://angularjs.org
 * License: MIT
 */
Severity: Major
Found in app/lib/angular/angular-animate.js - About 2 days to fix

    Function performAnimation has 158 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {
    
            var runner = animationRunner(element, animationEvent, className);
            if(!runner) {
              fireDOMOperation();
    Severity: Major
    Found in app/lib/angular/angular-animate.js - About 6 hrs to fix

      Function animationRunner has 122 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            function animationRunner(element, animationEvent, className) {
              //transcluded directives may sometimes fire an animation using only comment nodes
              //best to catch this early on to prevent any animation operations from occurring
              var node = element[0];
              if(!node) {
      Severity: Major
      Found in app/lib/angular/angular-animate.js - About 4 hrs to fix

        Function animateRun has 75 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              function animateRun(animationEvent, element, className, activeAnimationComplete) {
                var node = extractElementNode(element);
                var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);
                if(node.className.indexOf(className) == -1 || !elementData) {
                  activeAnimationComplete();
        Severity: Major
        Found in app/lib/angular/angular-animate.js - About 3 hrs to fix

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

                function getElementAnimationDetails(element, cacheKey) {
                  var data = cacheKey ? lookupCache[cacheKey] : null;
                  if(!data) {
                    var transitionDuration = 0;
                    var transitionDelay = 0;
          Severity: Minor
          Found in app/lib/angular/angular-animate.js - About 1 hr to fix

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

                  function animateSetup(animationEvent, element, className, calculationDecorator) {
                    var cacheKey = getCacheKey(element);
                    var eventCacheKey = cacheKey + ' ' + className;
                    var itemIndex = lookupCache[eventCacheKey] ? ++lookupCache[eventCacheKey].total : 0;
            
            
            Severity: Minor
            Found in app/lib/angular/angular-animate.js - About 1 hr to fix

              Function run has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function run(fns, cancellations, allCompleteFn) {
                        var animations = [];
                        forEach(fns, function(animation) {
                          animation.fn && animations.push(animation);
                        });
              Severity: Minor
              Found in app/lib/angular/angular-animate.js - About 1 hr to fix

                Function performAnimation has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                      function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {
                Severity: Major
                Found in app/lib/angular/angular-animate.js - About 50 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return true;
                  Severity: Major
                  Found in app/lib/angular/angular-animate.js - About 30 mins to fix

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

                            removeClass : function(element, className, doneCallback) {
                              element = stripCommentsFromElement(element);
                              performAnimation('removeClass', className, element, null, null, function() {
                                $delegate.removeClass(element, className);
                              }, doneCallback);
                    Severity: Major
                    Found in app/lib/angular/angular-animate.js and 1 other location - About 1 hr to fix
                    app/lib/angular/angular-animate.js on lines 664..669

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

                    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

                            addClass : function(element, className, doneCallback) {
                              element = stripCommentsFromElement(element);
                              performAnimation('addClass', className, element, null, null, function() {
                                $delegate.addClass(element, className);
                              }, doneCallback);
                    Severity: Major
                    Found in app/lib/angular/angular-animate.js and 1 other location - About 1 hr to fix
                    app/lib/angular/angular-animate.js on lines 700..705

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

                    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

                            if(node.style[prop] && node.style[prop].length > 0) {
                              node.style[prop] = '';
                            }
                    Severity: Minor
                    Found in app/lib/angular/angular-animate.js and 1 other location - About 45 mins to fix
                    app/lib/angular/angular-animate.js on lines 1306..1308

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

                    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

                            if(node.style[prop] && node.style[prop].length > 0) {
                              node.style[prop] = '';
                            }
                    Severity: Minor
                    Found in app/lib/angular/angular-animate.js and 1 other location - About 45 mins to fix
                    app/lib/angular/angular-animate.js on lines 1315..1317

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

                    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

                              after : function(allCompleteFn) {
                                afterComplete = allCompleteFn;
                                run(after, afterCancel, function() {
                                  afterComplete = noop;
                                  allCompleteFn();
                    Severity: Minor
                    Found in app/lib/angular/angular-animate.js and 1 other location - About 30 mins to fix
                    app/lib/angular/angular-animate.js on lines 469..475

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

                    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

                              before : function(allCompleteFn) {
                                beforeComplete = allCompleteFn;
                                run(before, beforeCancel, function() {
                                  beforeComplete = noop;
                                  allCompleteFn();
                    Severity: Minor
                    Found in app/lib/angular/angular-animate.js and 1 other location - About 30 mins to fix
                    app/lib/angular/angular-animate.js on lines 476..482

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

                    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

                    There are no issues that match your filters.

                    Category
                    Status