diffux/diffux

View on GitHub
bower_components/jquery/src/effects.js

Summary

Maintainability
F
1 mo
Test Coverage

File effects.js has 499 lines of code (exceeds 250 allowed). Consider refactoring.
Open

define([
    "./core",
    "./var/pnum",
    "./css/var/cssExpand",
    "./css/var/isHidden",
Severity: Minor
Found in bower_components/jquery/src/effects.js - About 1 day to fix

    Function defaultPrefilter has 99 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function defaultPrefilter( elem, props, opts ) {
        /* jshint validthis: true */
        var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
            anim = this,
            orig = {},
    Severity: Major
    Found in bower_components/jquery/src/effects.js - About 3 hrs to fix

      Function Animation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function Animation( elem, properties, options ) {
          var result,
              stopped,
              index = 0,
              length = animationPrefilters.length,
      Severity: Major
      Found in bower_components/jquery/src/effects.js - About 3 hrs to fix

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

            stop: function( type, clearQueue, gotoEnd ) {
                var stopQueue = function( hooks ) {
                    var stop = hooks.stop;
                    delete hooks.stop;
                    stop( gotoEnd );
        Severity: Minor
        Found in bower_components/jquery/src/effects.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                      if ( start && start[ 3 ] !== unit ) {
                          // Trust units reported by jQuery.css
                          unit = unit || start[ 3 ];
          
                          // Make sure we update the tween properties later on
          Severity: Critical
          Found in bower_components/jquery/src/effects.js - About 1 hr to fix

            Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                finish: function( type ) {
                    if ( type !== false ) {
                        type = type || "fx";
                    }
                    return this.each(function() {
            Severity: Minor
            Found in bower_components/jquery/src/effects.js - About 1 hr to fix

              Function propFilter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function propFilter( props, specialEasing ) {
                  var index, name, easing, value, hooks;
              
                  // camelCase, specialEasing and expand cssHook pass
                  for ( index in props ) {
              Severity: Minor
              Found in bower_components/jquery/src/effects.js - About 1 hr to fix

                Function * has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        "*": [ function( prop, value ) {
                            var tween = this.createTween( prop, value ),
                                target = tween.cur(),
                                parts = rfxnum.exec( value ),
                                unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
                Severity: Minor
                Found in bower_components/jquery/src/effects.js - About 1 hr to fix

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

                  function defaultPrefilter( elem, props, opts ) {
                      /* jshint validthis: true */
                      var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
                          anim = this,
                          orig = {},
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 6 days to fix
                  bower_components/jquery/dist/jquery.js on lines 6368..6499

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

                  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

                  jQuery.fn.extend({
                      fadeTo: function( speed, to, easing, callback ) {
                  
                          // Show any hidden elements after setting opacity to 0
                          return this.filter( isHidden ).css( "opacity", 0 ).show()
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 6 days to fix
                  bower_components/jquery/dist/jquery.js on lines 6704..6822

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

                  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 Animation( elem, properties, options ) {
                      var result,
                          stopped,
                          index = 0,
                          length = animationPrefilters.length,
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 5 days to fix
                  bower_components/jquery/dist/jquery.js on lines 6538..6640

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

                  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

                  var
                      fxNow, timerId,
                      rfxtypes = /^(?:toggle|show|hide)$/,
                      rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
                      rrun = /queueHooks$/,
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 2 days to fix
                  bower_components/jquery/dist/jquery.js on lines 6268..6323

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

                  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

                  jQuery.speed = function( speed, easing, fn ) {
                      var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
                          complete: fn || !fn && easing ||
                              jQuery.isFunction( speed ) && speed,
                          duration: speed,
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 2 days to fix
                  bower_components/jquery/dist/jquery.js on lines 6672..6702

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

                  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 propFilter( props, specialEasing ) {
                      var index, name, easing, value, hooks;
                  
                      // camelCase, specialEasing and expand cssHook pass
                      for ( index in props ) {
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 1 day to fix
                  bower_components/jquery/dist/jquery.js on lines 6501..6536

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

                  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

                  jQuery.Animation = jQuery.extend( Animation, {
                  
                      tweener: function( props, callback ) {
                          if ( jQuery.isFunction( props ) ) {
                              callback = props;
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 1 day to fix
                  bower_components/jquery/dist/jquery.js on lines 6642..6670

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

                  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

                  jQuery.fx.tick = function() {
                      var timer,
                          i = 0,
                          timers = jQuery.timers;
                  
                  
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 6 hrs to fix
                  bower_components/jquery/dist/jquery.js on lines 6848..6867

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

                  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 genFx( type, includeWidth ) {
                      var which,
                          i = 0,
                          attrs = { height: type };
                  
                  
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 5 hrs to fix
                  bower_components/jquery/dist/jquery.js on lines 6334..6352

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

                  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

                  jQuery.each({
                      slideDown: genFx("show"),
                      slideUp: genFx("hide"),
                      slideToggle: genFx("toggle"),
                      fadeIn: { opacity: "show" },
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 4 hrs to fix
                  bower_components/jquery/dist/jquery.js on lines 6834..6845

                  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

                  jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
                      var cssFn = jQuery.fn[ name ];
                      jQuery.fn[ name ] = function( speed, easing, callback ) {
                          return speed == null || typeof speed === "boolean" ?
                              cssFn.apply( this, arguments ) :
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 3 hrs to fix
                  bower_components/jquery/dist/jquery.js on lines 6824..6831

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

                  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 createTween( value, prop, animation ) {
                      var tween,
                          collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
                          index = 0,
                          length = collection.length;
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 3 hrs to fix
                  bower_components/jquery/dist/jquery.js on lines 6354..6366

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

                  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

                  jQuery.fx.timer = function( timer ) {
                      jQuery.timers.push( timer );
                      if ( timer() ) {
                          jQuery.fx.start();
                      } else {
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 2 hrs to fix
                  bower_components/jquery/dist/jquery.js on lines 6869..6876

                  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

                  jQuery.fx.start = function() {
                      if ( !timerId ) {
                          timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
                      }
                  };
                  Severity: Major
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 1 hr to fix
                  bower_components/jquery/dist/jquery.js on lines 6880..6884

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

                  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 createFxNow() {
                      setTimeout(function() {
                          fxNow = undefined;
                      });
                      return ( fxNow = jQuery.now() );
                  Severity: Minor
                  Found in bower_components/jquery/src/effects.js and 1 other location - About 30 mins to fix
                  bower_components/jquery/dist/jquery.js on lines 6326..6331

                  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