MichaReiser/speedy.js

View on GitHub

Showing 322 of 322 total issues

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

    static unsupportedImplicitCastOfConditionalResult(conditionalResult: ts.Expression, typeOfConditional: string, typeOfConditionResult: string) {
        return CodeGenerationDiagnostics.createException(
            conditionalResult,
            diagnostics.UnsupportedImplicitCastOfConditionalResult,
            typeOfConditionResult,
Severity: Major
Found in packages/compiler/src/code-generation-diagnostic.ts and 3 other locations - About 40 mins to fix
packages/compiler/src/code-generation-diagnostic.ts on lines 178..186
packages/compiler/src/code-generation-diagnostic.ts on lines 206..214
packages/compiler/src/code-generation-diagnostic.ts on lines 216..218

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

    static unsupportedImplicitCast(node: ts.Node, castTargetType: string, actualValueType: string) {
        return CodeGenerationDiagnostics.createException(node, diagnostics.UnsupportedImplicitCast, actualValueType, castTargetType, castTargetType);
    }
Severity: Major
Found in packages/compiler/src/code-generation-diagnostic.ts and 3 other locations - About 40 mins to fix
packages/compiler/src/code-generation-diagnostic.ts on lines 178..186
packages/compiler/src/code-generation-diagnostic.ts on lines 188..196
packages/compiler/src/code-generation-diagnostic.ts on lines 206..214

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

export function invoke(callee: FunctionPointer, args: llvm.Value[], returnType: llvm.Type, callerContext: CodeGenerationContext, options?: InvokeOptions) {
Severity: Minor
Found in packages/compiler/src/code-generation/util/functions.ts - About 35 mins to fix

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

    function assignFromConstantArray(arrayAllocation: llvm.AllocaInst,
                                     elements: llvm.Constant[],
                                     elementType: llvm.Type,
                                     context: CodeGenerationContext,
                                     name?: string) {
    Severity: Minor
    Found in packages/compiler/src/code-generation/util/llvm-array-helpers.ts - About 35 mins to fix

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

                          invoke_iiiii(index: number, a1: number, a2: number, a3: number, a4: number) {

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

        async function ifElseIfElse(condition: boolean, ifValue: number, elseIfCondition: boolean, elseIfValue: number, elseValue: number) {
        Severity: Minor
        Found in packages/compiler/__integrationtests__/if-statement.spec.ts - About 35 mins to fix

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

          export function createResolvedParameter(name: string,
                                                  type: ts.Type,
                                                  optional = false,
                                                  initializer?: ts.Expression,
                                                  variadic = false): ResolvedFunctionParameter {
          Severity: Minor
          Found in packages/compiler/src/code-generation/value/resolved-function.ts - About 35 mins to fix

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

            function makeSourceMap(sourceMapText, outputText, filePath, contents, loader) {
            Severity: Minor
            Found in packages/loader/index.js - About 35 mins to fix

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

                  visitReturnStatement(returnStatement: ts.ReturnStatement, context: TransformVisitorContext): ts.ReturnStatement {
                      return context.visitEachChild(returnStatement);
                  }
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 11..13
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 15..17
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 23..25
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 27..29
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 35..37
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 39..41
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 47..49
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 51..53
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 64..66

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

                  static unsupportedCast(node: ts.AsExpression, sourceType: string, targetType: string) {
                      return CodeGenerationDiagnostics.createException(node, diagnostics.UnsupportedCast, sourceType, targetType);
                  }
              Severity: Major
              Found in packages/compiler/src/code-generation-diagnostic.ts and 3 other locations - About 35 mins to fix
              packages/compiler/src/code-generation-diagnostic.ts on lines 73..75
              packages/compiler/src/code-generation-diagnostic.ts on lines 160..167
              packages/compiler/src/code-generation-diagnostic.ts on lines 169..176

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

                  visitParameter(parameter: ts.ParameterDeclaration, context: TransformVisitorContext): ts.ParameterDeclaration {
                      return context.visitEachChild(parameter);
                  }
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 11..13
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 15..17
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 23..25
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 35..37
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 39..41
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 47..49
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 51..53
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 60..62
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 64..66

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

                  visitCallExpression(callExpression: ts.CallExpression, context: TransformVisitorContext): ts.CallExpression {
                      return context.visitEachChild(callExpression);
                  }
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 11..13
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 15..17
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 23..25
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 27..29
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 35..37
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 39..41
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 47..49
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 51..53
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 60..62

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

                  visitExpressionStatement(expressionStatement: ts.ExpressionStatement, context: TransformVisitorContext): ts.ExpressionStatement {
                      return context.visitEachChild(expressionStatement);
                  }
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 11..13
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 15..17
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 23..25
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 27..29
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 35..37
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 47..49
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 51..53
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 60..62
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 64..66

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

                  static unsupportedImplicitCastOfBinaryExpressionOperands(binaryExpression: ts.BinaryExpression, leftOperandType: string, rightOperandType: string) {
                      return CodeGenerationDiagnostics.createException(
                          binaryExpression,
                          diagnostics.UnsupportedImplicitCastOfBinaryExpressionOperands,
                          leftOperandType,
              Severity: Major
              Found in packages/compiler/src/code-generation-diagnostic.ts and 3 other locations - About 35 mins to fix
              packages/compiler/src/code-generation-diagnostic.ts on lines 73..75
              packages/compiler/src/code-generation-diagnostic.ts on lines 156..158
              packages/compiler/src/code-generation-diagnostic.ts on lines 160..167

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 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 10 locations. Consider refactoring.
              Open

                  visitFunctionDeclaration(functionDeclaration: ts.FunctionDeclaration, context: TransformVisitorContext): ts.FunctionDeclaration {
                      return context.visitEachChild(functionDeclaration);
                  }
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 11..13
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 23..25
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 27..29
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 35..37
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 39..41
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 47..49
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 51..53
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 60..62
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 64..66

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

                  visitBinaryExpression(binaryExpression: ts.BinaryExpression, context: TransformVisitorContext): ts.BinaryExpression {
                      return context.visitEachChild(binaryExpression);
                  }
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 11..13
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 15..17
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 23..25
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 27..29
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 35..37
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 39..41
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 47..49
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 60..62
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 64..66

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

                  visitIfStatement(ifStatement: ts.IfStatement, context: TransformVisitorContext): ts.IfStatement {
                      return context.visitEachChild(ifStatement);
                  }
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 11..13
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 15..17
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 23..25
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 27..29
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 35..37
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 39..41
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 51..53
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 60..62
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 64..66

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

                  visitIdentifier(identifier: ts.Identifier, context: TransformVisitorContext): ts.Identifier {
                      return context.visitEachChild(identifier);
                  }
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 11..13
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 15..17
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 27..29
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 35..37
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 39..41
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 47..49
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 51..53
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 60..62
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 64..66

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

                  visitBlock(block: ts.Block, context: TransformVisitorContext): ts.Block {
                      return context.visitEachChild(block);
                  }
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 11..13
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 15..17
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 23..25
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 27..29
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 39..41
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 47..49
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 51..53
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 60..62
              packages/compiler/src/transform/log-unknown-transform-visitor.ts on lines 64..66

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

                  static builtInMethodNotSupported(propertyAccessExpression: ts.PropertyAccessExpression, objectName: string, methodName: string) {
                      return CodeGenerationDiagnostics.createException(propertyAccessExpression, diagnostics.BuiltInMethodNotSupported, methodName, objectName);
                  }
              Severity: Major
              Found in packages/compiler/src/code-generation-diagnostic.ts and 3 other locations - About 35 mins to fix
              packages/compiler/src/code-generation-diagnostic.ts on lines 156..158
              packages/compiler/src/code-generation-diagnostic.ts on lines 160..167
              packages/compiler/src/code-generation-diagnostic.ts on lines 169..176

              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

              Severity
              Category
              Status
              Source
              Language