Inclusive Comments

ID

html.inclusive_comments

Severity

info

Remediation Complexity

trivial

Remediation Risk

low

Remediation Effort

low

Resource

Best Practice

Language

Html

Tags

comments, inclusive

Description

Reports HTML comments (<!-- …​ -→) whose text contains a non-inclusive term. The term list is configurable through the terms property and defaults to a standard set (blacklist, whitelist, master, slave, grandfather, dummy, sanity).

Rationale

Non-inclusive terminology in source comments is easy to replace with clearer, neutral wording (allowlist/blocklist, primary/replica, …​) and doing so makes the codebase more welcoming. URLs and ALL-CAPS identifier references (e.g. a master branch in a link, or WHITELIST_TAGS) are exempt because they are not authored prose.

<!-- add the host to the whitelist --> <!-- FLAW: non-inclusive term -->

<!-- add the host to the allowlist -->  <!-- OK -->

Remediation

Replace the term with an inclusive equivalent: allowlist/blocklist, primary/replica, main, placeholder, check.