suitmedia/suitcoda

View on GitHub

Showing 784 of 784 total issues

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

                        if (YSLOW.doc) {
                            if (YSLOW.doc.tools_desc) {
                                v = YSLOW.doc.tools_desc
                            }
                            if (YSLOW.doc.view_names && YSLOW.doc.view_names.tools) {
Severity: Major
Found in performance/yslow.js and 1 other location - About 2 hrs to fix
performance/yslow.js on lines 5508..5515

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

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

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

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

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

Refactorings

Further Reading

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

        for ( var i = 0; i < w3ResultError.errorMsg.length; i++ ) {
            resultHTMLLinter.checking.push({
                type    : 'Error',
                desc    : w3ResultError.errorMsg[i],
                line    : w3ResultError.errorLine[i],
Severity: Major
Found in linter/htmlHorseman.js and 1 other location - About 2 hrs to fix
linter/htmlHorseman.js on lines 109..116

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

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 (YSLOW.doc) {
                            if (YSLOW.doc.rulesettings_desc) {
                                x = YSLOW.doc.rulesettings_desc
                            }
                            if (YSLOW.doc.view_names && YSLOW.doc.view_names.rulesetedit) {
Severity: Major
Found in performance/yslow.js and 1 other location - About 2 hrs to fix
performance/yslow.js on lines 5486..5493

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

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

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

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

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

Refactorings

Further Reading

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

        for ( var j = 0; j < w3ResultWarning.warningMsg.length; j++ ) {
            resultHTMLLinter.checking.push({
                type    : 'Warning',
                desc    : w3ResultWarning.warningMsg[j],
                line    : w3ResultWarning.warningLine[j],
Severity: Major
Found in linter/htmlHorseman.js and 1 other location - About 2 hrs to fix
linter/htmlHorseman.js on lines 100..107

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

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 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 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/dev/js/vendor/fastclick.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 matcherFromGroupMatchers has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
    var bySet = setMatchers.length > 0,
        byElement = elementMatchers.length > 0,
        superMatcher = function( seed, context, xml, results, outermost ) {
            var elem, j, matcher,
Severity: Major
Found in _frontend/assets/js/vendor/jquery.min.js - About 2 hrs to fix

    Function matcherFromGroupMatchers has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
        var bySet = setMatchers.length > 0,
            byElement = elementMatchers.length > 0,
            superMatcher = function( seed, context, xml, results, outermost ) {
                var elem, j, matcher,
    Severity: Major
    Found in _frontend/dev/js/vendor/jquery.js - About 2 hrs to fix

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

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

                                      if (q === "fetch") {
                                          u = this.getElementByTagNameAndId(z, "div", "fetchprogress");
                                          x = this.getElementByTagNameAndId(z, "div", "progbar2");
                                          y = this.getElementByTagNameAndId(z, "div", "progtext2");
                                          A = v.last_component_url;
      Severity: Major
      Found in performance/yslow.js and 1 other location - About 2 hrs to fix
      performance/yslow.js on lines 3750..3774

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

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

                                  if (q === "peel") {
                                      u = this.getElementByTagNameAndId(z, "div", "peelprogress");
                                      x = this.getElementByTagNameAndId(z, "div", "progbar");
                                      y = this.getElementByTagNameAndId(z, "div", "progtext");
                                      A = v.message;
      Severity: Major
      Found in performance/yslow.js and 1 other location - About 2 hrs to fix
      performance/yslow.js on lines 3757..3773

      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

      Function testResults has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                          testResults: function(y, s) {
                              var C, H, r, z, E, t, D, F, v = [],
                                  B = {
                                      a: 90,
                                      b: 80,
      Severity: Major
      Found in performance/yslow.js - About 2 hrs to fix

        Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function done( status, nativeStatusText, responses, headers ) {
                    var isSuccess, success, error, response, modified,
                        statusText = nativeStatusText;
        
                    // Called once
        Severity: Major
        Found in _frontend/assets/js/vendor/jquery.min.js - About 2 hrs to fix

          Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function done( status, nativeStatusText, responses, headers ) {
                      var isSuccess, success, error, response, modified,
                          statusText = nativeStatusText;
          
                      // Called once
          Severity: Major
          Found in _frontend/dev/js/vendor/jquery.js - About 2 hrs to fix

            Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                if ( postFilter && !postFilter[ expando ] ) {
                    postFilter = setMatcher( postFilter );
                }
                if ( postFinder && !postFinder[ expando ] ) {
            Severity: Major
            Found in _frontend/assets/js/vendor/jquery.min.js - About 2 hrs to fix

              Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                  if ( postFilter && !postFilter[ expando ] ) {
                      postFilter = setMatcher( postFilter );
                  }
                  if ( postFinder && !postFinder[ expando ] ) {
              Severity: Major
              Found in _frontend/dev/js/vendor/jquery.js - About 2 hrs to fix

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

                                        for (w = 0, z = v.length; w < z; w += 1) {
                                            u = v[w];
                                            q = u.src || u.getAttribute("src");
                                            if (q) {
                                                r[q] = 1
                Severity: Major
                Found in performance/yslow.js and 3 other locations - About 2 hrs to fix
                performance/yslow.js on lines 2387..2393
                performance/yslow.js on lines 2403..2409
                performance/yslow.js on lines 2411..2417

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

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

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

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

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

                Refactorings

                Further Reading

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

                                            for (t in w.PAGE.totalObjCount) {
                                                if (w.PAGE.totalObjCount.hasOwnProperty(t)) {
                                                    V[t] = {
                                                        r: w.PAGE.totalObjCount[t],
                                                        w: w.PAGE.totalObjSize[t]
                Severity: Major
                Found in performance/yslow.js and 1 other location - About 2 hrs to fix
                performance/yslow.js on lines 1680..1687

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

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

                                        for (w = 0, z = v.length; w < z; w += 1) {
                                            u = v[w];
                                            q = u.src || u.getAttribute("src");
                                            if (q) {
                                                r[q] = 1
                Severity: Major
                Found in performance/yslow.js and 3 other locations - About 2 hrs to fix
                performance/yslow.js on lines 2387..2393
                performance/yslow.js on lines 2395..2401
                performance/yslow.js on lines 2403..2409

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

                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