mattvanhorn/BJJLife

View on GitHub

Showing 102 of 102 total issues

Function _fitToViewport has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function _fitToViewport(width,height){
            resized = false;

            _getDimensions(width,height);
            
Severity: Minor
Found in app/assets/javascripts/jquery.prettyPhoto.js - About 1 hr to fix

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

            if (itms.total < opts.items.visible + nI) {
              $cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);
            }
    Severity: Major
    Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 1 hr to fix
    app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 1034..1036

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

    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 (itms.total < opts.items.visible+nI) {
              $cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);
            }
    Severity: Major
    Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 1 hr to fix
    app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 724..726

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

    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 (opts.align) {
              opts.padding[opts.d[1]] = pR;
              opts.padding[opts.d[3]] = pL;
            }
    Severity: Major
    Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 1 hr to fix
    app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 773..776

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

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

            function _showContent(){
                $('.pp_loaderIcon').hide();
    
                // Calculate the opened top position of the pic holder
                projectedTop = scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2));
    Severity: Minor
    Found in app/assets/javascripts/jquery.prettyPhoto.js - About 1 hr to fix

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

              if (opts.align) {
                opts.padding[opts.d[1]] = pR;
                opts.padding[opts.d[3]] = pL;
              }
      Severity: Major
      Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 1 hr to fix
      app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 1084..1087

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

      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 (hiddenitems) {
                  hiddenitems.each(function() {
                    var hi = $(this);
                    if (!hi.data('isHidden')) hi.show();
                  });  
      Severity: Major
      Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 1 hr to fix
      app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 1209..1214

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

      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 (hiddenitems) {
                  hiddenitems.each(function() {
                    var hi = $(this);
                    if (!hi.data('isHidden')) hi.show();
                  });
      Severity: Major
      Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 1 hr to fix
      app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 891..896

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

      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

                  $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){
                      $.prettyPhoto.changePage('previous');
                      $.prettyPhoto.stopSlideshow();
                      return false;
                  });
      Severity: Major
      Found in app/assets/javascripts/jquery.prettyPhoto.js and 1 other location - About 1 hr to fix
      app/assets/javascripts/jquery.prettyPhoto.js on lines 863..867

      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

                  $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){
                      $.prettyPhoto.changePage('next');
                      $.prettyPhoto.stopSlideshow();
                      return false;
                  });
      Severity: Major
      Found in app/assets/javascripts/jquery.prettyPhoto.js and 1 other location - About 1 hr to fix
      app/assets/javascripts/jquery.prettyPhoto.js on lines 857..861

      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

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

        function go_getNaviObject($tt, obj, type) {
          if (typeof type != 'string') type = '';
      
          obj = go_getObject($tt, obj);
          if (typeof obj == 'string') {
      Severity: Minor
      Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 1 hr to fix

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

                if (!crsl.isPaused) {
                  if (opts.auto.button) {
                    opts.auto.button.addClass(cf_c('paused', conf));
                  }
                }
        Severity: Major
        Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 1 hr to fix
        app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 409..413

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                if (!crsl.isStopped) {
                  if (opts.auto.button) {
                    opts.auto.button.addClass(cf_c('stopped', conf));
                  }
                }
        Severity: Major
        Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 1 hr to fix
        app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 455..459

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                function _getDimensions(width,height){
                    width = parseFloat(width);
                    height = parseFloat(height);
                    
                    // Get the details height, to do so, I need to clone it since it's invisible
        Severity: Minor
        Found in app/assets/javascripts/jquery.prettyPhoto.js - About 1 hr to fix

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

                          $pp_gallery.find('.pp_arrow_next').click(function(){
                              $.prettyPhoto.changeGalleryPage('next');
                              $.prettyPhoto.stopSlideshow();
                              return false;
                          });
          Severity: Major
          Found in app/assets/javascripts/jquery.prettyPhoto.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/jquery.prettyPhoto.js on lines 789..793

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

          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

                          $pp_gallery.find('.pp_arrow_previous').click(function(){
                              $.prettyPhoto.changeGalleryPage('previous');
                              $.prettyPhoto.stopSlideshow();
                              return false;
                          });
          Severity: Major
          Found in app/assets/javascripts/jquery.prettyPhoto.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/jquery.prettyPhoto.js on lines 783..787

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

          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(isSet && settings.overlay_gallery && _getFileType(pp_images[set_position])=="image" && (settings.ie6_fallback && !($.browser.msie && parseInt($.browser.version) == 6))) {
                          itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin.
                          navWidth = (settings.theme == "facebook" || settings.theme == "pp_default") ? 50 : 30; // Define the arrow width depending on the theme
                          
                          itemsPerPage = Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth);
          Severity: Major
          Found in app/assets/javascripts/jquery.prettyPhoto.js - About 1 hr to fix

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

                  if (!opts.items[opts.d['height']]) {
                    opts.items[opts.d['height']] = (ms_hasVariableSizes(all_itm, opts, 'outerHeight')) 
                      ? 'variable' 
                      : all_itm[opts.d['outerHeight']](true);
                  }
            Severity: Minor
            Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 55 mins to fix
            app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 150..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 54.

            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

            } else {
                    opts.items[opts.d['width']] = (ms_hasVariableSizes(all_itm, opts, 'outerWidth')) 
                      ? 'variable' 
                      : all_itm[opts.d['outerWidth']](true);
            }
            Severity: Minor
            Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 55 mins to fix
            app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 158..162

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

            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[opts.d['height']] == 'auto') {
                    opts[opts.d['height']] = ms_getTrueLargestSize(all_itm, opts, 'outerHeight');
                  }
            Severity: Minor
            Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js and 1 other location - About 50 mins to fix
            app/assets/javascripts/jquery.carouFredSel-5.6.1.js on lines 129..131

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

            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