jasonrobertfox/tictactoe

View on GitHub

Showing 126 of 126 total issues

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

    self.init = function() {
      self.build_markup();
      if (settings.timer) {timer = self.create_timer(); timer.start();}
      animate = new FadeAnimation(settings, slides_container);
      if (settings.animation === 'slide') 
Severity: Major
Found in lib/assets/javascripts/foundation/foundation.orbit.js - About 2 hrs to fix

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

        pos_default : function (init, resizing) {
          var half_fold = Math.ceil($(window).height() / 2),
              tip_position = this.settings.$next_tip.offset(),
              $nub = this.settings.$next_tip.find('.joyride-nub'),
              nub_width = Math.ceil(this.outerWidth($nub) / 2),
    Severity: Major
    Found in lib/assets/javascripts/foundation/foundation.joyride.js - About 2 hrs to fix

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

                  regions.each(function () {
                    var region = $(this);
      
                    region.css("margin-top", "-" + (first1 ? section : region.children(self.settings.title_selector)).css("border-top-width"));
                    first1 = false;
      Severity: Major
      Found in lib/assets/javascripts/foundation/foundation.section.js and 1 other location - About 2 hrs to fix
      lib/assets/javascripts/foundation/foundation.section.js on lines 234..239

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

      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

                  regions.each(function() {
                    var region = $(this);
      
                    region.css("margin-left", "-" + (first ? section : region.children(self.settings.title_selector)).css("border-left-width"));
                    first = false;
      Severity: Major
      Found in lib/assets/javascripts/foundation/foundation.section.js and 1 other location - About 2 hrs to fix
      lib/assets/javascripts/foundation/foundation.section.js on lines 276..281

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

      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

      Class GameState has 21 methods (exceeds 20 allowed). Consider refactoring.
      Open

        class GameState
          DIAGONAL_ID = 'd'
          REVERSE_DIAGONAL_ID = 'rd'
          COLUMN_PREFIX = 'c'
          ROW_PREFIX = 'r'
      Severity: Minor
      Found in lib/tictactoe/game_state.rb - About 2 hrs to fix

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

            events : function () {
              var self = this;
        
              $(this.scope)
                .off('.fndtn.reveal')
        Severity: Major
        Found in lib/assets/javascripts/foundation/foundation.reveal.js - About 2 hrs to fix

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

              expose : function () {
                var expose,
                    exposeCover,
                    el,
                    origCSS,
          Severity: Major
          Found in lib/assets/javascripts/foundation/foundation.joyride.js - About 2 hrs to fix

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

                toggle: function() {
                  var self = this;
                  var topbar = $('.top-bar, [data-topbar]'),
                      section = topbar.find('section, .section');
            
            
            Severity: Minor
            Found in lib/assets/javascripts/foundation/foundation.topbar.js - About 2 hrs to fix

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

                  set_active_from_hash: function() {
                    var self = Foundation.libs.section,
                        hash = window.location.hash.substring(1),
                        sections = $(self.settings.section_selector);
              
              
              Severity: Minor
              Found in lib/assets/javascripts/foundation/foundation.section.js - About 2 hrs to fix

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

                      lib.outerWidth = function (el, bool) {
                        if (typeof Zepto === 'function') {
                          return el.width();
                        }
                
                
                Severity: Major
                Found in lib/assets/javascripts/foundation/foundation.js and 1 other location - About 2 hrs to fix
                lib/assets/javascripts/foundation/foundation.js on lines 416..426

                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

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

                      lib.outerHeight = function (el, bool) {
                        if (typeof Zepto === 'function') {
                          return el.height();
                        }
                
                
                Severity: Major
                Found in lib/assets/javascripts/foundation/foundation.js and 1 other location - About 2 hrs to fix
                lib/assets/javascripts/foundation/foundation.js on lines 428..438

                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

                              this.delay(function () {
                                $timer.animate({
                                  width: $timer.parent().width()
                                }, this.settings.timer, 'linear');
                              }.bind(this), this.settings.tipAnimationFadeSpeed);
                Severity: Major
                Found in lib/assets/javascripts/foundation/foundation.joyride.js and 1 other location - About 1 hr to fix
                lib/assets/javascripts/foundation/foundation.joyride.js on lines 307..311

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 74.

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

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

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

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

                Refactorings

                Further Reading

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

                              this.delay(function () {
                                $timer.animate({
                                  width: $timer.parent().width()
                                }, this.settings.timer, 'linear');
                              }.bind(this), this.settings.tipAnimationFadeSpeed);
                Severity: Major
                Found in lib/assets/javascripts/foundation/foundation.joyride.js and 1 other location - About 1 hr to fix
                lib/assets/javascripts/foundation/foundation.joyride.js on lines 285..289

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 74.

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

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

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

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

                Refactorings

                Further Reading

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

                    un_expose : function () {
                      var exposeId,
                          el,
                          expose ,
                          origCSS,
                Severity: Minor
                Found in lib/assets/javascripts/foundation/foundation.joyride.js - About 1 hr to fix

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

                        expose.css({
                          top: el.offset().top,
                          left: el.offset().left,
                          width: this.outerWidth(el, true),
                          height: this.outerHeight(el, true)
                  Severity: Major
                  Found in lib/assets/javascripts/foundation/foundation.joyride.js and 1 other location - About 1 hr to fix
                  lib/assets/javascripts/foundation/foundation.joyride.js on lines 623..628

                  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

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

                        exposeCover.css({
                          top: el.offset().top,
                          left: el.offset().left,
                          width: this.outerWidth(el, true),
                          height: this.outerHeight(el, true)
                  Severity: Major
                  Found in lib/assets/javascripts/foundation/foundation.joyride.js and 1 other location - About 1 hr to fix
                  lib/assets/javascripts/foundation/foundation.joyride.js on lines 597..602

                  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

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

                          if (slides_container.height() != next.height() && settings.variable_height) {
                            slides_container.animate({'height': next.height()}, 250, 'linear', unlock);
                          } else {
                            unlock();
                          }
                  Severity: Major
                  Found in lib/assets/javascripts/foundation/foundation.orbit.js and 1 other location - About 1 hr to fix
                  lib/assets/javascripts/foundation/foundation.orbit.js on lines 130..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 70.

                  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 (next.height() > slides_container.height() && settings.variable_height) {
                          slides_container.animate({'height': next.height()}, 250, 'linear', start_animation);
                        } else {
                          start_animation();
                        }
                  Severity: Major
                  Found in lib/assets/javascripts/foundation/foundation.orbit.js and 1 other location - About 1 hr to fix
                  lib/assets/javascripts/foundation/foundation.orbit.js on lines 116..120

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

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

                      show : function (el, css) {
                        // is modal
                        if (css) {
                          if (el.parent('body').length === 0) {
                            var placeholder = el.wrap('<div style="display: none;" />').parent();
                  Severity: Minor
                  Found in lib/assets/javascripts/foundation/foundation.reveal.js - About 1 hr to fix

                    Function _goto has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        self._goto = function(next_idx, start_timer) {
                          // if (locked) {return false;}
                          if (next_idx === idx) {return false;}
                          if (typeof timer === 'object') {timer.restart();}
                          var slides = slides_container.children();
                    Severity: Minor
                    Found in lib/assets/javascripts/foundation/foundation.orbit.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language