Skip to content

Duplicate adding or pasting a value to a collection (DuplicatedInsertionIntoCollection)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Code smell BSL
OS
Major Yes 1 brainoverload
suspicious
badpractice

Parameters

Name Type Description Default value
isAllowedMethodADD Boolean Analysis of methods named "Add" is allowed - both useful and false issues may appear true

Description

Examples

Sources

Snippets

Diagnostic ignorance in code

// BSLLS:DuplicatedInsertionIntoCollection-off
// BSLLS:DuplicatedInsertionIntoCollection-on

Parameter for config

"DuplicatedInsertionIntoCollection": {
    "isAllowedMethodADD": true
}