LiberTEM/LiberTEM

View on GitHub

Showing 220 of 903 total issues

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

type DatasetParamsNPYForForm = Omit<DatasetParamsNPY,
    "type"
    | "path"
    | "nav_shape"
    | "sig_shape"> & {
Severity: Major
Found in client/src/dataset/components/NPYParamsForm.tsx and 12 other locations - About 35 mins to fix
client/src/dataset/components/BLOParamsForm.tsx on lines 12..19
client/src/dataset/components/DMParamsForm.tsx on lines 12..19
client/src/dataset/components/EMPADParamsForm.tsx on lines 12..19
client/src/dataset/components/FRMS6ParamsForm.tsx on lines 12..19
client/src/dataset/components/K2ISParamsForm.tsx on lines 12..19
client/src/dataset/components/MIBParamsForm.tsx on lines 12..19
client/src/dataset/components/MRCParamsForm.tsx on lines 11..18
client/src/dataset/components/RawCSRParamsForm.tsx on lines 11..18
client/src/dataset/components/RawFileParamsForm.tsx on lines 12..19
client/src/dataset/components/SEQParamsForm.tsx on lines 12..19
client/src/dataset/components/SERParamsForm.tsx on lines 11..18
client/src/dataset/components/TVIPSParamsForm.tsx on lines 12..19

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

type DatasetParamsK2ISForForm = Omit<DatasetParamsK2IS,
    "type"
    | "path"
    | "nav_shape"
    | "sig_shape"> & {
Severity: Major
Found in client/src/dataset/components/K2ISParamsForm.tsx and 12 other locations - About 35 mins to fix
client/src/dataset/components/BLOParamsForm.tsx on lines 12..19
client/src/dataset/components/DMParamsForm.tsx on lines 12..19
client/src/dataset/components/EMPADParamsForm.tsx on lines 12..19
client/src/dataset/components/FRMS6ParamsForm.tsx on lines 12..19
client/src/dataset/components/MIBParamsForm.tsx on lines 12..19
client/src/dataset/components/MRCParamsForm.tsx on lines 11..18
client/src/dataset/components/NPYParamsForm.tsx on lines 12..19
client/src/dataset/components/RawCSRParamsForm.tsx on lines 11..18
client/src/dataset/components/RawFileParamsForm.tsx on lines 12..19
client/src/dataset/components/SEQParamsForm.tsx on lines 12..19
client/src/dataset/components/SERParamsForm.tsx on lines 11..18
client/src/dataset/components/TVIPSParamsForm.tsx on lines 12..19

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

type DatasetParamsBLOForForm = Omit<DatasetParamsBLO,
    "type"
    | "path"
    | "nav_shape"
    | "sig_shape"> & {
Severity: Major
Found in client/src/dataset/components/BLOParamsForm.tsx and 12 other locations - About 35 mins to fix
client/src/dataset/components/DMParamsForm.tsx on lines 12..19
client/src/dataset/components/EMPADParamsForm.tsx on lines 12..19
client/src/dataset/components/FRMS6ParamsForm.tsx on lines 12..19
client/src/dataset/components/K2ISParamsForm.tsx on lines 12..19
client/src/dataset/components/MIBParamsForm.tsx on lines 12..19
client/src/dataset/components/MRCParamsForm.tsx on lines 11..18
client/src/dataset/components/NPYParamsForm.tsx on lines 12..19
client/src/dataset/components/RawCSRParamsForm.tsx on lines 11..18
client/src/dataset/components/RawFileParamsForm.tsx on lines 12..19
client/src/dataset/components/SEQParamsForm.tsx on lines 12..19
client/src/dataset/components/SERParamsForm.tsx on lines 11..18
client/src/dataset/components/TVIPSParamsForm.tsx on lines 12..19

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

type DatasetParamsMRCForForm = Omit<DatasetParamsMRC,
    "type"
    | "path"
    | "nav_shape"
    | "sig_shape"> & {
Severity: Major
Found in client/src/dataset/components/MRCParamsForm.tsx and 12 other locations - About 35 mins to fix
client/src/dataset/components/BLOParamsForm.tsx on lines 12..19
client/src/dataset/components/DMParamsForm.tsx on lines 12..19
client/src/dataset/components/EMPADParamsForm.tsx on lines 12..19
client/src/dataset/components/FRMS6ParamsForm.tsx on lines 12..19
client/src/dataset/components/K2ISParamsForm.tsx on lines 12..19
client/src/dataset/components/MIBParamsForm.tsx on lines 12..19
client/src/dataset/components/NPYParamsForm.tsx on lines 12..19
client/src/dataset/components/RawCSRParamsForm.tsx on lines 11..18
client/src/dataset/components/RawFileParamsForm.tsx on lines 12..19
client/src/dataset/components/SEQParamsForm.tsx on lines 12..19
client/src/dataset/components/SERParamsForm.tsx on lines 11..18
client/src/dataset/components/TVIPSParamsForm.tsx on lines 12..19

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

type DatasetParamsSEQForForm = Omit<DatasetParamsSEQ,
    "type"
    | "path"
    | "nav_shape"
    | "sig_shape"> & {
Severity: Major
Found in client/src/dataset/components/SEQParamsForm.tsx and 12 other locations - About 35 mins to fix
client/src/dataset/components/BLOParamsForm.tsx on lines 12..19
client/src/dataset/components/DMParamsForm.tsx on lines 12..19
client/src/dataset/components/EMPADParamsForm.tsx on lines 12..19
client/src/dataset/components/FRMS6ParamsForm.tsx on lines 12..19
client/src/dataset/components/K2ISParamsForm.tsx on lines 12..19
client/src/dataset/components/MIBParamsForm.tsx on lines 12..19
client/src/dataset/components/MRCParamsForm.tsx on lines 11..18
client/src/dataset/components/NPYParamsForm.tsx on lines 12..19
client/src/dataset/components/RawCSRParamsForm.tsx on lines 11..18
client/src/dataset/components/RawFileParamsForm.tsx on lines 12..19
client/src/dataset/components/SERParamsForm.tsx on lines 11..18
client/src/dataset/components/TVIPSParamsForm.tsx on lines 12..19

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

type DatasetParamsTVIPSForForm = Omit<DatasetParamsTVIPS,
    "type"
    | "path"
    | "nav_shape"
    | "sig_shape"> & {
Severity: Major
Found in client/src/dataset/components/TVIPSParamsForm.tsx and 12 other locations - About 35 mins to fix
client/src/dataset/components/BLOParamsForm.tsx on lines 12..19
client/src/dataset/components/DMParamsForm.tsx on lines 12..19
client/src/dataset/components/EMPADParamsForm.tsx on lines 12..19
client/src/dataset/components/FRMS6ParamsForm.tsx on lines 12..19
client/src/dataset/components/K2ISParamsForm.tsx on lines 12..19
client/src/dataset/components/MIBParamsForm.tsx on lines 12..19
client/src/dataset/components/MRCParamsForm.tsx on lines 11..18
client/src/dataset/components/NPYParamsForm.tsx on lines 12..19
client/src/dataset/components/RawCSRParamsForm.tsx on lines 11..18
client/src/dataset/components/RawFileParamsForm.tsx on lines 12..19
client/src/dataset/components/SEQParamsForm.tsx on lines 12..19
client/src/dataset/components/SERParamsForm.tsx on lines 11..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

type DatasetParamsFRMS6ForForm = Omit<DatasetParamsFRMS6,
    "type"
    | "path"
    | "nav_shape"
    | "sig_shape"> & {
Severity: Major
Found in client/src/dataset/components/FRMS6ParamsForm.tsx and 12 other locations - About 35 mins to fix
client/src/dataset/components/BLOParamsForm.tsx on lines 12..19
client/src/dataset/components/DMParamsForm.tsx on lines 12..19
client/src/dataset/components/EMPADParamsForm.tsx on lines 12..19
client/src/dataset/components/K2ISParamsForm.tsx on lines 12..19
client/src/dataset/components/MIBParamsForm.tsx on lines 12..19
client/src/dataset/components/MRCParamsForm.tsx on lines 11..18
client/src/dataset/components/NPYParamsForm.tsx on lines 12..19
client/src/dataset/components/RawCSRParamsForm.tsx on lines 11..18
client/src/dataset/components/RawFileParamsForm.tsx on lines 12..19
client/src/dataset/components/SEQParamsForm.tsx on lines 12..19
client/src/dataset/components/SERParamsForm.tsx on lines 11..18
client/src/dataset/components/TVIPSParamsForm.tsx on lines 12..19

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

    const localSettings: LocalConfig = {
        cwd: config.cwd,
        lastOpened: config.lastOpened,
        fileHistory: config.fileHistory,
        lastConnection: config.lastConnection,
Severity: Minor
Found in client/src/config/helpers.ts and 1 other location - About 35 mins to fix
client/src/compoundAnalysis/components/Download.tsx on lines 109..115

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

            setNotebook({
                dependency: CurrentNotebook.dependency,
                initial_setup: CurrentNotebook.initial_setup,
                ctx: CurrentNotebook.ctx,
                dataset: CurrentNotebook.dataset,
Severity: Minor
Found in client/src/compoundAnalysis/components/Download.tsx and 1 other location - About 35 mins to fix
client/src/config/helpers.ts on lines 25..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 47.

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

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

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

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

Refactorings

Further Reading

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

                         * np.cos(2. * np.pi * y / sampling * np.cos(f_angle)
                                  + 2. * np.pi * x / sampling * np.sin(f_angle)
Severity: Minor
Found in src/libertem/utils/generate.py and 1 other location - About 35 mins to fix
src/libertem/utils/generate.py on lines 103..103

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

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

const clusterTypeOptions = clusterTypeKeys.map(t => ({
    text: ClusterTypeMetadata[ClusterTypes[t]].label,
    value: ClusterTypes[t],
}));
Severity: Minor
Found in client/src/cluster/components/ClusterConnectionForm.tsx and 1 other location - About 35 mins to fix
client/src/compoundAnalysis/components/CenterOfMassAnalysis.tsx on lines 37..40

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

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

const maskShapeOptions = maskShapeKeys.map(t => ({
    text: MaskShapeMetadata[CoMMaskShapes[t]].label,
    value: CoMMaskShapes[t],
}));
Severity: Minor
Found in client/src/compoundAnalysis/components/CenterOfMassAnalysis.tsx and 1 other location - About 35 mins to fix
client/src/cluster/components/ClusterConnectionForm.tsx on lines 26..29

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

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 interface StatResponseError {
    status: "error",
    path: string,
    code: string,
    msg: string,
Severity: Minor
Found in client/src/messages.ts and 1 other location - About 35 mins to fix
client/src/messages.ts on lines 709..715

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

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 interface DirectoryListingResponseError {
    status: "error",
    path: string,
    code: string,
    msg: string,
Severity: Minor
Found in client/src/messages.ts and 1 other location - About 35 mins to fix
client/src/messages.ts on lines 735..741

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

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 interface RectRoiParams {
    shape: "rect",
    x: number,
    y: number,
    width: number,
Severity: Minor
Found in client/src/messages.ts and 1 other location - About 35 mins to fix
client/src/messages.ts on lines 413..419

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

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

        case analysisActions.ActionTypes.UPDATED: {
            return updateById(state, action.payload.id, {
                details: action.payload.details,
            });
        }
Severity: Minor
Found in client/src/analysis/reducers.ts and 1 other location - About 35 mins to fix
client/src/job/reducers.ts on lines 42..50

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

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

        case channelActions.ActionTypes.TASK_RESULT: {
            return updateById(
                state,
                action.payload.job,
                {
Severity: Minor
Found in client/src/job/reducers.ts and 1 other location - About 35 mins to fix
client/src/analysis/reducers.ts on lines 24..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 46.

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 interface MaskDefRing {
    shape: "ring",
    cx: number,
    cy: number,
    ri: number,
Severity: Minor
Found in client/src/messages.ts and 1 other location - About 35 mins to fix
client/src/messages.ts on lines 482..488

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

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

   const onPartChange = (e: React.ChangeEvent<HTMLInputElement>) => {
      tupleInputChangeHandle(tupleKey, e.target.value);
   }
Severity: Minor
Found in client/src/dataset/components/TupleInputPart.tsx and 1 other location - About 30 mins to fix
client/src/dataset/components/TupleInputPart.tsx on lines 20..22

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

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

   const handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {
       onBlur(tupleKey, e.target.value);
   }
Severity: Minor
Found in client/src/dataset/components/TupleInputPart.tsx and 1 other location - About 30 mins to fix
client/src/dataset/components/TupleInputPart.tsx on lines 16..18

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

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