testdoc-lintlisted
Install: claude install-skill vivekbhange-hub/test-doctor-skill
# testdoc-lint: tests that cannot fail
A green suite only means something if the tests could have been red. `weak_tests.py` scans test
files for the patterns that make a test pass no matter what the code does, with a rule id,
severity and `file:line` for each. You then fix them one by one, checking each fix can fail.
## Inputs
- A test directory or specific test files. Python is parsed with `ast`; JS/TS, Go and Java use
pattern matching, so expect a few misses and the odd false alarm.
- Commands below say `python3`; on Windows use `python` (or `py -3`).
## Outputs
- `testdoc/weak-tests.md`: findings by rule and by location.
- Fixed tests, grouped in one commit per rule or per file, each shown to fail when the code is wrong.
- A list of findings you chose not to fix, with the reason.
## Steps
1. **Confirm permission.** Scan and edit tests only in a repository the user owns or is
authorized to change.
2. **Scan.**
```
python3 "${CLAUDE_SKILL_DIR}/weak_tests.py" tests -o testdoc/weak-tests.md
```
Useful flags: `--min-severity medium`, `--ignore WT007,WT010` for rules the project accepts,
`--json` for scripts, and `--fail-on high` to make it a CI gate (exit code 1).
3. **Read the count line first.** If more than a third of the tests have findings, say so before
fixing anything: the suite's green status has been overstated and the user should know.
4. **Fix high findings first**, one rule at a time:
| Rule | What it means | Fix |
|---|---|--