slop/commented-out-code
No commented-out code
| Severity | info |
| Tiers | all |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.6.0 |
| Selected by | fleetlint-slop@v0.6.0 |
Requirement
No code is kept in comments.
Why
Version control keeps old code; commented-out code is never updated and nobody dares delete it.
Check
For each item in:
codegrep("code", r'^\s*(//|#)\s*(if|for|while|return|await|const|let|var|final|val|def|func|fn|import|from)\b.*([;{)(]|:)\s*$')falseFix
Delete it.
Agent instruction: Delete commented-out code.
Sources
- https://docs.astral.sh/ruff/rules/commented-out-code/ (check, ERA001)
- https://fleetlint.org/baseline/#slop (convention)
- https://fleetlint.org/slop/#comments-and-text
Generated by fleetlint docs from catalog v0.6.0.