Worked example · Maintenance
Zero lint warnings with a WDD loop
Lint clean-ups are a textbook WDD grind: thousands of small, mechanical fixes with an exact counter. The two rules that matter: never disable a rule to make it pass, and keep the tests green so fixes do not change behaviour.
The goal
Clear 3,100 warnings after enabling a stricter lint configuration, without disabling rules and with tests green.
The verifier
The linter with zero warnings allowed, a count of disable comments compared with the main branch, and the test suite.
Why this check: The count shows progress, the disable-comment check stops the obvious cheat, and the tests stop "fixes" that change behaviour.
The set-up
- Warnings grouped by rule, fixed one rule at a time, with automatic fixes first.
- A commit per rule, so any rule's fixes can be reverted alone.
The kickoff prompt
Kickoff
Make the linter report zero warnings. Work rule by rule, starting with what --fix can do. Never add disable comments or change the lint config. Run the tests after each rule. Commit per rule. Keep going until zero.
How the rounds went
- Round 1
- Automatic fixes clear 1,900 warnings in one go; tests stay green.
- Rounds 2 to 15
- Rule by rule through the rest. One rule's fixes break two tests; the agent reverts that commit and redoes it more carefully.
- Round 16
- Zero warnings, no new disable comments, tests green.
What worked
- Small, revertable commits per rule.
- The test suite as a second verifier.
What to watch for
- Some rules need judgement (naming, complexity). Exclude those from the loop and do them by hand.
Build a kit for a task like this
A worked example written to show the method, not a report of a specific project.
Questions people ask
Is a lint clean-up worth an agent loop?
Yes, it is one of the cheapest: fast checks, small fixes, easy review per rule.