railsfrance/railsfrance.org

View on GitHub

Showing 228 of 228 total issues

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

                }else if(options.mode == 'vertical'){
                    $parent.animate({'top': '-'+getSlidePosition(slide, 'top')+'px'}, options.speed, options.easing, function(){
                        isWorking = false;
                        // perform the callback function
                        options.onAfterSlide(currentSlide, $children.length, $children.eq(currentSlide));
Severity: Major
Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/lib/jquery.bxSlider.js on lines 138..154

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

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

    init: function( selector, context, rootjQuery ) {
        var match, elem, ret, doc;

        // Handle $(""), $(null), or $(undefined)
        if ( !selector ) {
Severity: Major
Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 2 hrs to fix

    Function _Deferred has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _Deferred: function() {
            var // callbacks list
                callbacks = [],
                // stored [ context , args ]
                fired,
    Severity: Major
    Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 2 hrs to fix

      Function liveHandler has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function liveHandler( event ) {
          var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
              elems = [],
              selectors = [],
              events = jQuery._data( this, "events" );
      Severity: Major
      Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 2 hrs to fix

        Function goToNextSlide has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                this.goToNextSlide = function(stopAuto){
                    // check if stopAuto argument is supplied
                    if(typeof(stopAuto) == 'undefined'){
                        var stopAuto = true;
                    }
        Severity: Major
        Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 2 hrs to fix

          Function init has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              init: function(e) {
                e.delimiter = ", ";
                function split( val ) {
                  return val.split( e.delimiter );
                }
          Severity: Major
          Found in app/assets/javascripts/lib/autocomplete-rails.js - About 2 hrs to fix

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

                Deferred: function( func ) {
                    var deferred = jQuery._Deferred(),
                        failDeferred = jQuery._Deferred(),
                        promise;
                    // Add errorDeferred methods, then and promise
            Severity: Major
            Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 2 hrs to fix

              Function ajaxConvert has 57 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function ajaxConvert( s, response ) {
              
                  // Apply the dataFilter if provided
                  if ( s.dataFilter ) {
                      response = s.dataFilter( response, s.dataType );
              Severity: Major
              Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 2 hrs to fix

                Function setAutoInterval has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        function setAutoInterval(){
                            if(options.auto){
                                // finite loop
                                if(!options.infiniteLoop){
                                    if(options.autoDirection == 'next'){
                Severity: Major
                Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 2 hrs to fix

                  Function offset has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      jQuery.fn.offset = function( options ) {
                          var elem = this[0];
                  
                          if ( options ) {
                              return this.each(function( i ) {
                  Severity: Major
                  Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 2 hrs to fix

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

                        data: function( elem, name, data, pvt /* Internal Use Only */ ) {
                            if ( !jQuery.acceptData( elem ) ) {
                                return;
                            }
                    
                    
                    Severity: Major
                    Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 2 hrs to fix

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

                              if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
                                  return this.elem[ this.prop ];
                              }
                      Severity: Major
                      Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 2 hrs to fix
                      app/assets/javascripts/lib/jquery-1.6.4.js on lines 8440..8442

                      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

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

                              if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
                                  return this.elem[ this.prop ];
                              }
                      Severity: Major
                      Found in app/assets/javascripts/lib/jquery-1.6.4.js and 1 other location - About 2 hrs to fix
                      app/assets/javascripts/lib/jquery.bxSlider.js on lines 1246..1248

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

                          removeData: function( elem, name, pvt /* Internal Use Only */ ) {
                              if ( !jQuery.acceptData( elem ) ) {
                                  return;
                              }
                      
                      
                      Severity: Minor
                      Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 2 hrs to fix

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

                                function initCss(){
                                    // layout the children
                                    setChildrenLayout(options.startingSlide);
                                    // CSS for horizontal mode
                                    if(options.mode == 'horizontal'){
                        Severity: Minor
                        Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 2 hrs to fix

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

                          function Timepicker() {
                              this.regional = []; // Available regional settings, indexed by language code
                              this.regional[''] = { // Default regional settings
                                  currentText: 'Now',
                                  closeText: 'Done',
                          Severity: Minor
                          Found in app/assets/javascripts/lib/jquery-ui-timepicker-addon.js - About 1 hr to fix

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

                                            if(options.tickerDirection == 'next'){
                                                $parent.animate({'left': '-='+distance+'px'}, speed, 'linear', function(){
                                                    $parent.css('left', leftCss);
                                                    moveTheShow(leftCss, origShowWidth, options.tickerSpeed);
                                                });
                            Severity: Major
                            Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 1 hr to fix
                            app/assets/javascripts/lib/jquery.bxSlider.js on lines 845..856

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

                            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

                                            if(options.tickerDirection == 'next'){
                                                $parent.animate({'top': '-='+distance+'px'}, speed, 'linear', function(){
                                                    $parent.css('top', leftCss);
                                                    moveTheShow(leftCss, origShowHeight, options.tickerSpeed);
                                                });
                            Severity: Major
                            Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 1 hr to fix
                            app/assets/javascripts/lib/jquery.bxSlider.js on lines 830..841

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

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

                                _newInst: function($input, o) {
                                    var tp_inst = new Timepicker(),
                                        inlineSettings = {};
                                        
                                    for (var attrName in this._defaults) {
                            Severity: Minor
                            Found in app/assets/javascripts/lib/jquery-ui-timepicker-addon.js - About 1 hr to fix

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

                                  jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
                                      var type, i = 0, match, namespaces, preType,
                                          selector = origSelector || this.selector,
                                          context = origSelector ? this : jQuery( this.context );
                              
                              
                              Severity: Minor
                              Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language