thi-ng/umbrella

View on GitHub

Showing 261 of 1,767 total issues

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

export const IVEC2: JSBuiltinsIntVec = {
    ...VEC2(POOL_IVEC2),
    add: (a, b) => addI2(next(), a, b),
    addvn: (a, b) => addNI2(next(), a, b),
    addnv: (a, b) => addNI2(next(), b, a),
Severity: Major
Found in packages/shader-ast-js/src/env/ivec2.ts and 5 other locations - About 2 days to fix
packages/shader-ast-js/src/env/ivec3.ts on lines 19..44
packages/shader-ast-js/src/env/ivec4.ts on lines 19..44
packages/shader-ast-js/src/env/uvec2.ts on lines 19..44
packages/shader-ast-js/src/env/uvec3.ts on lines 19..44
packages/shader-ast-js/src/env/uvec4.ts on lines 19..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 462.

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

export const UVEC3: JSBuiltinsIntVec = {
    ...VEC3(POOL_UVEC3),
    add: (a, b) => addU3(next(), a, b),
    addvn: (a, b) => addNU3(next(), a, b),
    addnv: (a, b) => addNU3(next(), b, a),
Severity: Major
Found in packages/shader-ast-js/src/env/uvec3.ts and 5 other locations - About 2 days to fix
packages/shader-ast-js/src/env/ivec2.ts on lines 19..44
packages/shader-ast-js/src/env/ivec3.ts on lines 19..44
packages/shader-ast-js/src/env/ivec4.ts on lines 19..44
packages/shader-ast-js/src/env/uvec2.ts on lines 19..44
packages/shader-ast-js/src/env/uvec4.ts on lines 19..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 462.

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

export const UVEC4: JSBuiltinsIntVec = {
    ...VEC4(POOL_UVEC4),
    add: (a, b) => addU4(next(), a, b),
    addvn: (a, b) => addNU4(next(), a, b),
    addnv: (a, b) => addNU4(next(), b, a),
Severity: Major
Found in packages/shader-ast-js/src/env/uvec4.ts and 5 other locations - About 2 days to fix
packages/shader-ast-js/src/env/ivec2.ts on lines 19..44
packages/shader-ast-js/src/env/ivec3.ts on lines 19..44
packages/shader-ast-js/src/env/ivec4.ts on lines 19..44
packages/shader-ast-js/src/env/uvec2.ts on lines 19..44
packages/shader-ast-js/src/env/uvec3.ts on lines 19..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 462.

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

export const UVEC2: JSBuiltinsIntVec = {
    ...VEC2(POOL_UVEC2),
    add: (a, b) => addU2(next(), a, b),
    addvn: (a, b) => addNU2(next(), a, b),
    addnv: (a, b) => addNU2(next(), b, a),
Severity: Major
Found in packages/shader-ast-js/src/env/uvec2.ts and 5 other locations - About 2 days to fix
packages/shader-ast-js/src/env/ivec2.ts on lines 19..44
packages/shader-ast-js/src/env/ivec3.ts on lines 19..44
packages/shader-ast-js/src/env/ivec4.ts on lines 19..44
packages/shader-ast-js/src/env/uvec3.ts on lines 19..44
packages/shader-ast-js/src/env/uvec4.ts on lines 19..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 462.

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

export const IVEC3: JSBuiltinsIntVec = {
    ...VEC3(POOL_IVEC3),
    add: (a, b) => addI3(next(), a, b),
    addvn: (a, b) => addNI3(next(), a, b),
    addnv: (a, b) => addNI3(next(), b, a),
Severity: Major
Found in packages/shader-ast-js/src/env/ivec3.ts and 5 other locations - About 2 days to fix
packages/shader-ast-js/src/env/ivec2.ts on lines 19..44
packages/shader-ast-js/src/env/ivec4.ts on lines 19..44
packages/shader-ast-js/src/env/uvec2.ts on lines 19..44
packages/shader-ast-js/src/env/uvec3.ts on lines 19..44
packages/shader-ast-js/src/env/uvec4.ts on lines 19..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 462.

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

export const IVEC4: JSBuiltinsIntVec = {
    ...VEC4(POOL_IVEC4),
    add: (a, b) => addI4(next(), a, b),
    addvn: (a, b) => addNI4(next(), a, b),
    addnv: (a, b) => addNI4(next(), b, a),
Severity: Major
Found in packages/shader-ast-js/src/env/ivec4.ts and 5 other locations - About 2 days to fix
packages/shader-ast-js/src/env/ivec2.ts on lines 19..44
packages/shader-ast-js/src/env/ivec3.ts on lines 19..44
packages/shader-ast-js/src/env/uvec2.ts on lines 19..44
packages/shader-ast-js/src/env/uvec3.ts on lines 19..44
packages/shader-ast-js/src/env/uvec4.ts on lines 19..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 462.

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 const MAXIMA4_DIAG: KernelFnSpec = {
    fn: (src) => {
        const {
            data: pix,
            stride: [stride, rowStride],
Severity: Major
Found in packages/pixel/src/convolve.ts and 1 other location - About 1 day to fix
packages/pixel/src/convolve.ts on lines 464..485

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

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 const MAXIMA4_CROSS: KernelFnSpec = {
    fn: (src) => {
        const {
            data: pix,
            stride: [stride, rowStride],
Severity: Major
Found in packages/pixel/src/convolve.ts and 1 other location - About 1 day to fix
packages/pixel/src/convolve.ts on lines 504..525

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

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 declare class HCY implements TypedColor<HCY> {
    buf: NumericArray;
    offset: number;
    stride: number;
    h: number;
Severity: Major
Found in packages/color/src/hcy/hcy.ts and 6 other locations - About 1 day to fix
packages/color/src/hsi/hsi.ts on lines 11..34
packages/color/src/hsl/hsl.ts on lines 12..35
packages/color/src/hsv/hsv.ts on lines 12..35
packages/color/src/lch/lch.ts on lines 12..35
packages/color/src/oklab/oklab.ts on lines 12..35
packages/color/src/oklch/oklch.ts on lines 10..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 254.

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 declare class HSI implements TypedColor<HSI> {
    buf: NumericArray;
    offset: number;
    stride: number;
    h: number;
Severity: Major
Found in packages/color/src/hsi/hsi.ts and 6 other locations - About 1 day to fix
packages/color/src/hcy/hcy.ts on lines 11..34
packages/color/src/hsl/hsl.ts on lines 12..35
packages/color/src/hsv/hsv.ts on lines 12..35
packages/color/src/lch/lch.ts on lines 12..35
packages/color/src/oklab/oklab.ts on lines 12..35
packages/color/src/oklch/oklch.ts on lines 10..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 254.

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 declare class Oklch implements TypedColor<Oklch> {
    buf: NumericArray;
    offset: number;
    stride: number;
    l: number;
Severity: Major
Found in packages/color/src/oklch/oklch.ts and 6 other locations - About 1 day to fix
packages/color/src/hcy/hcy.ts on lines 11..34
packages/color/src/hsi/hsi.ts on lines 11..34
packages/color/src/hsl/hsl.ts on lines 12..35
packages/color/src/hsv/hsv.ts on lines 12..35
packages/color/src/lch/lch.ts on lines 12..35
packages/color/src/oklab/oklab.ts on lines 12..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 254.

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 declare class HSV implements TypedColor<HSV> {
    buf: NumericArray;
    offset: number;
    stride: number;
    h: number;
Severity: Major
Found in packages/color/src/hsv/hsv.ts and 6 other locations - About 1 day to fix
packages/color/src/hcy/hcy.ts on lines 11..34
packages/color/src/hsi/hsi.ts on lines 11..34
packages/color/src/hsl/hsl.ts on lines 12..35
packages/color/src/lch/lch.ts on lines 12..35
packages/color/src/oklab/oklab.ts on lines 12..35
packages/color/src/oklch/oklch.ts on lines 10..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 254.

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 declare class HSL implements TypedColor<HSL> {
    buf: NumericArray;
    offset: number;
    stride: number;
    h: number;
Severity: Major
Found in packages/color/src/hsl/hsl.ts and 6 other locations - About 1 day to fix
packages/color/src/hcy/hcy.ts on lines 11..34
packages/color/src/hsi/hsi.ts on lines 11..34
packages/color/src/hsv/hsv.ts on lines 12..35
packages/color/src/lch/lch.ts on lines 12..35
packages/color/src/oklab/oklab.ts on lines 12..35
packages/color/src/oklch/oklch.ts on lines 10..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 254.

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 declare class Oklab implements TypedColor<Oklab> {
    buf: NumericArray;
    offset: number;
    stride: number;
    l: number;
Severity: Major
Found in packages/color/src/oklab/oklab.ts and 6 other locations - About 1 day to fix
packages/color/src/hcy/hcy.ts on lines 11..34
packages/color/src/hsi/hsi.ts on lines 11..34
packages/color/src/hsl/hsl.ts on lines 12..35
packages/color/src/hsv/hsv.ts on lines 12..35
packages/color/src/lch/lch.ts on lines 12..35
packages/color/src/oklch/oklch.ts on lines 10..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 254.

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 declare class LCH implements TypedColor<LCH> {
    buf: NumericArray;
    offset: number;
    stride: number;
    l: number;
Severity: Major
Found in packages/color/src/lch/lch.ts and 6 other locations - About 1 day to fix
packages/color/src/hcy/hcy.ts on lines 11..34
packages/color/src/hsi/hsi.ts on lines 11..34
packages/color/src/hsl/hsl.ts on lines 12..35
packages/color/src/hsv/hsv.ts on lines 12..35
packages/color/src/oklab/oklab.ts on lines 12..35
packages/color/src/oklch/oklch.ts on lines 10..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 254.

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

export declare class XYZD50 implements TypedColor<XYZD50> {
    buf: NumericArray;
    offset: number;
    stride: number;
    x: number;
Severity: Major
Found in packages/color/src/xyz/xyz50.ts and 7 other locations - About 1 day to fix
packages/color/src/lab/lab50.ts on lines 12..35
packages/color/src/lab/lab65.ts on lines 12..35
packages/color/src/rgb/rgb.ts on lines 19..42
packages/color/src/srgb/srgb.ts on lines 13..36
packages/color/src/xyy/xyy.ts on lines 10..33
packages/color/src/xyz/xyz65.ts on lines 14..37
packages/color/src/ycc/ycc.ts on lines 8..31

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

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

export declare class XYY implements TypedColor<XYY> {
    buf: NumericArray;
    offset: number;
    stride: number;
    x: number;
Severity: Major
Found in packages/color/src/xyy/xyy.ts and 7 other locations - About 1 day to fix
packages/color/src/lab/lab50.ts on lines 12..35
packages/color/src/lab/lab65.ts on lines 12..35
packages/color/src/rgb/rgb.ts on lines 19..42
packages/color/src/srgb/srgb.ts on lines 13..36
packages/color/src/xyz/xyz50.ts on lines 14..37
packages/color/src/xyz/xyz65.ts on lines 14..37
packages/color/src/ycc/ycc.ts on lines 8..31

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

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

export declare class XYZD65 implements TypedColor<XYZD65> {
    buf: NumericArray;
    offset: number;
    stride: number;
    x: number;
Severity: Major
Found in packages/color/src/xyz/xyz65.ts and 7 other locations - About 1 day to fix
packages/color/src/lab/lab50.ts on lines 12..35
packages/color/src/lab/lab65.ts on lines 12..35
packages/color/src/rgb/rgb.ts on lines 19..42
packages/color/src/srgb/srgb.ts on lines 13..36
packages/color/src/xyy/xyy.ts on lines 10..33
packages/color/src/xyz/xyz50.ts on lines 14..37
packages/color/src/ycc/ycc.ts on lines 8..31

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

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

export declare class RGB implements TypedColor<RGB> {
    buf: NumericArray;
    offset: number;
    stride: number;
    r: number;
Severity: Major
Found in packages/color/src/rgb/rgb.ts and 7 other locations - About 1 day to fix
packages/color/src/lab/lab50.ts on lines 12..35
packages/color/src/lab/lab65.ts on lines 12..35
packages/color/src/srgb/srgb.ts on lines 13..36
packages/color/src/xyy/xyy.ts on lines 10..33
packages/color/src/xyz/xyz50.ts on lines 14..37
packages/color/src/xyz/xyz65.ts on lines 14..37
packages/color/src/ycc/ycc.ts on lines 8..31

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

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

export declare class LabD65 implements TypedColor<LabD65> {
    buf: NumericArray;
    offset: number;
    stride: number;
    l: number;
Severity: Major
Found in packages/color/src/lab/lab65.ts and 7 other locations - About 1 day to fix
packages/color/src/lab/lab50.ts on lines 12..35
packages/color/src/rgb/rgb.ts on lines 19..42
packages/color/src/srgb/srgb.ts on lines 13..36
packages/color/src/xyy/xyy.ts on lines 10..33
packages/color/src/xyz/xyz50.ts on lines 14..37
packages/color/src/xyz/xyz65.ts on lines 14..37
packages/color/src/ycc/ycc.ts on lines 8..31

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

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