bookbrainz/bookbrainz-site

View on GitHub

Showing 1,033 of 1,033 total issues

Function formatEntityChange has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function formatEntityChange(entity, change) {
    const aliasChanged =
        _.isEqual(change.path, ['aliasSet']) ||
        _.isEqual(change.path.slice(0, 2), ['aliasSet', 'aliases']) ||
        _.isEqual(change.path.slice(0, 2), ['aliasSet', 'defaultAlias']);
Severity: Minor
Found in src/server/helpers/diffFormatters/entity.js - About 55 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 formatAuthorChange has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function formatAuthorChange(change) {
    if (_.isEqual(change.path, ['beginDate'])) {
        return baseFormatter.formatScalarChange(change, 'Begin Date');
    }

Severity: Minor
Found in src/server/routes/revision.js - About 55 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 validateBBIDsForCollectionAdd has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export async function validateBBIDsForCollectionAdd(req, res, next) {
    const {Entity} = req.app.locals.orm;
    const {bbids = []} = req.body;
    if (!bbids.length) {
        return next(new error.BadRequestError('BBIDs array is empty'));
Severity: Minor
Found in src/server/helpers/middleware.ts - About 55 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 getDefaultAliasIndex has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export function getDefaultAliasIndex(aliasSet) {
    if (_.isNil(aliasSet)) {
        return null;
    }
    const {aliases, defaultAliasId} = aliasSet;
Severity: Minor
Found in src/server/routes/entity/entity.tsx - About 55 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 ContentTab has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export function ContentTab({works, onChange, onModalClose, onModalOpen, onSeriesChange, series,
     onAddSeriesItem, onSubmitWork, resetSeries, bulkAddSeriesItems, ...rest}:ContentTabProps) {
    const [isChecked, setIsChecked] = React.useState(true);
    const [copyToSeries, setCopyToSeries] = React.useState(false);
    const toggleCheck = React.useCallback(() => {
Severity: Minor
Found in src/client/unified-form/content-tab/content-tab.tsx - About 55 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 ISODateStringToObject has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export function ISODateStringToObject(value: string | DateObject): DateObject {
    if (!_.isString(value)) {
        if (_.isPlainObject(value) && _.has(value, 'year')) {
            return value;
        }
Severity: Minor
Found in src/client/helpers/utils.tsx - About 55 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 5 locations. Consider refactoring.
Open

const markup = (
    <AppContainer>
        <Layout {...extractLayoutProps(props)}>
            <RevisionsPage {...extractChildProps(props)}/>
        </Layout>
Severity: Major
Found in src/client/controllers/revisions.js and 4 other locations - About 55 mins to fix
src/client/controllers/adminLogs.js on lines 29..35
src/client/controllers/collections.js on lines 29..35
src/client/controllers/index.js on lines 57..63
src/client/controllers/preview.js on lines 12..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

const markup = (
    <AppContainer>
        <Layout {...extractLayoutProps(props)}>
            <AdminLogsPage {...extractChildProps(props)}/>
        </Layout>
Severity: Major
Found in src/client/controllers/adminLogs.js and 4 other locations - About 55 mins to fix
src/client/controllers/collections.js on lines 29..35
src/client/controllers/index.js on lines 57..63
src/client/controllers/preview.js on lines 12..18
src/client/controllers/revisions.js on lines 29..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 53.

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

const markup = (
    <AppContainer>
        <Layout {...extractLayoutProps(props)}>
            <CollectionsPage {...extractChildProps(props)}/>
        </Layout>
Severity: Major
Found in src/client/controllers/collections.js and 4 other locations - About 55 mins to fix
src/client/controllers/adminLogs.js on lines 29..35
src/client/controllers/index.js on lines 57..63
src/client/controllers/preview.js on lines 12..18
src/client/controllers/revisions.js on lines 29..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 53.

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

const markup = (
    <AppContainer>
        <Layout {...extractLayoutProps(props)}>
            <Child {...extractChildProps(props)}/>
        </Layout>
Severity: Major
Found in src/client/controllers/index.js and 4 other locations - About 55 mins to fix
src/client/controllers/adminLogs.js on lines 29..35
src/client/controllers/collections.js on lines 29..35
src/client/controllers/preview.js on lines 12..18
src/client/controllers/revisions.js on lines 29..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 53.

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

const markup = (
    <AppContainer>
        <Layout {...extractLayoutProps(props)}>
            <Preview {...extractPreviewProps(props)}/>
        </Layout>
Severity: Major
Found in src/client/controllers/preview.js and 4 other locations - About 55 mins to fix
src/client/controllers/adminLogs.js on lines 29..35
src/client/controllers/collections.js on lines 29..35
src/client/controllers/index.js on lines 57..63
src/client/controllers/revisions.js on lines 29..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 53.

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

            else {
                deleteBadge = (
                    <Badge
                        pill className="deletion margin-right-0-5 text-light"
                        title={`This ${diff.entity.type} was deleted in this revision`}
Severity: Minor
Found in src/client/components/pages/revision.js and 1 other location - About 55 mins to fix
src/client/components/pages/revision.js on lines 107..114

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

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

    const handleParentTypeChange = useCallback((selectedOption) => {
        if (selectedOption) {
            setSelectedParentType(selectedOption.id);
        }
        else {
Severity: Minor
Found in src/client/components/forms/type-editor/identifier-type.tsx and 1 other location - About 55 mins to fix
src/client/components/forms/type-editor/relationship-type.tsx on lines 104..111

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

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

    const handleParentTypeChange = useCallback((selectedOption) => {
        if (selectedOption) {
            setSelectedParentType(selectedOption.id);
        }
        else {
Severity: Minor
Found in src/client/components/forms/type-editor/relationship-type.tsx and 1 other location - About 55 mins to fix
src/client/components/forms/type-editor/identifier-type.tsx on lines 63..70

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

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

            if (diff.entityRevision.isMerge) {
                mergeBadge = (
                    <Badge
                        pill className="merged margin-right-0-5 text-light"
                        title={`This ${diff.entity.type} was merged in this revision`}
Severity: Minor
Found in src/client/components/pages/revision.js and 1 other location - About 55 mins to fix
src/client/components/pages/revision.js on lines 115..122

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

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

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

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

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

Refactorings

Further Reading

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

    const relationships = entities.reduce((returnValue, entity) => {
        if (entity.relationships) {
            return returnValue.concat(entity.relationships);
        }
        return returnValue;
Severity: Minor
Found in src/server/routes/merge.ts and 1 other location - About 55 mins to fix
src/server/routes/merge.ts on lines 153..158

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

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

        validateNameSectionName(get(values, 'name', null)) &&
        validateNameSectionSortName(get(values, 'sortName', null)) &&
        validateNameSectionLanguage(get(values, 'language', null)) &&
        validateNameSectionDisambiguation(get(values, 'disambiguation', null))
Severity: Minor
Found in src/client/entity-editor/validators/common.ts and 1 other location - About 55 mins to fix
src/client/entity-editor/validators/edition.ts on lines 115..118

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

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

            <MergeField
                components={{Option: LinkedEntitySelect, SingleValue: EntitySelect}}
                currentValue={beginAreaValue}
                label={beginAreaLabel}
                options={beginAreaOptions}
src/client/entity-editor/author-section/author-section-merge.tsx on lines 235..241

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

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

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

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

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

Refactorings

Further Reading

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

const markup = (
    <AppContainer>
        <Layout {...extractLayoutProps(props)}>
            <Child
                {...extractChildProps(props)}
Severity: Minor
Found in src/client/controllers/relationshipTypes.tsx and 1 other location - About 55 mins to fix
src/client/controllers/identifierTypes.tsx on lines 30..36

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

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

        validateEditionSectionDepth(get(data, 'depth', null)) &&
        validateEditionSectionFormat(get(data, 'format', null)) &&
        validateEditionSectionHeight(get(data, 'height', null)) &&
        validateEditionSectionLanguages(get(data, 'languages', null)) &&
Severity: Minor
Found in src/client/entity-editor/validators/edition.ts and 1 other location - About 55 mins to fix
src/client/entity-editor/validators/common.ts on lines 163..166

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

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