Showing 398 of 398 total issues

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

    var Literal = (function () {
        function Literal(value, raw) {
            this.type = syntax_1.Syntax.Literal;
            this.value = value;
            this.raw = raw;
Severity: Major
Found in dist/csp.tmpl.js and 26 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4882..4889
dist/csp.tmpl.js on lines 4918..4925
dist/csp.tmpl.js on lines 4927..4934
dist/csp.tmpl.js on lines 4999..5006
dist/csp.tmpl.js on lines 5008..5015
dist/csp.tmpl.js on lines 5050..5057
dist/csp.tmpl.js on lines 5141..5148
dist/csp.tmpl.js on lines 5166..5173
dist/csp.tmpl.js on lines 5175..5182
dist/csp.tmpl.js on lines 5193..5200
dist/csp.tmpl.js on lines 5214..5221
dist/csp.tmpl.js on lines 5239..5246
dist/csp.tmpl.js on lines 5320..5327
dist/csp.tmpl.js on lines 5329..5336
dist/csp.tmpl.js on lines 5338..5345
dist/csp.tmpl.js on lines 5347..5354
dist/csp.tmpl.js on lines 5356..5363
dist/csp.tmpl.js on lines 5410..5417
dist/csp.tmpl.js on lines 5419..5426
dist/csp.tmpl.js on lines 5428..5435
dist/csp.tmpl.js on lines 5437..5444
dist/csp.tmpl.js on lines 5446..5453
dist/csp.tmpl.js on lines 6325..6332
dist/csp.tmpl.js on lines 6334..6341
dist/csp.tmpl.js on lines 6343..6350
dist/csp.tmpl.js on lines 6370..6377

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

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

    var VariableDeclarator = (function () {
        function VariableDeclarator(id, init) {
            this.type = syntax_1.Syntax.VariableDeclarator;
            this.id = id;
            this.init = init;
Severity: Major
Found in dist/csp.tmpl.js and 26 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4882..4889
dist/csp.tmpl.js on lines 4918..4925
dist/csp.tmpl.js on lines 4927..4934
dist/csp.tmpl.js on lines 4999..5006
dist/csp.tmpl.js on lines 5008..5015
dist/csp.tmpl.js on lines 5050..5057
dist/csp.tmpl.js on lines 5141..5148
dist/csp.tmpl.js on lines 5166..5173
dist/csp.tmpl.js on lines 5175..5182
dist/csp.tmpl.js on lines 5184..5191
dist/csp.tmpl.js on lines 5193..5200
dist/csp.tmpl.js on lines 5214..5221
dist/csp.tmpl.js on lines 5239..5246
dist/csp.tmpl.js on lines 5320..5327
dist/csp.tmpl.js on lines 5329..5336
dist/csp.tmpl.js on lines 5338..5345
dist/csp.tmpl.js on lines 5347..5354
dist/csp.tmpl.js on lines 5356..5363
dist/csp.tmpl.js on lines 5410..5417
dist/csp.tmpl.js on lines 5428..5435
dist/csp.tmpl.js on lines 5437..5444
dist/csp.tmpl.js on lines 5446..5453
dist/csp.tmpl.js on lines 6325..6332
dist/csp.tmpl.js on lines 6334..6341
dist/csp.tmpl.js on lines 6343..6350
dist/csp.tmpl.js on lines 6370..6377

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

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

    var DoWhileStatement = (function () {
        function DoWhileStatement(body, test) {
            this.type = syntax_1.Syntax.DoWhileStatement;
            this.body = body;
            this.test = test;
Severity: Major
Found in dist/csp.tmpl.js and 26 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4882..4889
dist/csp.tmpl.js on lines 4918..4925
dist/csp.tmpl.js on lines 4927..4934
dist/csp.tmpl.js on lines 4999..5006
dist/csp.tmpl.js on lines 5050..5057
dist/csp.tmpl.js on lines 5141..5148
dist/csp.tmpl.js on lines 5166..5173
dist/csp.tmpl.js on lines 5175..5182
dist/csp.tmpl.js on lines 5184..5191
dist/csp.tmpl.js on lines 5193..5200
dist/csp.tmpl.js on lines 5214..5221
dist/csp.tmpl.js on lines 5239..5246
dist/csp.tmpl.js on lines 5320..5327
dist/csp.tmpl.js on lines 5329..5336
dist/csp.tmpl.js on lines 5338..5345
dist/csp.tmpl.js on lines 5347..5354
dist/csp.tmpl.js on lines 5356..5363
dist/csp.tmpl.js on lines 5410..5417
dist/csp.tmpl.js on lines 5419..5426
dist/csp.tmpl.js on lines 5428..5435
dist/csp.tmpl.js on lines 5437..5444
dist/csp.tmpl.js on lines 5446..5453
dist/csp.tmpl.js on lines 6325..6332
dist/csp.tmpl.js on lines 6334..6341
dist/csp.tmpl.js on lines 6343..6350
dist/csp.tmpl.js on lines 6370..6377

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

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

    var SwitchStatement = (function () {
        function SwitchStatement(discriminant, cases) {
            this.type = syntax_1.Syntax.SwitchStatement;
            this.discriminant = discriminant;
            this.cases = cases;
Severity: Major
Found in dist/csp.tmpl.js and 26 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4882..4889
dist/csp.tmpl.js on lines 4918..4925
dist/csp.tmpl.js on lines 4927..4934
dist/csp.tmpl.js on lines 4999..5006
dist/csp.tmpl.js on lines 5008..5015
dist/csp.tmpl.js on lines 5050..5057
dist/csp.tmpl.js on lines 5141..5148
dist/csp.tmpl.js on lines 5166..5173
dist/csp.tmpl.js on lines 5175..5182
dist/csp.tmpl.js on lines 5184..5191
dist/csp.tmpl.js on lines 5193..5200
dist/csp.tmpl.js on lines 5214..5221
dist/csp.tmpl.js on lines 5239..5246
dist/csp.tmpl.js on lines 5320..5327
dist/csp.tmpl.js on lines 5338..5345
dist/csp.tmpl.js on lines 5347..5354
dist/csp.tmpl.js on lines 5356..5363
dist/csp.tmpl.js on lines 5410..5417
dist/csp.tmpl.js on lines 5419..5426
dist/csp.tmpl.js on lines 5428..5435
dist/csp.tmpl.js on lines 5437..5444
dist/csp.tmpl.js on lines 5446..5453
dist/csp.tmpl.js on lines 6325..6332
dist/csp.tmpl.js on lines 6334..6341
dist/csp.tmpl.js on lines 6343..6350
dist/csp.tmpl.js on lines 6370..6377

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

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

    var JSXMemberExpression = (function () {
        function JSXMemberExpression(object, property) {
            this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression;
            this.object = object;
            this.property = property;
Severity: Major
Found in dist/csp.tmpl.js and 26 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4882..4889
dist/csp.tmpl.js on lines 4918..4925
dist/csp.tmpl.js on lines 4927..4934
dist/csp.tmpl.js on lines 4999..5006
dist/csp.tmpl.js on lines 5008..5015
dist/csp.tmpl.js on lines 5050..5057
dist/csp.tmpl.js on lines 5141..5148
dist/csp.tmpl.js on lines 5166..5173
dist/csp.tmpl.js on lines 5175..5182
dist/csp.tmpl.js on lines 5184..5191
dist/csp.tmpl.js on lines 5193..5200
dist/csp.tmpl.js on lines 5214..5221
dist/csp.tmpl.js on lines 5239..5246
dist/csp.tmpl.js on lines 5320..5327
dist/csp.tmpl.js on lines 5329..5336
dist/csp.tmpl.js on lines 5338..5345
dist/csp.tmpl.js on lines 5347..5354
dist/csp.tmpl.js on lines 5356..5363
dist/csp.tmpl.js on lines 5410..5417
dist/csp.tmpl.js on lines 5419..5426
dist/csp.tmpl.js on lines 5428..5435
dist/csp.tmpl.js on lines 5437..5444
dist/csp.tmpl.js on lines 5446..5453
dist/csp.tmpl.js on lines 6334..6341
dist/csp.tmpl.js on lines 6343..6350
dist/csp.tmpl.js on lines 6370..6377

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

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

    var Directive = (function () {
        function Directive(expression, directive) {
            this.type = syntax_1.Syntax.ExpressionStatement;
            this.expression = expression;
            this.directive = directive;
Severity: Major
Found in dist/csp.tmpl.js and 26 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4882..4889
dist/csp.tmpl.js on lines 4918..4925
dist/csp.tmpl.js on lines 4927..4934
dist/csp.tmpl.js on lines 5008..5015
dist/csp.tmpl.js on lines 5050..5057
dist/csp.tmpl.js on lines 5141..5148
dist/csp.tmpl.js on lines 5166..5173
dist/csp.tmpl.js on lines 5175..5182
dist/csp.tmpl.js on lines 5184..5191
dist/csp.tmpl.js on lines 5193..5200
dist/csp.tmpl.js on lines 5214..5221
dist/csp.tmpl.js on lines 5239..5246
dist/csp.tmpl.js on lines 5320..5327
dist/csp.tmpl.js on lines 5329..5336
dist/csp.tmpl.js on lines 5338..5345
dist/csp.tmpl.js on lines 5347..5354
dist/csp.tmpl.js on lines 5356..5363
dist/csp.tmpl.js on lines 5410..5417
dist/csp.tmpl.js on lines 5419..5426
dist/csp.tmpl.js on lines 5428..5435
dist/csp.tmpl.js on lines 5437..5444
dist/csp.tmpl.js on lines 5446..5453
dist/csp.tmpl.js on lines 6325..6332
dist/csp.tmpl.js on lines 6334..6341
dist/csp.tmpl.js on lines 6343..6350
dist/csp.tmpl.js on lines 6370..6377

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

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

    var CallExpression = (function () {
        function CallExpression(callee, args) {
            this.type = syntax_1.Syntax.CallExpression;
            this.callee = callee;
            this.arguments = args;
Severity: Major
Found in dist/csp.tmpl.js and 26 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4882..4889
dist/csp.tmpl.js on lines 4927..4934
dist/csp.tmpl.js on lines 4999..5006
dist/csp.tmpl.js on lines 5008..5015
dist/csp.tmpl.js on lines 5050..5057
dist/csp.tmpl.js on lines 5141..5148
dist/csp.tmpl.js on lines 5166..5173
dist/csp.tmpl.js on lines 5175..5182
dist/csp.tmpl.js on lines 5184..5191
dist/csp.tmpl.js on lines 5193..5200
dist/csp.tmpl.js on lines 5214..5221
dist/csp.tmpl.js on lines 5239..5246
dist/csp.tmpl.js on lines 5320..5327
dist/csp.tmpl.js on lines 5329..5336
dist/csp.tmpl.js on lines 5338..5345
dist/csp.tmpl.js on lines 5347..5354
dist/csp.tmpl.js on lines 5356..5363
dist/csp.tmpl.js on lines 5410..5417
dist/csp.tmpl.js on lines 5419..5426
dist/csp.tmpl.js on lines 5428..5435
dist/csp.tmpl.js on lines 5437..5444
dist/csp.tmpl.js on lines 5446..5453
dist/csp.tmpl.js on lines 6325..6332
dist/csp.tmpl.js on lines 6334..6341
dist/csp.tmpl.js on lines 6343..6350
dist/csp.tmpl.js on lines 6370..6377

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

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

    var TemplateLiteral = (function () {
        function TemplateLiteral(quasis, expressions) {
            this.type = syntax_1.Syntax.TemplateLiteral;
            this.quasis = quasis;
            this.expressions = expressions;
Severity: Major
Found in dist/csp.tmpl.js and 26 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4882..4889
dist/csp.tmpl.js on lines 4918..4925
dist/csp.tmpl.js on lines 4927..4934
dist/csp.tmpl.js on lines 4999..5006
dist/csp.tmpl.js on lines 5008..5015
dist/csp.tmpl.js on lines 5050..5057
dist/csp.tmpl.js on lines 5141..5148
dist/csp.tmpl.js on lines 5166..5173
dist/csp.tmpl.js on lines 5175..5182
dist/csp.tmpl.js on lines 5184..5191
dist/csp.tmpl.js on lines 5193..5200
dist/csp.tmpl.js on lines 5214..5221
dist/csp.tmpl.js on lines 5239..5246
dist/csp.tmpl.js on lines 5320..5327
dist/csp.tmpl.js on lines 5329..5336
dist/csp.tmpl.js on lines 5338..5345
dist/csp.tmpl.js on lines 5347..5354
dist/csp.tmpl.js on lines 5410..5417
dist/csp.tmpl.js on lines 5419..5426
dist/csp.tmpl.js on lines 5428..5435
dist/csp.tmpl.js on lines 5437..5444
dist/csp.tmpl.js on lines 5446..5453
dist/csp.tmpl.js on lines 6325..6332
dist/csp.tmpl.js on lines 6334..6341
dist/csp.tmpl.js on lines 6343..6350
dist/csp.tmpl.js on lines 6370..6377

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

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

    var WhileStatement = (function () {
        function WhileStatement(test, body) {
            this.type = syntax_1.Syntax.WhileStatement;
            this.test = test;
            this.body = body;
Severity: Major
Found in dist/csp.tmpl.js and 26 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4882..4889
dist/csp.tmpl.js on lines 4918..4925
dist/csp.tmpl.js on lines 4927..4934
dist/csp.tmpl.js on lines 4999..5006
dist/csp.tmpl.js on lines 5008..5015
dist/csp.tmpl.js on lines 5050..5057
dist/csp.tmpl.js on lines 5141..5148
dist/csp.tmpl.js on lines 5166..5173
dist/csp.tmpl.js on lines 5175..5182
dist/csp.tmpl.js on lines 5184..5191
dist/csp.tmpl.js on lines 5193..5200
dist/csp.tmpl.js on lines 5214..5221
dist/csp.tmpl.js on lines 5239..5246
dist/csp.tmpl.js on lines 5320..5327
dist/csp.tmpl.js on lines 5329..5336
dist/csp.tmpl.js on lines 5338..5345
dist/csp.tmpl.js on lines 5347..5354
dist/csp.tmpl.js on lines 5356..5363
dist/csp.tmpl.js on lines 5410..5417
dist/csp.tmpl.js on lines 5419..5426
dist/csp.tmpl.js on lines 5437..5444
dist/csp.tmpl.js on lines 5446..5453
dist/csp.tmpl.js on lines 6325..6332
dist/csp.tmpl.js on lines 6334..6341
dist/csp.tmpl.js on lines 6343..6350
dist/csp.tmpl.js on lines 6370..6377

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

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

    var YieldExpression = (function () {
        function YieldExpression(argument, delegate) {
            this.type = syntax_1.Syntax.YieldExpression;
            this.argument = argument;
            this.delegate = delegate;
Severity: Major
Found in dist/csp.tmpl.js and 26 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4882..4889
dist/csp.tmpl.js on lines 4918..4925
dist/csp.tmpl.js on lines 4927..4934
dist/csp.tmpl.js on lines 4999..5006
dist/csp.tmpl.js on lines 5008..5015
dist/csp.tmpl.js on lines 5050..5057
dist/csp.tmpl.js on lines 5141..5148
dist/csp.tmpl.js on lines 5166..5173
dist/csp.tmpl.js on lines 5175..5182
dist/csp.tmpl.js on lines 5184..5191
dist/csp.tmpl.js on lines 5193..5200
dist/csp.tmpl.js on lines 5214..5221
dist/csp.tmpl.js on lines 5239..5246
dist/csp.tmpl.js on lines 5320..5327
dist/csp.tmpl.js on lines 5329..5336
dist/csp.tmpl.js on lines 5338..5345
dist/csp.tmpl.js on lines 5347..5354
dist/csp.tmpl.js on lines 5356..5363
dist/csp.tmpl.js on lines 5410..5417
dist/csp.tmpl.js on lines 5419..5426
dist/csp.tmpl.js on lines 5428..5435
dist/csp.tmpl.js on lines 5437..5444
dist/csp.tmpl.js on lines 6325..6332
dist/csp.tmpl.js on lines 6334..6341
dist/csp.tmpl.js on lines 6343..6350
dist/csp.tmpl.js on lines 6370..6377

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

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

    var ExportSpecifier = (function () {
        function ExportSpecifier(local, exported) {
            this.type = syntax_1.Syntax.ExportSpecifier;
            this.exported = exported;
            this.local = local;
Severity: Major
Found in dist/csp.tmpl.js and 26 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4882..4889
dist/csp.tmpl.js on lines 4918..4925
dist/csp.tmpl.js on lines 4927..4934
dist/csp.tmpl.js on lines 4999..5006
dist/csp.tmpl.js on lines 5008..5015
dist/csp.tmpl.js on lines 5141..5148
dist/csp.tmpl.js on lines 5166..5173
dist/csp.tmpl.js on lines 5175..5182
dist/csp.tmpl.js on lines 5184..5191
dist/csp.tmpl.js on lines 5193..5200
dist/csp.tmpl.js on lines 5214..5221
dist/csp.tmpl.js on lines 5239..5246
dist/csp.tmpl.js on lines 5320..5327
dist/csp.tmpl.js on lines 5329..5336
dist/csp.tmpl.js on lines 5338..5345
dist/csp.tmpl.js on lines 5347..5354
dist/csp.tmpl.js on lines 5356..5363
dist/csp.tmpl.js on lines 5410..5417
dist/csp.tmpl.js on lines 5419..5426
dist/csp.tmpl.js on lines 5428..5435
dist/csp.tmpl.js on lines 5437..5444
dist/csp.tmpl.js on lines 5446..5453
dist/csp.tmpl.js on lines 6325..6332
dist/csp.tmpl.js on lines 6334..6341
dist/csp.tmpl.js on lines 6343..6350
dist/csp.tmpl.js on lines 6370..6377

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

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

    var LabeledStatement = (function () {
        function LabeledStatement(label, body) {
            this.type = syntax_1.Syntax.LabeledStatement;
            this.label = label;
            this.body = body;
Severity: Major
Found in dist/csp.tmpl.js and 26 other locations - About 1 hr to fix
dist/csp.tmpl.js on lines 4882..4889
dist/csp.tmpl.js on lines 4918..4925
dist/csp.tmpl.js on lines 4927..4934
dist/csp.tmpl.js on lines 4999..5006
dist/csp.tmpl.js on lines 5008..5015
dist/csp.tmpl.js on lines 5050..5057
dist/csp.tmpl.js on lines 5141..5148
dist/csp.tmpl.js on lines 5166..5173
dist/csp.tmpl.js on lines 5184..5191
dist/csp.tmpl.js on lines 5193..5200
dist/csp.tmpl.js on lines 5214..5221
dist/csp.tmpl.js on lines 5239..5246
dist/csp.tmpl.js on lines 5320..5327
dist/csp.tmpl.js on lines 5329..5336
dist/csp.tmpl.js on lines 5338..5345
dist/csp.tmpl.js on lines 5347..5354
dist/csp.tmpl.js on lines 5356..5363
dist/csp.tmpl.js on lines 5410..5417
dist/csp.tmpl.js on lines 5419..5426
dist/csp.tmpl.js on lines 5428..5435
dist/csp.tmpl.js on lines 5437..5444
dist/csp.tmpl.js on lines 5446..5453
dist/csp.tmpl.js on lines 6325..6332
dist/csp.tmpl.js on lines 6334..6341
dist/csp.tmpl.js on lines 6343..6350
dist/csp.tmpl.js on lines 6370..6377

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

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 (token.value === 'get' && lookaheadPropertyKey) {
                    kind = 'get';
                    computed = this.match('[');
                    key = this.parseObjectPropertyKey();
                    this.context.allowYield = false;
Severity: Major
Found in dist/csp.tmpl.js and 1 other location - About 1 hr to fix
dist/csp.tmpl.js on lines 1212..1268

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

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 (token.type === token_1.Token.Identifier && token.value === 'get' && lookaheadPropertyKey) {
                kind = 'get';
                computed = this.match('[');
                key = this.parseObjectPropertyKey();
                this.context.allowYield = false;
Severity: Major
Found in dist/csp.tmpl.js and 1 other location - About 1 hr to fix
dist/csp.tmpl.js on lines 3098..3110

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

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

        Parser.prototype.parseBinaryExpression = function () {
            var startToken = this.lookahead;
            var expr = this.inheritCoverGrammar(this.parseExponentiationExpression);
            var token = this.lookahead;
            var prec = this.binaryPrecedence(token);
Severity: Minor
Found in dist/csp.tmpl.js - About 1 hr to fix

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

                        if (!ch || !character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
                            switch (ch) {
                                case 'u':
                                case 'x':
                                    if (this.source[this.index] === '{') {
    Severity: Major
    Found in dist/csp.tmpl.js and 1 other location - About 1 hr to fix
    dist/csp.tmpl.js on lines 4477..4539

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

    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 (!character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
                            switch (ch) {
                                case 'n':
                                    cooked += '\n';
                                    break;
    Severity: Major
    Found in dist/csp.tmpl.js and 1 other location - About 1 hr to fix
    dist/csp.tmpl.js on lines 4368..4425

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

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

            Scanner.prototype.scanRegExpFlags = function () {
                var str = '';
                var flags = '';
                while (!this.eof()) {
                    var ch = this.source[this.index];
    Severity: Minor
    Found in dist/csp.tmpl.js - About 1 hr to fix

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

              Scanner.prototype.scanRegExpBody = function () {
                  var ch = this.source[this.index];
                  assert_1.assert(ch === '/', 'Regular expression literal must start with a slash');
                  var str = this.source[this.index++];
                  var classMarker = false;
      Severity: Minor
      Found in dist/csp.tmpl.js - About 1 hr to fix

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

                Parser.prototype.parseImportDefaultSpecifier = function () {
                    var node = this.createNode();
                    var local = this.parseIdentifierName();
                    return this.finalize(node, new Node.ImportDefaultSpecifier(local));
                };
        Severity: Major
        Found in dist/csp.tmpl.js and 1 other location - About 1 hr to fix
        dist/csp.tmpl.js on lines 3164..3168

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

        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