tom-weatherhead/thaw-grammar

View on GitHub

Showing 181 of 181 total issues

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

export function isOperatorUsage<T>(obj: unknown): obj is OperatorUsage<T> {
    const operatorUsage = obj as OperatorUsage<T>;

    return typeof operatorUsage !== 'undefined' && operatorUsage.typename === typenameOperatorUsage;
}
Severity: Major
Found in src/common/domain-object-model/operator-usage.ts and 10 other locations - About 2 hrs to fix
src/common/domain-object-model/begin-usage.ts on lines 9..13
src/common/domain-object-model/cond-usage.ts on lines 9..13
src/common/domain-object-model/function-definition.ts on lines 12..16
src/common/domain-object-model/if-usage.ts on lines 9..13
src/common/domain-object-model/let-star-usage.ts on lines 12..16
src/common/domain-object-model/let-usage.ts on lines 10..14
src/common/domain-object-model/set-usage.ts on lines 12..16
src/common/domain-object-model/variable.ts on lines 16..20
src/common/domain-object-model/while-usage.ts on lines 9..13
src/languages/scheme/domain-object-model/let-rec-usage.ts on lines 13..17

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

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

export function isFunctionDefinition<T>(obj: unknown): obj is FunctionDefinition<T> {
    const str = obj as FunctionDefinition<T>;

    return typeof str !== 'undefined' && str.typename === typenameFunctionDefinition;
}
Severity: Major
Found in src/common/domain-object-model/function-definition.ts and 10 other locations - About 2 hrs to fix
src/common/domain-object-model/begin-usage.ts on lines 9..13
src/common/domain-object-model/cond-usage.ts on lines 9..13
src/common/domain-object-model/if-usage.ts on lines 9..13
src/common/domain-object-model/let-star-usage.ts on lines 12..16
src/common/domain-object-model/let-usage.ts on lines 10..14
src/common/domain-object-model/operator-usage.ts on lines 12..16
src/common/domain-object-model/set-usage.ts on lines 12..16
src/common/domain-object-model/variable.ts on lines 16..20
src/common/domain-object-model/while-usage.ts on lines 9..13
src/languages/scheme/domain-object-model/let-rec-usage.ts on lines 13..17

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

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

export function isBeginUsage<T>(obj: unknown): obj is BeginUsage<T> {
    const beginUsage = obj as BeginUsage<T>;

    return typeof beginUsage !== 'undefined' && beginUsage.typename === typenameBeginUsage;
}
Severity: Major
Found in src/common/domain-object-model/begin-usage.ts and 10 other locations - About 2 hrs to fix
src/common/domain-object-model/cond-usage.ts on lines 9..13
src/common/domain-object-model/function-definition.ts on lines 12..16
src/common/domain-object-model/if-usage.ts on lines 9..13
src/common/domain-object-model/let-star-usage.ts on lines 12..16
src/common/domain-object-model/let-usage.ts on lines 10..14
src/common/domain-object-model/operator-usage.ts on lines 12..16
src/common/domain-object-model/set-usage.ts on lines 12..16
src/common/domain-object-model/variable.ts on lines 16..20
src/common/domain-object-model/while-usage.ts on lines 9..13
src/languages/scheme/domain-object-model/let-rec-usage.ts on lines 13..17

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

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

export function isIfUsage<T>(obj: unknown): obj is IfUsage<T> {
    const ifUsage = obj as IfUsage<T>;

    return typeof ifUsage !== 'undefined' && ifUsage.typename === typenameIfUsage;
}
Severity: Major
Found in src/common/domain-object-model/if-usage.ts and 10 other locations - About 2 hrs to fix
src/common/domain-object-model/begin-usage.ts on lines 9..13
src/common/domain-object-model/cond-usage.ts on lines 9..13
src/common/domain-object-model/function-definition.ts on lines 12..16
src/common/domain-object-model/let-star-usage.ts on lines 12..16
src/common/domain-object-model/let-usage.ts on lines 10..14
src/common/domain-object-model/operator-usage.ts on lines 12..16
src/common/domain-object-model/set-usage.ts on lines 12..16
src/common/domain-object-model/variable.ts on lines 16..20
src/common/domain-object-model/while-usage.ts on lines 9..13
src/languages/scheme/domain-object-model/let-rec-usage.ts on lines 13..17

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

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

export function isLetStarUsage<T>(obj: unknown): obj is LetStarUsage<T> {
    const letStarUsage = obj as LetStarUsage<T>;

    return typeof letStarUsage !== 'undefined' && letStarUsage.typename === typenameLetStarUsage;
}
Severity: Major
Found in src/common/domain-object-model/let-star-usage.ts and 10 other locations - About 2 hrs to fix
src/common/domain-object-model/begin-usage.ts on lines 9..13
src/common/domain-object-model/cond-usage.ts on lines 9..13
src/common/domain-object-model/function-definition.ts on lines 12..16
src/common/domain-object-model/if-usage.ts on lines 9..13
src/common/domain-object-model/let-usage.ts on lines 10..14
src/common/domain-object-model/operator-usage.ts on lines 12..16
src/common/domain-object-model/set-usage.ts on lines 12..16
src/common/domain-object-model/variable.ts on lines 16..20
src/common/domain-object-model/while-usage.ts on lines 9..13
src/languages/scheme/domain-object-model/let-rec-usage.ts on lines 13..17

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

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

export function isWhileUsage<T>(obj: unknown): obj is WhileUsage<T> {
    const whileUsage = obj as WhileUsage<T>;

    return typeof whileUsage !== 'undefined' && whileUsage.typename === typenameWhileUsage;
}
Severity: Major
Found in src/common/domain-object-model/while-usage.ts and 10 other locations - About 2 hrs to fix
src/common/domain-object-model/begin-usage.ts on lines 9..13
src/common/domain-object-model/cond-usage.ts on lines 9..13
src/common/domain-object-model/function-definition.ts on lines 12..16
src/common/domain-object-model/if-usage.ts on lines 9..13
src/common/domain-object-model/let-star-usage.ts on lines 12..16
src/common/domain-object-model/let-usage.ts on lines 10..14
src/common/domain-object-model/operator-usage.ts on lines 12..16
src/common/domain-object-model/set-usage.ts on lines 12..16
src/common/domain-object-model/variable.ts on lines 16..20
src/languages/scheme/domain-object-model/let-rec-usage.ts on lines 13..17

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

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

export function isSetUsage<T>(obj: unknown): obj is SetUsage<T> {
    const setUsage = obj as SetUsage<T>;

    return typeof setUsage !== 'undefined' && setUsage.typename === typenameSetUsage;
}
Severity: Major
Found in src/common/domain-object-model/set-usage.ts and 10 other locations - About 2 hrs to fix
src/common/domain-object-model/begin-usage.ts on lines 9..13
src/common/domain-object-model/cond-usage.ts on lines 9..13
src/common/domain-object-model/function-definition.ts on lines 12..16
src/common/domain-object-model/if-usage.ts on lines 9..13
src/common/domain-object-model/let-star-usage.ts on lines 12..16
src/common/domain-object-model/let-usage.ts on lines 10..14
src/common/domain-object-model/operator-usage.ts on lines 12..16
src/common/domain-object-model/variable.ts on lines 16..20
src/common/domain-object-model/while-usage.ts on lines 9..13
src/languages/scheme/domain-object-model/let-rec-usage.ts on lines 13..17

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

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

export function isCondUsage<T>(obj: unknown): obj is CondUsage<T> {
    const condUsage = obj as CondUsage<T>;

    return typeof condUsage !== 'undefined' && condUsage.typename === typenameCondUsage;
}
Severity: Major
Found in src/common/domain-object-model/cond-usage.ts and 10 other locations - About 2 hrs to fix
src/common/domain-object-model/begin-usage.ts on lines 9..13
src/common/domain-object-model/function-definition.ts on lines 12..16
src/common/domain-object-model/if-usage.ts on lines 9..13
src/common/domain-object-model/let-star-usage.ts on lines 12..16
src/common/domain-object-model/let-usage.ts on lines 10..14
src/common/domain-object-model/operator-usage.ts on lines 12..16
src/common/domain-object-model/set-usage.ts on lines 12..16
src/common/domain-object-model/variable.ts on lines 16..20
src/common/domain-object-model/while-usage.ts on lines 9..13
src/languages/scheme/domain-object-model/let-rec-usage.ts on lines 13..17

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

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

export function isLetRecUsage<T>(obj: unknown): obj is LetRecUsage<T> {
    const lru = obj as LetRecUsage<T>;

    return typeof lru !== 'undefined' && lru.typename === typenameLetRecUsage;
}
Severity: Major
Found in src/languages/scheme/domain-object-model/let-rec-usage.ts and 10 other locations - About 2 hrs to fix
src/common/domain-object-model/begin-usage.ts on lines 9..13
src/common/domain-object-model/cond-usage.ts on lines 9..13
src/common/domain-object-model/function-definition.ts on lines 12..16
src/common/domain-object-model/if-usage.ts on lines 9..13
src/common/domain-object-model/let-star-usage.ts on lines 12..16
src/common/domain-object-model/let-usage.ts on lines 10..14
src/common/domain-object-model/operator-usage.ts on lines 12..16
src/common/domain-object-model/set-usage.ts on lines 12..16
src/common/domain-object-model/variable.ts on lines 16..20
src/common/domain-object-model/while-usage.ts on lines 9..13

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

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

export function isVariableT<T>(obj: unknown): obj is Variable<T> {
    const otherVariable = obj as Variable<T>;

    return typeof otherVariable !== 'undefined' && otherVariable.typename === typenameVariableT;
}
Severity: Major
Found in src/common/domain-object-model/variable.ts and 10 other locations - About 2 hrs to fix
src/common/domain-object-model/begin-usage.ts on lines 9..13
src/common/domain-object-model/cond-usage.ts on lines 9..13
src/common/domain-object-model/function-definition.ts on lines 12..16
src/common/domain-object-model/if-usage.ts on lines 9..13
src/common/domain-object-model/let-star-usage.ts on lines 12..16
src/common/domain-object-model/let-usage.ts on lines 10..14
src/common/domain-object-model/operator-usage.ts on lines 12..16
src/common/domain-object-model/set-usage.ts on lines 12..16
src/common/domain-object-model/while-usage.ts on lines 9..13
src/languages/scheme/domain-object-model/let-rec-usage.ts on lines 13..17

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

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

export function isLetUsage<T>(obj: unknown): obj is LetUsage<T> {
    const letUsage = obj as LetUsage<T>;

    return typeof letUsage !== 'undefined' && letUsage.typename === typenameLetUsage;
}
Severity: Major
Found in src/common/domain-object-model/let-usage.ts and 10 other locations - About 2 hrs to fix
src/common/domain-object-model/begin-usage.ts on lines 9..13
src/common/domain-object-model/cond-usage.ts on lines 9..13
src/common/domain-object-model/function-definition.ts on lines 12..16
src/common/domain-object-model/if-usage.ts on lines 9..13
src/common/domain-object-model/let-star-usage.ts on lines 12..16
src/common/domain-object-model/operator-usage.ts on lines 12..16
src/common/domain-object-model/set-usage.ts on lines 12..16
src/common/domain-object-model/variable.ts on lines 16..20
src/common/domain-object-model/while-usage.ts on lines 9..13
src/languages/scheme/domain-object-model/let-rec-usage.ts on lines 13..17

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

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

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

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

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

Refactorings

Further Reading

File operator-usage.ts has 255 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// clu/domain-object-model/operator-usage.ts

// import { ArgumentException } from 'thaw-interpreter-core';

import {
Severity: Minor
Found in src/languages/clu/domain-object-model/operator-usage.ts - About 2 hrs to fix

    Function toStringHelper has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private toStringHelper(
            sb: string,
            offsetVector: number[],
            offset: number,
            firstSlice: boolean
    Severity: Major
    Found in src/languages/apl/domain-object-model/data-types/value.ts - About 2 hrs to fix

      Function evaluateAux has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected evaluateAux(
              evaluatedArguments: T[],
              globalInfo: IGlobalInfo<T>,
              localEnvironment?: IEnvironmentFrame<T>,
              options?: unknown
      Severity: Major
      Found in src/common/domain-object-model/operator-usage.ts - About 2 hrs to fix

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

        export function isCLUNormalFunctionDefinition(obj: unknown): obj is CLUNormalFunctionDefinition {
            const v = obj as CLUNormalFunctionDefinition;
        
            return (
                typeof v !== 'undefined' &&
        src/languages/clu/domain-object-model/constructor-definition.ts on lines 21..29
        src/languages/clu/domain-object-model/data-types/primitive-value.ts on lines 13..21
        src/languages/clu/domain-object-model/data-types/user-value.ts on lines 15..23
        src/languages/clu/domain-object-model/one-part-function-name.ts on lines 7..15
        src/languages/clu/domain-object-model/selector-definition.ts on lines 21..29
        src/languages/clu/domain-object-model/settor-definition.ts on lines 21..29
        src/languages/sasl/graph-reduction.ts on lines 60..68
        src/languages/smalltalk/domain-object-model/variable.ts on lines 18..26

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

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

        export function isCLUSettorDefinition(obj: unknown): obj is CLUSettorDefinition {
            const v = obj as CLUSettorDefinition;
        
            return (
                typeof v !== 'undefined' &&
        Severity: Major
        Found in src/languages/clu/domain-object-model/settor-definition.ts and 8 other locations - About 2 hrs to fix
        src/languages/clu/domain-object-model/constructor-definition.ts on lines 21..29
        src/languages/clu/domain-object-model/data-types/primitive-value.ts on lines 13..21
        src/languages/clu/domain-object-model/data-types/user-value.ts on lines 15..23
        src/languages/clu/domain-object-model/normal-function-definition.ts on lines 22..30
        src/languages/clu/domain-object-model/one-part-function-name.ts on lines 7..15
        src/languages/clu/domain-object-model/selector-definition.ts on lines 21..29
        src/languages/sasl/graph-reduction.ts on lines 60..68
        src/languages/smalltalk/domain-object-model/variable.ts on lines 18..26

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

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

        export function isOnePartFunctionName(obj: unknown): obj is OnePartFunctionName {
            const v = obj as OnePartFunctionName;
        
            return (
                typeof v !== 'undefined' &&
        src/languages/clu/domain-object-model/constructor-definition.ts on lines 21..29
        src/languages/clu/domain-object-model/data-types/primitive-value.ts on lines 13..21
        src/languages/clu/domain-object-model/data-types/user-value.ts on lines 15..23
        src/languages/clu/domain-object-model/normal-function-definition.ts on lines 22..30
        src/languages/clu/domain-object-model/selector-definition.ts on lines 21..29
        src/languages/clu/domain-object-model/settor-definition.ts on lines 21..29
        src/languages/sasl/graph-reduction.ts on lines 60..68
        src/languages/smalltalk/domain-object-model/variable.ts on lines 18..26

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

        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

        export function lcaHead(options: { l?: string; h?: string; t?: string } = {}): ILCExpression {
            const ll = v(options.l, 'l');
        
            return l(ll, lcaHeadUsage(ll, options));
        }
        Severity: Major
        Found in src/languages/lambda-calculus/operators.ts and 1 other location - About 2 hrs to fix
        src/languages/lambda-calculus/operators.ts on lines 469..473

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

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

        export function isCLUPrimitiveValue(obj: unknown): obj is CLUPrimitiveValue {
            const v = obj as CLUPrimitiveValue;
        
            return (
                typeof v !== 'undefined' &&
        src/languages/clu/domain-object-model/constructor-definition.ts on lines 21..29
        src/languages/clu/domain-object-model/data-types/user-value.ts on lines 15..23
        src/languages/clu/domain-object-model/normal-function-definition.ts on lines 22..30
        src/languages/clu/domain-object-model/one-part-function-name.ts on lines 7..15
        src/languages/clu/domain-object-model/selector-definition.ts on lines 21..29
        src/languages/clu/domain-object-model/settor-definition.ts on lines 21..29
        src/languages/sasl/graph-reduction.ts on lines 60..68
        src/languages/smalltalk/domain-object-model/variable.ts on lines 18..26

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

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

        export function isCLUSelectorDefinition(obj: unknown): obj is CLUSelectorDefinition {
            const v = obj as CLUSelectorDefinition;
        
            return (
                typeof v !== 'undefined' &&
        src/languages/clu/domain-object-model/constructor-definition.ts on lines 21..29
        src/languages/clu/domain-object-model/data-types/primitive-value.ts on lines 13..21
        src/languages/clu/domain-object-model/data-types/user-value.ts on lines 15..23
        src/languages/clu/domain-object-model/normal-function-definition.ts on lines 22..30
        src/languages/clu/domain-object-model/one-part-function-name.ts on lines 7..15
        src/languages/clu/domain-object-model/settor-definition.ts on lines 21..29
        src/languages/sasl/graph-reduction.ts on lines 60..68
        src/languages/smalltalk/domain-object-model/variable.ts on lines 18..26

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

        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