Angular-RU/angular-ru-sdk

View on GitHub

Showing 235 of 347 total issues

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

export class FlexEndDirective extends AbstractFlexLayoutDirective implements AfterViewInit {
    constructor(protected readonly elementRef: ElementRef) {
        super();
    }

Severity: Major
Found in libs/cdk/flex-layout/src/directives/flex-end.directive.ts and 6 other locations - About 2 hrs to fix
libs/cdk/flex-layout/src/directives/flex-full-width.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-inline.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-justify-normal.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-none.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-space-between.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-start.directive.ts on lines 6..14

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

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

export class FlexNoneDirective extends AbstractFlexLayoutDirective implements AfterViewInit {
    constructor(protected readonly elementRef: ElementRef) {
        super();
    }

Severity: Major
Found in libs/cdk/flex-layout/src/directives/flex-none.directive.ts and 6 other locations - About 2 hrs to fix
libs/cdk/flex-layout/src/directives/flex-end.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-full-width.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-inline.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-justify-normal.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-space-between.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-start.directive.ts on lines 6..14

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

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

export class FlexStartDirective extends AbstractFlexLayoutDirective implements AfterViewInit {
    constructor(protected readonly elementRef: ElementRef) {
        super();
    }

Severity: Major
Found in libs/cdk/flex-layout/src/directives/flex-start.directive.ts and 6 other locations - About 2 hrs to fix
libs/cdk/flex-layout/src/directives/flex-end.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-full-width.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-inline.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-justify-normal.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-none.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-space-between.directive.ts on lines 6..14

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

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

export class FlexFullWidthDirective extends AbstractFlexLayoutDirective implements AfterViewInit {
    constructor(protected readonly elementRef: ElementRef) {
        super();
    }

libs/cdk/flex-layout/src/directives/flex-end.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-inline.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-justify-normal.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-none.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-space-between.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-start.directive.ts on lines 6..14

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

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

export class FlexInlineDirective extends AbstractFlexLayoutDirective implements AfterViewInit {
    constructor(protected readonly elementRef: ElementRef) {
        super();
    }

libs/cdk/flex-layout/src/directives/flex-end.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-full-width.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-justify-normal.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-none.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-space-between.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-start.directive.ts on lines 6..14

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

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

export class FlexSpaceBetweenDirective extends AbstractFlexLayoutDirective implements AfterViewInit {
    constructor(protected readonly elementRef: ElementRef) {
        super();
    }

libs/cdk/flex-layout/src/directives/flex-end.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-full-width.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-inline.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-justify-normal.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-none.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-start.directive.ts on lines 6..14

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

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

export class FlexJustifyNormalDirective extends AbstractFlexLayoutDirective implements AfterViewInit {
    constructor(protected readonly elementRef: ElementRef) {
        super();
    }

libs/cdk/flex-layout/src/directives/flex-end.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-full-width.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-inline.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-none.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-space-between.directive.ts on lines 6..14
libs/cdk/flex-layout/src/directives/flex-start.directive.ts on lines 6..14

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

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 takeSecondItem<ArrayType extends Nullable<unknown[]>>(array?: ArrayType): TupleItem<ArrayType, 1> {
    return (Array.isArray(array) ? array[1] : undefined) as TupleItem<ArrayType, 1>;
}
Severity: Major
Found in libs/cdk/array/src/take-second-item.ts and 1 other location - About 2 hrs to fix
libs/cdk/array/src/take-first-item.ts on lines 3..5

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

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

function replaceSingle(value: string, unitsMap: UnitsMap): string {
    const pattern: RegExp = getSingleUnitPattern(unitsMap);

    let text: string = value;

Severity: Major
Found in libs/cdk/utils/src/replace-units/replace-units.ts and 1 other location - About 2 hrs to fix
libs/cdk/utils/src/replace-units/replace-units.ts on lines 23..33

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

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 takeFirstItem<ArrayType extends Nullable<unknown[]>>(array?: ArrayType): TupleItem<ArrayType, 0> {
    return (Array.isArray(array) ? array[0] : undefined) as TupleItem<ArrayType, 0>;
}
Severity: Major
Found in libs/cdk/array/src/take-first-item.ts and 1 other location - About 2 hrs to fix
libs/cdk/array/src/take-second-item.ts on lines 3..5

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

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

function replaceMultiple(value: string, unitsMap: UnitsMap): string {
    const pattern: RegExp = getMultipleUnitsPattern(unitsMap);

    let text: string = value;

Severity: Major
Found in libs/cdk/utils/src/replace-units/replace-units.ts and 1 other location - About 2 hrs to fix
libs/cdk/utils/src/replace-units/replace-units.ts on lines 35..45

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

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

    public licences: PlainObject[] = [
        {
            id: 1,
            name: 'single',
            price: 29.3
apps/virtual-table-demo/src/samples/sample-thirteen/sample-thirteen.component.ts on lines 16..37
apps/virtual-table-demo/src/samples/sample-twelve/sample-twelve.component.ts on lines 23..44

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

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

    public data: PlainObject[] = [
        {
            id: 1,
            name: 'single',
            price: 29.3
apps/virtual-table-demo/src/samples/sample-eleven/sample-eleven.component.ts on lines 46..67
apps/virtual-table-demo/src/samples/sample-twelve/sample-twelve.component.ts on lines 23..44

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

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

    public licences: PlainObject[] = [
        {
            id: 1,
            name: 'single',
            price: 29.3
apps/virtual-table-demo/src/samples/sample-eleven/sample-eleven.component.ts on lines 46..67
apps/virtual-table-demo/src/samples/sample-thirteen/sample-thirteen.component.ts on lines 16..37

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

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

    public labelColors: PlainObjectOf<string> = {
        [LoggerLevel.TRACE]: COLORS.TRACE,
        [LoggerLevel.DEBUG]: COLORS.DEBUG,
        [LoggerLevel.INFO]: COLORS.INFO,
        [LoggerLevel.WARN]: COLORS.WARN,
Severity: Major
Found in libs/cdk/logger/src/logger.options.ts and 1 other location - About 2 hrs to fix
libs/cdk/logger/src/logger.options.ts on lines 22..28

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

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

    public labelNames: PlainObjectOf<string> = {
        [LoggerLevel.TRACE]: LABELS.TRACE,
        [LoggerLevel.DEBUG]: LABELS.DEBUG,
        [LoggerLevel.INFO]: LABELS.INFO,
        [LoggerLevel.WARN]: LABELS.WARN,
Severity: Major
Found in libs/cdk/logger/src/logger.options.ts and 1 other location - About 2 hrs to fix
libs/cdk/logger/src/logger.options.ts on lines 14..20

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

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

    public static floor(inputA: number | string): any {
        const a: string = BigDecimal.validate(inputA);

        if (a.indexOf('.') === -1) {
            return a;
Severity: Major
Found in libs/cdk/big-decimal/src/js-big-decimal/big-decimal.ts and 1 other location - About 2 hrs to fix
libs/cdk/big-decimal/src/js-big-decimal/big-decimal.ts on lines 27..35

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

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

    public static ceil(inputNum: number | string): any {
        const num: string = BigDecimal.validate(inputNum);

        if (num.indexOf('.') === -1) {
            return num;
Severity: Major
Found in libs/cdk/big-decimal/src/js-big-decimal/big-decimal.ts and 1 other location - About 2 hrs to fix
libs/cdk/big-decimal/src/js-big-decimal/big-decimal.ts on lines 93..101

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

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

        this.logger.group('Show trace in opened group', ({ trace }: LoggerService): void => {
            for (let i: number = 0; i < 20; i++) {
                trace(this.traceIsWork, i);
            }
        });
Severity: Major
Found in apps/logger-demo/src/app.component.ts and 1 other location - About 2 hrs to fix
apps/logger-demo/src/app.component.ts on lines 69..74

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

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

    public rowDblClick(event: TableEvent<PlainObject, string>): void {
        const space: number = 4;

        this.toast.success(JSON.stringify(event, null, space), 'DblClick', { timeOut: 2000, onActivateTick: true });
    }
apps/virtual-table-demo/src/samples/sample-thirteen/sample-thirteen.component.ts on lines 49..53

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

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