Skip to content

Prohibited words (BadWords)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Code smell BSL
OS
Major No 1 design

Parameters

Name Type Description Default value
badWords String Regular expression for prohibited words. ``
findInComments Boolean Find in comments true

Description

Software modules should not contain prohibited words. The list of forbidden words is set by a regular expression. The search is case-insensitive.

For example:

"singularity|avada kedavra|Donald"

"transcenden(tal|ce)"

Snippets

Diagnostic ignorance in code

// BSLLS:BadWords-off
// BSLLS:BadWords-on

Parameter for config

"BadWords": {
    "badWords": "",
    "findInComments": true
}