suitmedia/suitcoda

View on GitHub

Showing 784 of 784 total issues

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/dev/js/vendor/fastclick.js and 1 other location - About 3 days to fix
_frontend/assets/js/vendor/fastclick.min.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.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

Function Modernizr has 587 lines of code (exceeds 25 allowed). Consider refactoring.
Open

window.Modernizr = (function( window, document, undefined ) {

    var version = '2.8.3',

    Modernizr = {},
Severity: Major
Found in _frontend/assets/js/vendor/modernizr.min.js - About 2 days to fix

    Function Modernizr has 587 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    window.Modernizr = (function( window, document, undefined ) {
    
        var version = '2.8.3',
    
        Modernizr = {},
    Severity: Major
    Found in _frontend/dev/js/vendor/modernizr.js - About 2 days to fix

      Function Modernizr has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
      Open

      window.Modernizr = (function( window, document, undefined ) {
      
          var version = '2.8.3',
      
          Modernizr = {},
      Severity: Minor
      Found in _frontend/assets/js/vendor/modernizr.min.js - About 2 days 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 Modernizr has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
      Open

      window.Modernizr = (function( window, document, undefined ) {
      
          var version = '2.8.3',
      
          Modernizr = {},
      Severity: Minor
      Found in _frontend/dev/js/vendor/modernizr.js - About 2 days 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

      File jquery-barIndicator.min.js has 903 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*!
      *    jQuery - barIndicator
      *    A jQuery plugin that helps you visualize percentage or absolute amounts with bars
      *    Author: Ioannis Kapantzakis
      *    Released under the MIT License
      Severity: Major
      Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 2 days to fix

        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.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/dev/js/vendor/fastclick.js and 1 other location - About 1 day to fix
        _frontend/assets/js/vendor/fastclick.min.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

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

            public function testHandleWithDatabaseNotActiveUrl()
            {
                $urlFaker = factory(Url::class, 5)->create();
        
                $project = Mockery::mock(Project::class)->makePartial();
        Severity: Major
        Found in tests/Listeners/CrawlerTheWebsiteTest.php and 1 other location - About 1 day to fix
        tests/Listeners/CrawlerTheWebsiteTest.php on lines 47..99

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

        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

            public function testHandleWithDatabaseActiveUrl()
            {
                $urlFaker = factory(Url::class, 5)->create();
        
                $project = Mockery::mock(Project::class)->makePartial();
        Severity: Major
        Found in tests/Listeners/CrawlerTheWebsiteTest.php and 1 other location - About 1 day to fix
        tests/Listeners/CrawlerTheWebsiteTest.php on lines 106..158

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

        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

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

        /* Modernizr 2.8.3 (Custom Build) | MIT & BSD
         * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-textshadow-cssanimations-csscolumns-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-css_calc-css_lastchild-css_mediaqueries-css_positionsticky-img_webp-load
         */
        ;
        
        
        Severity: Major
        Found in _frontend/assets/js/vendor/modernizr.min.js - About 1 day to fix

          File modernizr.js has 623 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* Modernizr 2.8.3 (Custom Build) | MIT & BSD
           * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-textshadow-cssanimations-csscolumns-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-css_calc-css_lastchild-css_mediaqueries-css_positionsticky-img_webp-load
           */
          ;
          
          
          Severity: Major
          Found in _frontend/dev/js/vendor/modernizr.js - About 1 day to fix

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

                                } else if (style == 'horizontal') {
                                    if (par.reanim) {
                                        bar.css({'width':0}); 
                                    }
                                    bar.animate({'width':bl},at,eas).queue(function() {
            Severity: Major
            Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 day to fix
            _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 403..449

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

            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 (style == 'vertical') {
                                    if (par.reanim) {
                                        bar.css({'height':0}); 
                                    }
                                    bar.animate({'height':bl},at,eas).queue(function() {
            Severity: Major
            Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js and 1 other location - About 1 day to fix
            _frontend/assets/js/vendor/jquery-barIndicator.min.js on lines 426..449

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

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

                    _init: function() {
                        var that = this;
                        var $el = that.$el;
                        var opt = that.opt;
                        var selector = that.selector;
            Severity: Major
            Found in _frontend/assets/js/vendor/jquery-barIndicator.min.js - About 1 day to fix

              Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  ajax: function( url, options ) {
              
                      // If url is an object, simulate pre-1.5 signature
                      if ( typeof url === "object" ) {
                          options = url;
              Severity: Major
              Found in _frontend/assets/js/vendor/jquery.min.js - About 1 day to fix

                Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    ajax: function( url, options ) {
                
                        // If url is an object, simulate pre-1.5 signature
                        if ( typeof url === "object" ) {
                            options = url;
                Severity: Major
                Found in _frontend/dev/js/vendor/jquery.js - About 1 day to fix

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

                          w3ResultError = horseman.evaluate( function (selector) {
                                  
                                  var $results    = $(selector);
                                  var $errors     = $results.find('.error');
                                  var $warnings   = $results.find('.info.warning');
                  Severity: Major
                  Found in linter/htmlHorseman.js and 1 other location - About 1 day to fix
                  linter/htmlHorseman.js on lines 76..98

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

                  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

                          w3ResultWarning = horseman.evaluate( function (selector) {
                                  
                                  var $results    = $(selector);
                                  var $errors     = $results.find('.error');
                                  var $warnings   = $results.find('.info.warning');
                  Severity: Major
                  Found in linter/htmlHorseman.js and 1 other location - About 1 day to fix
                  linter/htmlHorseman.js on lines 52..74

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

                  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