superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

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

        const classes = classNames(
            'sd-grid-item__footer-block',
            {
                'sd-grid-item__footer-block--multi-l': this.props.multiL,
                'sd-grid-item__footer-block--multi-r': this.props.multiR,
Severity: Minor
Found in scripts/extensions/sams/src/ui/grid/GridItemFooterBlock.tsx and 1 other location - About 50 mins to fix
scripts/extensions/sams/src/ui/PanelHeader.tsx on lines 16..23

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

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

        this.toggleGlobalSearch = function(search) {
            this.getGlobalSearch(search).element(by.css('[ng-click="setSearchInfo(search._id)"]')).click();
        };
Severity: Major
Found in e2e/client/specs/helpers/monitoring.ts and 4 other locations - About 50 mins to fix
e2e/client/specs/helpers/authoring.ts on lines 1054..1056
e2e/client/specs/helpers/master_desks.ts on lines 74..76
e2e/client/specs/helpers/monitoring.ts on lines 633..635
e2e/client/specs/helpers/monitoring.ts on lines 657..659

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

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

        this.togglePrivateSearch = function(search) {
            this.getPrivateSearch(search).element(by.css('[ng-click="setSearchInfo(search._id)"]')).click();
        };
Severity: Major
Found in e2e/client/specs/helpers/monitoring.ts and 4 other locations - About 50 mins to fix
e2e/client/specs/helpers/authoring.ts on lines 1054..1056
e2e/client/specs/helpers/master_desks.ts on lines 74..76
e2e/client/specs/helpers/monitoring.ts on lines 633..635
e2e/client/specs/helpers/monitoring.ts on lines 653..655

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

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

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

        <div
            data-flow={'down'}
            data-sd-tooltip={tooltip}
            className="Editor3-styleButton"
            style={uiTheme == null ? undefined : {color: uiTheme.textColor}}
Severity: Minor
Found in scripts/core/editor3/components/toolbar/SelectionButton.tsx and 1 other location - About 50 mins to fix
scripts/core/editor3/components/toolbar/IconButton.tsx on lines 21..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 51.

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

        this.getSpikedTextItem = function(index) {
            return this.getSpikedItem(index).element(by.className('item-heading')).getText();
        };
Severity: Major
Found in e2e/client/specs/helpers/monitoring.ts and 5 other locations - About 50 mins to fix
e2e/client/specs/helpers/authoring.ts on lines 391..393
e2e/client/specs/helpers/authoring.ts on lines 1037..1039
e2e/client/specs/helpers/monitoring.ts on lines 625..627
e2e/client/specs/helpers/monitoring.ts on lines 629..631
e2e/client/specs/helpers/monitoring.ts on lines 673..675

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

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

        this.cutBlock = function(position) {
            return this.getBlock(position).element(by.css('.block__cut')).click();
        };
Severity: Major
Found in e2e/client/specs/helpers/authoring.ts and 5 other locations - About 50 mins to fix
e2e/client/specs/helpers/authoring.ts on lines 1037..1039
e2e/client/specs/helpers/monitoring.ts on lines 326..328
e2e/client/specs/helpers/monitoring.ts on lines 625..627
e2e/client/specs/helpers/monitoring.ts on lines 629..631
e2e/client/specs/helpers/monitoring.ts on lines 673..675

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

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

        this.getGlobalSearchText = function(search) {
            return this.getGlobalSearch(search).element(by.css('.desk-title')).getText();
        };
Severity: Major
Found in e2e/client/specs/helpers/monitoring.ts and 5 other locations - About 50 mins to fix
e2e/client/specs/helpers/authoring.ts on lines 391..393
e2e/client/specs/helpers/authoring.ts on lines 1037..1039
e2e/client/specs/helpers/monitoring.ts on lines 326..328
e2e/client/specs/helpers/monitoring.ts on lines 629..631
e2e/client/specs/helpers/monitoring.ts on lines 673..675

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

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

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

            api('roles')
                .query()
                .then((result) => {
                    scope.roles = $filter('sortByName')(result._items);
                });
Severity: Minor
Found in scripts/apps/users/directives/RolesPrivilegesDirective.ts and 1 other location - About 50 mins to fix
scripts/apps/users/directives/UserRolesDirective.ts on lines 13..16

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

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

        this.getOrderItemText = function(item) {
            return this.getOrderItem(item).element(by.css('.group-title')).getText();
        };
Severity: Major
Found in e2e/client/specs/helpers/monitoring.ts and 5 other locations - About 50 mins to fix
e2e/client/specs/helpers/authoring.ts on lines 391..393
e2e/client/specs/helpers/authoring.ts on lines 1037..1039
e2e/client/specs/helpers/monitoring.ts on lines 326..328
e2e/client/specs/helpers/monitoring.ts on lines 625..627
e2e/client/specs/helpers/monitoring.ts on lines 629..631

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

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

        this.getPrivateSearchText = function(search) {
            return this.getPrivateSearch(search).element(by.css('.desk-title')).getText();
        };
Severity: Major
Found in e2e/client/specs/helpers/monitoring.ts and 5 other locations - About 50 mins to fix
e2e/client/specs/helpers/authoring.ts on lines 391..393
e2e/client/specs/helpers/authoring.ts on lines 1037..1039
e2e/client/specs/helpers/monitoring.ts on lines 326..328
e2e/client/specs/helpers/monitoring.ts on lines 625..627
e2e/client/specs/helpers/monitoring.ts on lines 673..675

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

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

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

            macros.get(true).then((_macros) => {
                _.transform(_macros, (lookup, macro: any, idx) => {
                    scope.macroLookup[macro.name] = macro;
                });
            });
Severity: Minor
Found in scripts/apps/ingest/directives/IngestRoutingAction.ts and 1 other location - About 50 mins to fix
scripts/apps/ingest/directives/IngestRoutingGeneral.ts on lines 21..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 51.

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

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

            macros.get().then((_macros) => {
                _.transform(_macros, (lookup, macro: any, idx) => {
                    scope.macroLookup[macro.name] = macro;
                });
            });
Severity: Minor
Found in scripts/apps/ingest/directives/IngestRoutingGeneral.ts and 1 other location - About 50 mins to fix
scripts/apps/ingest/directives/IngestRoutingAction.ts on lines 28..32

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

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

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

    <div
        data-flow={'down'}
        data-sd-tooltip={tooltip}
        className="Editor3-styleButton"
        style={uiTheme == null ? undefined : {color: uiTheme.textColor}}
Severity: Minor
Found in scripts/core/editor3/components/toolbar/IconButton.tsx and 1 other location - About 50 mins to fix
scripts/core/editor3/components/toolbar/SelectionButton.tsx on lines 42..51

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

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

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

type ISetArrays = {
    draft: Array<ISetItem>;
    usable: Array<ISetItem>;
    disabled: Array<ISetItem>;
};
Severity: Minor
Found in scripts/extensions/sams/src/store/sets/selectors.ts and 1 other location - About 50 mins to fix
scripts/extensions/sams/src/components/sets/setListPanel.tsx on lines 31..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 51.

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

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

        if (!newPackage.task || !newPackage.task.desk) {
            newPackage.task = {desk: desks.getCurrentDeskId()};
        }
Severity: Minor
Found in scripts/apps/packaging/services/PackagesService.ts and 1 other location - About 50 mins to fix
scripts/apps/packaging/services/PackagesService.ts on lines 44..46

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

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

        this.goToDesk = function(desk) {
            this.getDesk(desk).element(by.className('icon-external')).click();
        };
Severity: Major
Found in e2e/client/specs/helpers/master_desks.ts and 4 other locations - About 50 mins to fix
e2e/client/specs/helpers/authoring.ts on lines 1054..1056
e2e/client/specs/helpers/monitoring.ts on lines 633..635
e2e/client/specs/helpers/monitoring.ts on lines 653..655
e2e/client/specs/helpers/monitoring.ts on lines 657..659

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

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

        this.openCompareVersionsInnerDropdown = function(index) {
            this.getBoard(index).all(by.css('[class="navbtn dropdown"]')).click();
        };
Severity: Major
Found in e2e/client/specs/helpers/authoring.ts and 4 other locations - About 50 mins to fix
e2e/client/specs/helpers/master_desks.ts on lines 74..76
e2e/client/specs/helpers/monitoring.ts on lines 633..635
e2e/client/specs/helpers/monitoring.ts on lines 653..655
e2e/client/specs/helpers/monitoring.ts on lines 657..659

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

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

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

                        <span className={this.getIconClasses(value)}>
                            {get(value, valueKey, get(value, labelKey, noValueString || gettext('None')))}
                        </span>
Severity: Minor
Found in scripts/core/ui/components/Form/ColouredValueInput/index.tsx and 1 other location - About 50 mins to fix
scripts/core/ui/components/Form/ColouredValueInput/index.tsx on lines 86..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 51.

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

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

        if (!newPackage.task || !newPackage.task.desk) {
            newPackage.task = {desk: desks.getCurrentDeskId()};
        }
Severity: Minor
Found in scripts/apps/packaging/services/PackagesService.ts and 1 other location - About 50 mins to fix
scripts/apps/packaging/services/PackagesService.ts on lines 75..77

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

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

        this.getBoardArticle = function(index) {
            return this.getBoard(index).all(by.css('[data-article="board.article"]')).first();
        };
Severity: Major
Found in e2e/client/specs/helpers/authoring.ts and 5 other locations - About 50 mins to fix
e2e/client/specs/helpers/authoring.ts on lines 391..393
e2e/client/specs/helpers/monitoring.ts on lines 326..328
e2e/client/specs/helpers/monitoring.ts on lines 625..627
e2e/client/specs/helpers/monitoring.ts on lines 629..631
e2e/client/specs/helpers/monitoring.ts on lines 673..675

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

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