suitmedia/suitcoda

View on GitHub
_frontend/assets/js/vendor/fastclick.min.js

Summary

Maintainability
F
3 wks
Test Coverage

File fastclick.min.js has 366 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
 *
 * @version 0.6.9
 * @codingstandard ftlabs-jsv2
Severity: Minor
Found in _frontend/assets/js/vendor/fastclick.min.js - About 4 hrs to fix

    Function onTouchEnd has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

    FastClick.prototype.onTouchEnd = function(event) {
        'use strict';
        var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
    
        if (!this.trackingClick) {
    Severity: Minor
    Found in _frontend/assets/js/vendor/fastclick.min.js - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function FastClick has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    function FastClick(layer) {
        'use strict';
        var oldOnClick, self = this;
    
    
    
    Severity: Minor
    Found in _frontend/assets/js/vendor/fastclick.min.js - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    function FastClick(layer) {
        'use strict';
        var oldOnClick, self = this;
    
    
    
    Severity: Major
    Found in _frontend/assets/js/vendor/fastclick.min.js - About 2 hrs to fix

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

      FastClick.prototype.onTouchEnd = function(event) {
          'use strict';
          var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
      
          if (!this.trackingClick) {
      Severity: Minor
      Found in _frontend/assets/js/vendor/fastclick.min.js - About 2 hrs to fix

        Function onTouchStart has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        FastClick.prototype.onTouchStart = function(event) {
            'use strict';
            var targetElement, touch, selection;
        
            // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
        Severity: Minor
        Found in _frontend/assets/js/vendor/fastclick.min.js - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function onTouchStart has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        FastClick.prototype.onTouchStart = function(event) {
            'use strict';
            var targetElement, touch, selection;
        
            // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
        Severity: Minor
        Found in _frontend/assets/js/vendor/fastclick.min.js - About 1 hr to fix

          Function notNeeded has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

          FastClick.notNeeded = function(layer) {
              'use strict';
              var metaViewport;
          
              // Devices that don't support touch don't need FastClick
          Severity: Minor
          Found in _frontend/assets/js/vendor/fastclick.min.js - About 55 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function onMouse has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          FastClick.prototype.onMouse = function(event) {
              'use strict';
          
              // If a target element was never set (because a touch event was never fired) allow the event
              if (!this.targetElement) {
          Severity: Minor
          Found in _frontend/assets/js/vendor/fastclick.min.js - About 45 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function updateScrollParent has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          FastClick.prototype.updateScrollParent = function(targetElement) {
              'use strict';
              var scrollParent, parentElement;
          
              scrollParent = targetElement.fastClickScrollParent;
          Severity: Minor
          Found in _frontend/assets/js/vendor/fastclick.min.js - About 45 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Avoid too many return statements within this function.
          Open

              return false;
          Severity: Major
          Found in _frontend/assets/js/vendor/fastclick.min.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return false;
            Severity: Major
            Found in _frontend/assets/js/vendor/fastclick.min.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return true;
              Severity: Major
              Found in _frontend/assets/js/vendor/fastclick.min.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return true;
                Severity: Major
                Found in _frontend/assets/js/vendor/fastclick.min.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return false;
                  Severity: Major
                  Found in _frontend/assets/js/vendor/fastclick.min.js - About 30 mins to fix

                    Function needsClick has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                    FastClick.prototype.needsClick = function(target) {
                        'use strict';
                        switch (target.nodeName.toLowerCase()) {
                    
                        // Don't send a synthetic click to disabled inputs (issue #62)
                    Severity: Minor
                    Found in _frontend/assets/js/vendor/fastclick.min.js - About 25 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

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

                    function FastClick(layer) {
                        'use strict';
                        var oldOnClick, self = this;
                    
                    
                    
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 5 days to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 20..167

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

                    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

                    FastClick.prototype.onTouchEnd = function(event) {
                        'use strict';
                        var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
                    
                        if (!this.trackingClick) {
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 3 days to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 496..577

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

                    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

                    FastClick.prototype.onTouchStart = function(event) {
                        'use strict';
                        var targetElement, touch, selection;
                    
                        // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 1 day to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 365..422

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

                    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

                    FastClick.prototype.onMouse = function(event) {
                        'use strict';
                    
                        // If a target element was never set (because a touch event was never fired) allow the event
                        if (!this.targetElement) {
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 7 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 598..638

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

                    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

                    FastClick.prototype.destroy = function() {
                        'use strict';
                        var layer = this.layer;
                    
                        if (this.deviceIsAndroid) {
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 7 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 682..697

                    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

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

                    FastClick.prototype.sendClick = function(targetElement, event) {
                        'use strict';
                        var clickEvent, touch;
                    
                        // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 6 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 275..291

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

                    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

                    FastClick.notNeeded = function(layer) {
                        'use strict';
                        var metaViewport;
                    
                        // Devices that don't support touch don't need FastClick
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 6 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 705..735

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

                    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

                    FastClick.prototype.updateScrollParent = function(targetElement) {
                        'use strict';
                        var scrollParent, parentElement;
                    
                        scrollParent = targetElement.fastClickScrollParent;
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 6 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 315..340

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

                    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

                    FastClick.prototype.onClick = function(event) {
                        'use strict';
                        var permitted;
                    
                        // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 5 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 649..674

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

                    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

                    FastClick.prototype.needsClick = function(target) {
                        'use strict';
                        switch (target.nodeName.toLowerCase()) {
                    
                        // Don't send a synthetic click to disabled inputs (issue #62)
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 5 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 208..235

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

                    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

                    FastClick.prototype.needsFocus = function(target) {
                        'use strict';
                        switch (target.nodeName.toLowerCase()) {
                        case 'textarea':
                        case 'select':
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 4 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 244..266

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

                    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

                    FastClick.prototype.touchHasMoved = function(event) {
                        'use strict';
                        var touch = event.changedTouches[0], boundary = this.touchBoundary;
                    
                        if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 3 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 431..440

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

                    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

                    FastClick.prototype.onTouchMove = function(event) {
                        'use strict';
                        if (!this.trackingClick) {
                            return true;
                        }
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 3 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 449..462

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

                    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 (typeof define !== 'undefined' && define.amd) {
                    
                        // AMD. Register as an anonymous module.
                        define(function() {
                            'use strict';
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 3 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 749..761

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

                    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

                    FastClick.prototype.findControl = function(labelElement) {
                        'use strict';
                    
                        // Fast path for newer browsers supporting the HTML5 control attribute
                        if (labelElement.control !== undefined) {
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 3 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 471..487

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

                    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

                    FastClick.prototype.focus = function(targetElement) {
                        'use strict';
                        var length;
                    
                        if (this.deviceIsIOS && targetElement.setSelectionRange) {
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 2 hrs to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 297..307

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

                    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

                    FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
                        'use strict';
                    
                        // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
                        if (eventTarget.nodeType === Node.TEXT_NODE) {
                    Severity: Major
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 1 hr to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 347..356

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

                    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

                    FastClick.prototype.onTouchCancel = function() {
                        'use strict';
                        this.trackingClick = false;
                        this.targetElement = null;
                    };
                    Severity: Minor
                    Found in _frontend/assets/js/vendor/fastclick.min.js and 1 other location - About 30 mins to fix
                    _frontend/dev/js/vendor/fastclick.js on lines 585..589

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

                    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

                    There are no issues that match your filters.

                    Category
                    Status