mattma/gulp-htmlbars

View on GitHub

Showing 93 of 93 total issues

Function BlockStatement has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

      BlockStatement: function(sexpr, program, inverse, openStrip, inverseStrip, closeStrip, locInfo) {
Severity: Major
Found in bower_components/ember/ember-template-compiler.js - About 50 mins to fix

    Function performAction has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
    Severity: Major
    Found in bower_components/ember/ember-template-compiler.js - About 50 mins to fix

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

              if (this.tokenizer.state === 'comment') {
                this.tokenizer.addChar('{{' + this.sourceForMustache(block) + '}}');
                return;
              }
      Severity: Minor
      Found in bower_components/ember/ember-template-compiler.js and 1 other location - About 50 mins to fix
      bower_components/ember/ember-template-compiler.js on lines 3428..3431

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

      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 (this.tokenizer.state === 'comment') {
                this.tokenizer.addChar('{{' + this.sourceForMustache(mustache) + '}}');
                return;
              }
      Severity: Minor
      Found in bower_components/ember/ember-template-compiler.js and 1 other location - About 50 mins to fix
      bower_components/ember/ember-template-compiler.js on lines 3408..3411

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

      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

      Avoid deeply nested control flow statements.
      Open

                              if (this.terminals_[p] && p > 2) {
                                  expected.push("'" + this.terminals_[p] + "'");
                              }
      Severity: Major
      Found in bower_components/ember/ember-template-compiler.js - About 45 mins to fix

        Function prepareBlock has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            __exports__.prepareRawBlock = prepareRawBlock;function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
        Severity: Minor
        Found in bower_components/ember/ember-template-compiler.js - About 45 mins to fix

          Function openElement has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              TemplateCompiler.prototype.openElement = function(element, i, l, r, c, b) {
          Severity: Minor
          Found in bower_components/ember/ember-template-compiler.js - About 45 mins to fix

            Function openElement has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                HydrationOpcodeCompiler.prototype.openElement = function(element, pos, len, isSingleRoot, mustacheCount, blankChildTextNodes) {
            Severity: Minor
            Found in bower_components/ember/ember-template-compiler.js - About 45 mins to fix

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

                    Comment: function(token) {
                      var current = this.currentElement();
                      var comment = buildComment(token.chars);
                      appendChild(current, comment);
                    },
              Severity: Minor
              Found in bower_components/ember/ember-template-compiler.js and 1 other location - About 40 mins to fix
              bower_components/ember/ember-template-compiler.js on lines 3657..3661

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

              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

                    Chars: function(token) {
                      var current = this.currentElement();
                      var text = buildText(token.chars);
                      appendChild(current, text);
                    },
              Severity: Minor
              Found in bower_components/ember/ember-template-compiler.js and 1 other location - About 40 mins to fix
              bower_components/ember/ember-template-compiler.js on lines 3651..3655

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

              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 createAttrMorph has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  prototype.createAttrMorph = function(attrMorphNum, elementNum, name, escaped, namespace) {
              Severity: Minor
              Found in bower_components/ember/ember-template-compiler.js - About 35 mins to fix

                Function createMorph has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    prototype.createMorph = function(morphNum, parentPath, startIndex, endIndex, escaped) {
                Severity: Minor
                Found in bower_components/ember/ember-template-compiler.js - About 35 mins to fix

                  Function PathExpression has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        PathExpression: function(data, depth, parts, original, locInfo) {
                  Severity: Minor
                  Found in bower_components/ember/ember-template-compiler.js - About 35 mins to fix

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

                            for(var i=0, l=params.length; i<l; i++) {
                              this.accept(params[i]);
                            }
                    Severity: Minor
                    Found in bower_components/ember/ember-template-compiler.js and 1 other location - About 35 mins to fix
                    bower_components/ember/ember-template-compiler.js on lines 2996..2998

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

                    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, l=pairs.length; i<l; i++) {
                              this.accept(pairs[i]);
                            }
                    Severity: Minor
                    Found in bower_components/ember/ember-template-compiler.js and 1 other location - About 35 mins to fix
                    bower_components/ember/ember-template-compiler.js on lines 2981..2983

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

                    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 (matches) {
                            tokenizer["char"] += matches[0].length;
                            return String.fromCharCode(parseInt(matches[1], 16));
                          }
                    Severity: Minor
                    Found in bower_components/ember/ember-template-compiler.js and 1 other location - About 35 mins to fix
                    bower_components/ember/ember-template-compiler.js on lines 6506..6509

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

                    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 (matches) {
                            tokenizer["char"] += matches[0].length;
                            return String.fromCharCode(parseInt(matches[1], 10));
                          }
                    Severity: Minor
                    Found in bower_components/ember/ember-template-compiler.js and 1 other location - About 35 mins to fix
                    bower_components/ember/ember-template-compiler.js on lines 6501..6504

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

                    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

                        function unwrapMustache(mustache) {
                          if (isHelper(mustache.sexpr)) {
                            return mustache.sexpr;
                          } else {
                            return mustache.sexpr.path;
                    Severity: Minor
                    Found in bower_components/ember/ember-template-compiler.js and 1 other location - About 35 mins to fix
                    bower_components/ember/ember-template-compiler.js on lines 3864..3870

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

                    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

                        function unwrapMustache(mustache) {
                          if (isHelper(mustache.sexpr)) {
                            return mustache.sexpr;
                          } else {
                            return mustache.sexpr.path;
                    Severity: Minor
                    Found in bower_components/ember/ember-template-compiler.js and 1 other location - About 35 mins to fix
                    bower_components/ember/ember-template-compiler.js on lines 1200..1206

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

                    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

                    Avoid too many return statements within this function.
                    Open

                          return string.replace(badChars, escapeChar);
                    Severity: Major
                    Found in bower_components/ember/ember-template-compiler.js - About 30 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language