appbaseio/dejaVu

View on GitHub

Showing 201 of 201 total issues

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

const setArrayFields = (
    nestedColumns,
    nestedVisibleColumns,
    nestedMappings,
    appName,
Severity: Major
Found in packages/browser/src/actions/mappings.js and 2 other locations - About 45 mins to fix
packages/browser/src/actions/cell.js on lines 15..22
packages/browser/src/actions/mappings.js on lines 48..55

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

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

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

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

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

Refactorings

Further Reading

Function flatten has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

export const flatten = data => {
    const result = {};

    function recurse(cur, prop = '') {
        if (Object(cur) !== cur) {
Severity: Minor
Found in packages/browser/src/utils/exportData.js - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

const setCellValueRequest = (id, property, value, index, esType) => ({
    type: CELL.CELL_SETVALUE_REQUEST,
    id,
    property,
    value,
Severity: Major
Found in packages/browser/src/actions/cell.js and 2 other locations - About 45 mins to fix
packages/browser/src/actions/mappings.js on lines 48..55
packages/browser/src/actions/mappings.js on lines 75..88

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

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

                        <Popover
                            content={
                                <div css={popoverContent}>
                                    <JsonView json={data} />
                                </div>
Severity: Minor
Found in packages/browser/src/components/Cell/ArrayCell.js and 1 other location - About 45 mins to fix
packages/browser/src/components/MappingsDropdown/MappingsDropdown.js on lines 16..25

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

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

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

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

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

Refactorings

Further Reading

Function getURL has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

export const getURL = () => {
    let url = localStorage.getItem('url') || sessionStorage.getItem('url');
    const params = new URLSearchParams(window.location.search);
    if (!url || url === 'undefined') {
        url = params.has('url') ? params.get('url') : 'null';
Severity: Minor
Found in packages/browser/src/constants/config.js - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function render has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    render() {
        const {
            mappings,
            appname,
            sortField,
Severity: Minor
Found in packages/browser/src/components/DataTable/ColumnHeader.js - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function render has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    render() {
        const {
            url: rawUrl,
            isLoading,
            mappings,
Severity: Minor
Found in packages/browser/src/components/DataBrowser/DataBrowser.js - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

const addMappingRequest = (indexName, typeName, field, mapping, version) => ({
    type: MAPPINGS.ADD_MAPPING_REQUEST,
    field,
    mapping,
    indexName,
Severity: Major
Found in packages/browser/src/actions/mappings.js and 2 other locations - About 45 mins to fix
packages/browser/src/actions/cell.js on lines 15..22
packages/browser/src/actions/mappings.js on lines 75..88

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

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

    <Popover
        content={
            <div css={popoverContent}>
                <JsonView json={mapping} />
            </div>
packages/browser/src/components/Cell/ArrayCell.js on lines 86..95

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

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

Consider simplifying this complex logical expression.
Open

            if (
                !addColumnError &&
                addColumnField &&
                selectedIndex &&
                selectedType &&
Severity: Major
Found in packages/browser/src/components/DataBrowser/AddFieldModal.js - About 40 mins to fix

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

                            <Button
                                key="csv"
                                type="primary"
                                onClick={this.onCSVClick}
                                disabled={isDownloading || isFetchingCount || error}
    Severity: Minor
    Found in packages/browser/src/components/DataBrowser/ExportData.js and 1 other location - About 40 mins to fix
    packages/browser/src/components/DataBrowser/ExportData.js on lines 348..355

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

                            <Button
                                key="json"
                                type="primary"
                                onClick={this.onJSONClick}
                                disabled={isDownloading || isFetchingCount || error}
    Severity: Minor
    Found in packages/browser/src/components/DataBrowser/ExportData.js and 1 other location - About 40 mins to fix
    packages/browser/src/components/DataBrowser/ExportData.js on lines 340..347

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

                const {
                    addColumnError,
                    addColumnField,
                    addColumnMapping,
                    selectedIndex,
    Severity: Major
    Found in packages/browser/src/components/DataBrowser/AddFieldModal.js and 6 other locations - About 35 mins to fix
    packages/browser/src/components/ConnectApp/ConnectApp.js on lines 447..455
    packages/browser/src/components/DataBrowser/AddRowModal.js on lines 134..142
    packages/browser/src/components/DataBrowser/DataBrowser.js on lines 75..83
    packages/browser/src/components/DataBrowser/UpdateRow.js on lines 81..89
    packages/browser/src/components/DataTable/DataGrid.js on lines 120..128
    packages/browser/src/components/DataTable/DataGrid.js on lines 170..178

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

            const {
                url: rawUrl,
                isLoading,
                mappings,
                isDataLoading,
    Severity: Major
    Found in packages/browser/src/components/DataBrowser/DataBrowser.js and 6 other locations - About 35 mins to fix
    packages/browser/src/components/ConnectApp/ConnectApp.js on lines 447..455
    packages/browser/src/components/DataBrowser/AddFieldModal.js on lines 125..133
    packages/browser/src/components/DataBrowser/AddRowModal.js on lines 134..142
    packages/browser/src/components/DataBrowser/UpdateRow.js on lines 81..89
    packages/browser/src/components/DataTable/DataGrid.js on lines 120..128
    packages/browser/src/components/DataTable/DataGrid.js on lines 170..178

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

            const {
                nestedVisibleColumns,
                visibleColumns,
                isShowingNestedColumns,
                onCellChange,
    Severity: Major
    Found in packages/browser/src/components/DataTable/DataGrid.js and 6 other locations - About 35 mins to fix
    packages/browser/src/components/ConnectApp/ConnectApp.js on lines 447..455
    packages/browser/src/components/DataBrowser/AddFieldModal.js on lines 125..133
    packages/browser/src/components/DataBrowser/AddRowModal.js on lines 134..142
    packages/browser/src/components/DataBrowser/DataBrowser.js on lines 75..83
    packages/browser/src/components/DataBrowser/UpdateRow.js on lines 81..89
    packages/browser/src/components/DataTable/DataGrid.js on lines 170..178

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

            const {
                appname,
                url,
                pastApps,
                isShowingAppSwitcher,
    Severity: Major
    Found in packages/browser/src/components/ConnectApp/ConnectApp.js and 6 other locations - About 35 mins to fix
    packages/browser/src/components/DataBrowser/AddFieldModal.js on lines 125..133
    packages/browser/src/components/DataBrowser/AddRowModal.js on lines 134..142
    packages/browser/src/components/DataBrowser/DataBrowser.js on lines 75..83
    packages/browser/src/components/DataBrowser/UpdateRow.js on lines 81..89
    packages/browser/src/components/DataTable/DataGrid.js on lines 120..128
    packages/browser/src/components/DataTable/DataGrid.js on lines 170..178

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

    const analyzer = (state = [], action) => {
        switch (action.type) {
            case ANALYZERS.SET_ANALYZERS:
                return action.analyzers;
            default:
    Severity: Minor
    Found in packages/browser/src/reducers/analyzers.js and 2 other locations - About 35 mins to fix
    packages/browser/src/reducers/currentIds.js on lines 3..10
    packages/browser/src/reducers/selectedRows.js on lines 3..10

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

                const {
                    appUrl,
                    setError: onSetError,
                    clearError: onClearError,
                    updateReactiveList: onUpdateReactiveList,
    Severity: Major
    Found in packages/browser/src/components/DataBrowser/UpdateRow.js and 6 other locations - About 35 mins to fix
    packages/browser/src/components/ConnectApp/ConnectApp.js on lines 447..455
    packages/browser/src/components/DataBrowser/AddFieldModal.js on lines 125..133
    packages/browser/src/components/DataBrowser/AddRowModal.js on lines 134..142
    packages/browser/src/components/DataBrowser/DataBrowser.js on lines 75..83
    packages/browser/src/components/DataTable/DataGrid.js on lines 120..128
    packages/browser/src/components/DataTable/DataGrid.js on lines 170..178

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

                                    <a
                                        target="_blank"
                                        rel="noopener noreferrer"
                                        href="https://medium.appbase.io"
                                    >
    Severity: Minor
    Found in packages/dejavu-main/site/src/components/Footer.js and 2 other locations - About 35 mins to fix
    packages/dejavu-main/site/src/components/Footer.js on lines 193..199
    packages/dejavu-main/site/src/components/Footer.js on lines 200..206

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

            const {
                mode,
                data,
                height,
                width,
    Severity: Major
    Found in packages/browser/src/components/DataTable/DataGrid.js and 6 other locations - About 35 mins to fix
    packages/browser/src/components/ConnectApp/ConnectApp.js on lines 447..455
    packages/browser/src/components/DataBrowser/AddFieldModal.js on lines 125..133
    packages/browser/src/components/DataBrowser/AddRowModal.js on lines 134..142
    packages/browser/src/components/DataBrowser/DataBrowser.js on lines 75..83
    packages/browser/src/components/DataBrowser/UpdateRow.js on lines 81..89
    packages/browser/src/components/DataTable/DataGrid.js on lines 120..128

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 47.

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

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

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

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

    Refactorings

    Further Reading

    Severity
    Category
    Status
    Source
    Language