superdesk/superdesk-client-core

View on GitHub

Showing 3,654 of 3,654 total issues

Function processBlock has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    processBlock(block: ContentBlock): ContentBlock {
        const isAtomic = block.getType() === 'atomic';
        const isTable = block.getText().startsWith('BLOCK_TABLE_');
        const isMedia = block.getText().startsWith('BLOCK_MEDIA_');
        const isFigure = block.getText().startsWith('BLOCK_FIGURE_');
Severity: Minor
Found in scripts/core/editor3/html/from-html/index.ts - About 1 hr 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 waitForMediaToLoad has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

export const waitForMediaToLoad = (
    elements: Array<HTMLImageElement | HTMLAudioElement | HTMLVideoElement>,
): Promise<void> =>
    new Promise((resolve) => {
        const filteredElements = elements.filter((element) => {
Severity: Minor
Found in scripts/core/helpers/waitForMediaToBeReady.ts - About 1 hr 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 AutoexpandDirective has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function AutoexpandDirective() {
    return {
        link: function(scope, element) {
            var _minHeight = element.outerHeight();

Severity: Minor
Found in scripts/core/ui/ui.ts - About 1 hr 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 getSuperdeskApiImplementation has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    requestingExtensionId: string,
    extensions: IExtensions,
    modal,
    privileges,
    lock,
Severity: Major
Found in scripts/core/get-superdesk-api-implementation.tsx - About 1 hr to fix

    Function canDropMedia has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    export function canDropMedia(e, editorConfig): undefined | boolean {
        // apply restrictions only if it is something other than text(IArticle object, image file) being dragged
        if ((e?.originalEvent?.dataTransfer?.types ?? []).some((type) => type !== 'text/plain' && type !== 'text/html')) {
            const {editorFormat, readOnly, singleLine} = editorConfig;
            const supportsMedia = !readOnly && !singleLine && editorFormat.includes('media');
    Severity: Minor
    Found in scripts/core/editor3/components/Editor3Component.tsx - About 1 hr 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 pasteContentFromOpenEditor has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    function pasteContentFromOpenEditor(
        html: string,
        editorState: EditorState,
        editorKey: string,
        onChange: (e: EditorState) => void,
    Severity: Minor
    Found in scripts/core/editor3/components/handlePastedText.ts - About 1 hr 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 TimeoutInterceptor has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    function TimeoutInterceptor($timeout, $q, $rootScope, request) {
        var TIMEOUT = 3000,
            TIMEOUT_MAX = 60000,
            STATUS = {
                OK: 0,
    Severity: Minor
    Found in scripts/core/api/timeout-interceptor.ts - About 1 hr 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 11 (exceeds 5 allowed). Consider refactoring.
    Open

        render() {
            const {floating} = this.state;
            const {
                customToolbarStyle,
                suggestingMode,
    Severity: Minor
    Found in scripts/core/editor3/components/toolbar/index.tsx - About 1 hr 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 4 locations. Consider refactoring.
    Open

    export class HeaderPanel extends React.PureComponent<IProps> {
        render() {
            return (
                <div className="sd-main-content-grid__header">
                    {this.props.children}
    Severity: Major
    Found in scripts/extensions/sams/src/ui/HeaderPanel.tsx and 3 other locations - About 1 hr to fix
    scripts/extensions/sams/src/ui/FormItem.tsx on lines 7..15
    scripts/extensions/sams/src/ui/PanelContent.tsx on lines 7..15
    scripts/extensions/sams/src/ui/modal/ModalFooter.tsx on lines 7..15

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

    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

                    <div
                        className={
                            classNames(
                                'sd-line-input',
                                {
    scripts/core/ui/components/generic-form/input-types/checkbox.tsx on lines 14..38
    scripts/core/ui/components/generic-form/input-types/plain-text.tsx on lines 38..54
    scripts/core/ui/components/generic-form/input-types/select_single_value_autocomplete.tsx on lines 76..112
    scripts/core/ui/components/generic-form/input-types/text-editor3.tsx on lines 21..45

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

    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

        constructor(props: IProps) {
            super(props);
    
            this.itemTemplate = getItemTemplate(this);
            this.removeItem = this.removeItem.bind(this);
    Severity: Major
    Found in scripts/apps/authoring-react/fields/linked-items/editor.tsx and 1 other location - About 1 hr to fix
    scripts/apps/authoring-react/fields/package-items/editor.tsx on lines 82..87

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

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

    export class FormItem extends React.PureComponent<IProps> {
        render() {
            return (
                <div className="form__item">
                    {this.props.children}
    Severity: Major
    Found in scripts/extensions/sams/src/ui/FormItem.tsx and 3 other locations - About 1 hr to fix
    scripts/extensions/sams/src/ui/HeaderPanel.tsx on lines 7..15
    scripts/extensions/sams/src/ui/PanelContent.tsx on lines 7..15
    scripts/extensions/sams/src/ui/modal/ModalFooter.tsx on lines 7..15

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

    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

        constructor(props: IProps) {
            super(props);
    
            this.itemTemplate = getItemTemplate(this);
            this.removeItem = this.removeItem.bind(this);
    scripts/apps/authoring-react/fields/linked-items/editor.tsx on lines 85..90

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

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

    export class PanelContent extends React.PureComponent<IProps> {
        render() {
            return (
                <div className="side-panel__content">
                    {this.props.children}
    Severity: Major
    Found in scripts/extensions/sams/src/ui/PanelContent.tsx and 3 other locations - About 1 hr to fix
    scripts/extensions/sams/src/ui/FormItem.tsx on lines 7..15
    scripts/extensions/sams/src/ui/HeaderPanel.tsx on lines 7..15
    scripts/extensions/sams/src/ui/modal/ModalFooter.tsx on lines 7..15

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

    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

          Watch.prototype.canUndo = function canUndo() {
            return this.exp === null ? false :
                   service.canUndo(this.exp, this.scope);
          };
    Severity: Major
    Found in scripts/libs/angular-history/history.js and 1 other location - About 1 hr to fix
    scripts/libs/angular-history/history.js on lines 539..542

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

    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

          Watch.prototype.canRedo = function canRedo() {
            return this.exp === null ? false :
                   service.canRedo(this.exp, this.scope);
          };
    Severity: Major
    Found in scripts/libs/angular-history/history.js and 1 other location - About 1 hr to fix
    scripts/libs/angular-history/history.js on lines 530..533

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

    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

                <div
                    className={classNames(
                        'sd-line-input',
                        {
                            'sd-line-input--invalid': this.props.issues.length > 0,
    scripts/core/ui/components/generic-form/input-types/checkbox.tsx on lines 14..38
    scripts/core/ui/components/generic-form/input-types/select_single_value.tsx on lines 89..124
    scripts/core/ui/components/generic-form/input-types/select_single_value_autocomplete.tsx on lines 76..112
    scripts/core/ui/components/generic-form/input-types/text-editor3.tsx on lines 21..45

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

    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

        beforeEach(() => {
            const testConfig: Partial<ISuperdeskGlobalConfig> = {server: {url: 'http://localhost', ws: undefined}};
    
            Object.assign(appConfig, testConfig);
        });
    Severity: Major
    Found in scripts/core/services/permissions.spec.ts and 4 other locations - About 1 hr to fix
    scripts/apps/archive/related-item-widget/related-item-widget.spec.ts on lines 5..14
    scripts/apps/authoring/authoring/directives/ItemAssociationDirective.spec.ts on lines 5..14
    scripts/core/auth/basic-auth-adapter.spec.ts on lines 21..30
    scripts/core/services/data.spec.ts on lines 11..17

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

    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

                    <div
                        className={
                            classNames(
                                'sd-line-input',
                                {
    scripts/core/ui/components/generic-form/input-types/checkbox.tsx on lines 14..38
    scripts/core/ui/components/generic-form/input-types/plain-text.tsx on lines 38..54
    scripts/core/ui/components/generic-form/input-types/select_single_value.tsx on lines 89..124
    scripts/core/ui/components/generic-form/input-types/text-editor3.tsx on lines 21..45

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

    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

        beforeEach(() => {
            const testConfig: Partial<ISuperdeskGlobalConfig> = {
                server: {url: 'http://localhost', ws: undefined},
            };
    
    
    Severity: Major
    Found in scripts/core/services/data.spec.ts and 4 other locations - About 1 hr to fix
    scripts/apps/archive/related-item-widget/related-item-widget.spec.ts on lines 5..14
    scripts/apps/authoring/authoring/directives/ItemAssociationDirective.spec.ts on lines 5..14
    scripts/core/auth/basic-auth-adapter.spec.ts on lines 21..30
    scripts/core/services/permissions.spec.ts on lines 9..13

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

    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