mattvanhorn/BJJLife

View on GitHub

Showing 102 of 102 total issues

Function carouFredSel has 1576 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  $.fn.carouFredSel = function(options, configs) {
    if (this.length == 0) {
      debug(true, 'No element found for "'+this.selector+'".');
      return this;
    }
Severity: Major
Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 1 wk to fix

    File jquery.carouFredSel-5.6.1.js has 2179 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*  
     *  jQuery carouFredSel 5.6.1
     *  Demo's and documentation:
     *  caroufredsel.frebsite.nl
     *  
    Severity: Major
    Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 6 days to fix

      Function _cfs_bind_events has 1028 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $cfs._cfs_bind_events = function() {
            $cfs._cfs_unbind_events();
      
            //  stop event
            $cfs.bind(cf_e('stop', conf), function(e, imm) {
      Severity: Major
      Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 5 days to fix

        Function prettyPhoto has 590 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $.fn.prettyPhoto = function(pp_settings) {
                pp_settings = jQuery.extend({
                    hook: 'rel', /* the attribute tag to use for prettyPhoto hooks. default: 'rel'. For HTML5, use "data-rel" or similar. */
                    animation_speed: 'fast', /* fast/slow/normal */
                    ajaxcallback: function() {},
        Severity: Major
        Found in app/assets/javascripts/jquery.prettyPhoto.js - About 2 days to fix

          File jquery.prettyPhoto.js has 615 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* ------------------------------------------------------------------------
              Class: prettyPhoto
              Use: Lightbox clone for jQuery
              Author: Stephane Caron (http://www.no-margin-for-errors.com)
              Version: 3.1.4
          Severity: Major
          Found in app/assets/javascripts/jquery.prettyPhoto.js - About 1 day to fix

            Function _cfs_init has 221 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                $cfs._cfs_init = function(o, setOrig, start) {
                  o = go_getObject($tt0, o);
            
                  var obs = ['items', 'scroll', 'auto', 'prev', 'next', 'pagination'];
                  for (var a = 0, l = obs.length; a < l; a++) {
            Severity: Major
            Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 1 day to fix

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

                        var fn = function() {
                          switch(sO.fx) {
                            case 'fade':
                            case 'crossfade':
                              $cfs.css('filter', '');
              Severity: Major
              Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 1 day to fix
              app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 1226..1246

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

              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

                        var fn = function() {
                          switch(sO.fx) {
                            case 'fade':
                            case 'crossfade':
                              $cfs.css('filter', '');
              Severity: Major
              Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 1 day to fix
              app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 905..925

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

              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 (opts.next.button) {
                      opts.next.button.bind(cf_e(opts.next.event, conf, false), function(e) {
                        e.preventDefault();
                        $cfs.trigger(cf_e('next', conf));
                      });
              Severity: Major
              Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 1 day to fix
              app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 1762..1772

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

              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 (opts.prev.button) {
                      opts.prev.button.bind(cf_e(opts.prev.event, conf, false), function(e) {
                        e.preventDefault();
                        $cfs.trigger(cf_e('prev', conf));
                      });
              Severity: Major
              Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 1 day to fix
              app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 1774..1784

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

              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

                      switch(sO.fx) {
                        case 'fade':
                          scrl.pre.anims.push([$cfs, { 'opacity': 0 }]);
                          break;
                        case 'crossfade':
              Severity: Major
              Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 7 hrs to fix
              app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 1176..1191

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

              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

                      switch(sO.fx) {
                        case 'fade':
                          scrl.pre.anims.push([$cfs, { 'opacity': 0 }]);
                          break;
                        case 'crossfade':
              Severity: Major
              Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 7 hrs to fix
              app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 863..878

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

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

                  $cfs._cfs_bind_buttons = function() {
                    $cfs._cfs_unbind_buttons();
                    nv_showNavi(opts, itms.total, conf);
                    nv_enableNavi(opts, itms.first, conf);
              
              
              Severity: Major
              Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 6 hrs to fix

                Function open has 130 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        $.prettyPhoto.open = function(event) {
                            if(typeof settings == "undefined"){ // Means it's an API call, need to manually get the settings and set the variables
                                settings = pp_settings;
                                if($.browser.msie && $.browser.version == 6) settings.theme = "light_square"; // Fallback to a supported theme for IE6
                                pp_images = $.makeArray(arguments[0]);
                Severity: Major
                Found in app/assets/javascripts/jquery.prettyPhoto.js - About 5 hrs to fix

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

                          if (sO.fx == 'directscroll' && opts.items.visibleConf.old < nI) {
                            var hiddenitems = a_itm.slice(opts.items.visibleConf.old, nI),
                              orgW = opts.items[opts.d['width']];
                            hiddenitems.each(function() {
                              var hi = $(this);
                  Severity: Major
                  Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 4 hrs to fix
                  app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 748..758

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

                  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 (sO.fx == 'directscroll' && opts.items.visible < nI) {
                            var hiddenitems = a_itm.slice(opts.items.visibleConf.old, nI),
                              orgW = opts.items[opts.d['width']];
                            hiddenitems.each(function() {
                              var hi = $(this);
                  Severity: Major
                  Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 4 hrs to fix
                  app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 1057..1067

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

                  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 (opts.prev.mousewheel) {
                            if (!crsl.mousewheelPrev) {
                              crsl.mousewheelPrev = true;
                              $wrp.mousewheel(function(e, delta) { 
                                if (delta > 0) {
                  Severity: Major
                  Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 3 hrs to fix
                  app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 1798..1809

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

                  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 (opts.next.mousewheel) {
                            if (!crsl.mousewheelNext) {
                              crsl.mousewheelNext = true;
                              $wrp.mousewheel(function(e, delta) { 
                                if (delta < 0) {
                  Severity: Major
                  Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 3 hrs to fix
                  app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 1786..1797

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

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

                          function _build_overlay(caller){
                              // Inject Social Tool markup into General markup
                              if(settings.social_tools)
                                  facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href)); 
                  
                  
                  Severity: Major
                  Found in app/assets/javascripts/jquery.prettyPhoto.js - About 3 hrs to fix

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

                              switch(sO.fx) {
                                case 'fade':
                                  scrl.pre.anims.push([$cfs, { 'opacity': 1 }, fn]);
                                  sc_startScroll(scrl.pre);
                                  break;
                    Severity: Major
                    Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 3 hrs to fix
                    app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 926..938

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

                    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