codefordayton/metroparks-tribute

View on GitHub

Showing 5,402 of 5,402 total issues

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

        if(!jQuery(this).hasClass('open')) {
          jQuery(this).addClass('open'); 
          subaccordion.siblings('.general-content').addClass('open');
          mainTitle.siblings('.park-accordion-content').addClass('open');
          mainTitle.addClass('open');
Severity: Major
Found in tribute_files/main.js and 1 other location - About 2 hrs to fix
tribute_files/main.js on lines 374..380

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

        } else {
          jQuery(this).removeClass('open'); 
          subaccordion.siblings('.general-content').removeClass('open');
          mainTitle.siblings('.park-accordion-content').removeClass('open');
          mainTitle.removeClass('open');
Severity: Major
Found in tribute_files/main.js and 1 other location - About 2 hrs to fix
tribute_files/main.js on lines 368..374

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

            for (var i = 0; i < json.experiences.length; ++i) {
              options += '<option value="' + json.experiences[i].id + '">' + json.experiences[i].name + '</option>';
            }
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 753..755

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

Function initDefaultPage has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function initDefaultPage () {
  function setUpDefaultAccordion() {
    var accordArea = jQuery('.rental-collapse-area');
    if(window.location.hash) {
      var hash = window.location.hash.substr(1);
Severity: Major
Found in tribute_files/main.js - About 2 hrs to fix

    Function ellipsis has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function ellipsis( $elem, $d, $i, o, after )
        {
            var isTruncated    = false;
    
            //    Don't put the ellipsis directly inside these elements
    Severity: Major
    Found in tribute_files/dotdot.js - About 2 hrs to fix

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

        if (window.location.href.indexOf("?footer-feedback-popup") > -1) {
          jQuery("html, body").animate({ scrollTop: jQuery(document).height() }, "slow");
          jQuery(".footer-contact-button").trigger("click");
        }
      Severity: Major
      Found in tribute_files/main.js and 1 other location - About 2 hrs to fix
      tribute_files/main.js on lines 131..134

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

      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

          amenityBtn.click(function(){
            activityBtn.removeClass('open');
            amenityBtn.removeClass('open');
            btn = jQuery(this);
            btnData = jQuery(this).attr("data-info-button");
      Severity: Major
      Found in tribute_files/main.js and 1 other location - About 2 hrs to fix
      tribute_files/main.js on lines 236..242

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

      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

          activityBtn.click(function(){
            activityBtn.removeClass('open');
            amenityBtn.removeClass('open');
            btn = jQuery(this);
            btnData = jQuery(this).attr("data-info-button");
      Severity: Major
      Found in tribute_files/main.js and 1 other location - About 2 hrs to fix
      tribute_files/main.js on lines 226..232

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

      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 (window.location.href.indexOf("?newsletter-email") > -1) {
          jQuery("html, body").animate({ scrollTop: jQuery(document).height() }, "slow");
          jQuery(".newsletter-submit-button").trigger("click");
        }
      Severity: Major
      Found in tribute_files/main.js and 1 other location - About 2 hrs to fix
      tribute_files/main.js on lines 114..117

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

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

              reposition: function (el, ordinal) {
                  var $el = $(el);
                  var options = $el.data('popupoptions');
                  var $wrapper = $('#' + el.id + '_wrapper');
                  var $background = $('#' + el.id + '_background');
      Severity: Major
      Found in tribute_files/popup.js - About 2 hrs to fix

        Function is_openeings has 52 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function is_openeings(openings, jsonString, formTitle, title, hasWaitingList) {
              
              if(!openings || !jsonString) return;
                    
              var registration_max;
        Severity: Major
        Found in tribute_files/insivia-frmp-script.js - About 2 hrs to fix

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

                for (var i = 0; i < daysArray[0].getDay(); ++i) {
                  calendarBuild += '<div class="insivia-frmp-calendar-' + dotwArray[w].toLowerCase() + ' insivia-frmp-calendar-week-' + i + ' insivia-frmp-calendar-day insivia-frmp-event-day insivia-col-7 inactive"></div>';
                  ++w;
                }
          Severity: Major
          Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
          tribute_files/insivia-frmp-script.js on lines 949..952

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

          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

                for (var i = 0; i < daysArray[0].getDay(); ++i) {
                  calendarBuild += '<div class="insivia-frmp-calendar-' + dotwArray[w].toLowerCase() + ' insivia-frmp-calendar-week-' + i + ' insivia-frmp-calendar-day insivia-frmp-event-day insivia-col-7 inactive"></div>';
                  ++w;
                }
          Severity: Major
          Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
          tribute_files/insivia-frmp-script.js on lines 3207..3210

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

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

              function search_results(url, append) {
                var results = '';
                //url = url.replace('%20&', '+%26');
                //url = url.replace('%20', '+');
                console.log(url);
          Severity: Minor
          Found in tribute_files/insivia-frmp-script.js - About 1 hr to fix

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

            function initActivityFinderPage () {
              function setUpGridListView() {
                var gridViewBtn = jQuery('.finder-grid-view');
                var listViewBtn = jQuery('.finder-list-view');
                var listingArea = jQuery('.finder-activities-listing-area');
            Severity: Minor
            Found in tribute_files/main.js - About 1 hr to fix

              Function setUpDefaultAccordion has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function setUpDefaultAccordion() {
                  var accordArea = jQuery('.rental-collapse-area');
                  if(window.location.hash) {
                    var hash = window.location.hash.substr(1);
                    jQuery('.rental-collapse-area').each(function() {
              Severity: Minor
              Found in tribute_files/main.js - About 1 hr to fix

                Function watch has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        $dot.watch = function()
                        {
                            $dot.unwatch();
                            if ( opts.watch == 'window' )
                            {
                Severity: Minor
                Found in tribute_files/dotdot.js - About 1 hr to fix

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

                        if(!content.hasClass('open')) {
                          content.addClass('open');
                          jQuery(this).addClass('open');
                        } else {
                          content.removeClass('open');
                  Severity: Major
                  Found in tribute_files/main.js and 1 other location - About 1 hr to fix
                  tribute_files/main.js on lines 346..352

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

                  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(!content.hasClass('open')) {
                          content.addClass('open');
                          jQuery(this).addClass('open');
                        } else {
                          content.removeClass('open');
                  Severity: Major
                  Found in tribute_files/main.js and 1 other location - About 1 hr to fix
                  tribute_files/main.js on lines 358..364

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

                  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 6 locations. Consider refactoring.
                  Open

                              $.each($('.reserve-now'), function() {
                                $(this).click(function(e) {
                                  e.preventDefault();
                                  registration_calendar(currentDate, $(this).attr('data-id'));
                                });
                  Severity: Major
                  Found in tribute_files/insivia-frmp-script.js and 5 other locations - About 1 hr to fix
                  tribute_files/insivia-frmp-script.js on lines 1421..1426
                  tribute_files/insivia-frmp-script.js on lines 1564..1569
                  tribute_files/insivia-frmp-script.js on lines 2580..2585
                  tribute_files/insivia-frmp-script.js on lines 2592..2597
                  tribute_files/insivia-frmp-script.js on lines 3130..3135

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

                  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