railsfrance/railsfrance.org

View on GitHub

Showing 228 of 228 total issues

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

                if(options.tickerDirection == 'next'){
                    // get the 'top' property where the ticker stopped
                    var stoppedTop = parseInt($parent.css('top'));
                    // calculate the remaining distance the show must travel until the loop
                    var remainingDistance = (origShowHeight + stoppedTop) + $children.eq(0).height();            
Severity: Major
Found in app/assets/javascripts/lib/jquery.bxSlider.js and 1 other location - About 5 hrs to fix
app/assets/javascripts/lib/jquery.bxSlider.js on lines 437..447

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

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

Consider simplifying this complex logical expression.
Open

        if ( event.pageX == null && event.clientX != null ) {
            var eventDocument = event.target.ownerDocument || document,
                doc = eventDocument.documentElement,
                body = eventDocument.body;

Severity: Critical
Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 5 hrs to fix

    Function Sizzle has 108 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Sizzle = function( selector, context, results, seed ) {
        results = results || [];
        context = context || document;
    
        var origContext = context;
    Severity: Major
    Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 4 hrs to fix

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

                  this.hour_slider = $tp.find('#ui_tpicker_hour_'+ dp_id).slider({
                      orientation: "horizontal",
                      value: this.hour,
                      min: o.hourMin,
                      max: hourMax,
      Severity: Major
      Found in app/assets/javascripts/lib/jquery-ui-timepicker-addon.js and 1 other location - About 3 hrs to fix
      app/assets/javascripts/lib/jquery-ui-timepicker-addon.js on lines 392..402

      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

                  this.second_slider = $tp.find('#ui_tpicker_second_'+ dp_id).slider({
                      orientation: "horizontal",
                      value: this.second,
                      min: o.secondMin,
                      max: secMax,
      Severity: Major
      Found in app/assets/javascripts/lib/jquery-ui-timepicker-addon.js and 1 other location - About 3 hrs to fix
      app/assets/javascripts/lib/jquery-ui-timepicker-addon.js on lines 365..375

      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

      Function send has 86 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      send: function( headers, complete ) {
      
                          // Get a new xhr
                          var xhr = s.xhr(),
                              handle,
      Severity: Major
      Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 3 hrs to fix

        Function remove has 85 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            remove: function( elem, types, handler, pos ) {
                // don't do events on text and comment nodes
                if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
                    return;
                }
        Severity: Major
        Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 3 hrs to fix

          Function initShow has 83 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  this.initShow = function(){
                      
                      // reinitialize all variables
                      // base = this;
                      $parent = $(this);
          Severity: Major
          Found in app/assets/javascripts/lib/jquery.bxSlider.js - About 3 hrs to fix

            Function animate has 80 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                animate: function( prop, speed, easing, callback ) {
                    var optall = jQuery.speed(speed, easing, callback);
            
                    if ( jQuery.isEmptyObject( prop ) ) {
                        return this.each( optall.complete, [ false ] );
            Severity: Major
            Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 3 hrs to fix

              Function trigger has 80 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  trigger: function( event, data, elem, onlyHandlers ) {
                      // Event object or event type
                      var type = event.type || event,
                          namespaces = [],
                          exclusive;
              Severity: Major
              Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 3 hrs to fix

                Function clean has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    clean: function( elems, context, fragment, scripts ) {
                        var checkScriptType;
                
                        context = context || document;
                
                
                Severity: Major
                Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 3 hrs to fix

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

                          "~": function( checkSet, part, isXML ) {
                              var nodeCheck,
                                  doneName = done++,
                                  checkFn = dirCheck;
                  
                  
                  Severity: Major
                  Found in app/assets/javascripts/lib/jquery-1.6.4.js and 1 other location - About 3 hrs to fix
                  app/assets/javascripts/lib/jquery-1.6.4.js on lines 4188..4200

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

                  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(checkSet, part, isXML){
                              var nodeCheck,
                                  doneName = done++,
                                  checkFn = dirCheck;
                  
                  
                  Severity: Major
                  Found in app/assets/javascripts/lib/jquery-1.6.4.js and 1 other location - About 3 hrs to fix
                  app/assets/javascripts/lib/jquery-1.6.4.js on lines 4202..4214

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

                  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

                  Consider simplifying this complex logical expression.
                  Open

                  if ( "getBoundingClientRect" in document.documentElement ) {
                      jQuery.fn.offset = function( options ) {
                          var elem = this[0], box;
                  
                          if ( options ) {
                  Severity: Critical
                  Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 3 hrs to fix

                    Function add has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        add: function( elem, types, handler, data ) {
                            if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
                                return;
                            }
                    
                    
                    Severity: Major
                    Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 2 hrs to fix

                      Function _limitMinMaxDateTime has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _limitMinMaxDateTime: function(dp_inst, adjustSliders){
                              var o = this._defaults,
                                  dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);
                      
                              if(!this._defaults.showTimepicker) return; // No time so nothing to check here
                      Severity: Major
                      Found in app/assets/javascripts/lib/jquery-ui-timepicker-addon.js - About 2 hrs to fix

                        Function done has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                function done( status, nativeStatusText, responses, headers ) {
                        
                                    // Called once
                                    if ( state === 2 ) {
                                        return;
                        Severity: Major
                        Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 2 hrs to fix

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

                          Sizzle.filter = function( expr, set, inplace, not ) {
                              var match, anyFound,
                                  old = expr,
                                  result = [],
                                  curLoop = set,
                          Severity: Major
                          Found in app/assets/javascripts/lib/jquery-1.6.4.js - About 2 hrs to fix

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

                                    this.goToPreviousSlide = 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

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

                                              if(options.mode == 'horizontal'){
                                                  $parent.animate({'left': '-'+getSlidePosition(slide, 'left')+'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 145..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

                              Severity
                              Category
                              Status
                              Source
                              Language