Skip to content

exact-config-comment-restatement

YAML or TOML comment exactly repeats the adjacent scalar assignment

Why

A comment that repeats the key and scalar value adds no information and can drift independently from the configuration it narrates.

Fix

Delete the restatement. If the entry is author-controlled and unclear, clarify its key or section; keep comments only for constraints or rationale absent from the value.

Examples

Before — flagged A prose comment repeats the assignment
config.toml
# Retry count is 3
retry_count = 3
After — preferred A rationale adds information absent from the assignment
config.toml
# Keep three retries because the upstream API is eventually consistent.
retry_count = 3

Files

**/*.yaml**/*.yml**/*.toml