Review test suite quality
review_swift_testingCheck a Swift test suite for defects that make it unreliable or vacuous, including sleeps, missing assertions, unsafe async, and static state. Use when tests are flaky or before trusting green results.
Instructions
Check a Swift test suite for defects that make it unreliable or vacuous: tests that wait by sleeping, tests with no assertion at all, await inside an XCTAssert autoclosure (which does not compile), live URLSession calls in tests, try!, static mutable state that makes results order-dependent, long expectation timeouts covering for races, and XCTAssertTrue on an equality that hides both values on failure. Also reports when a project has no tests or very few. Use when tests are flaky, before trusting a green suite, or when adding coverage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the Swift project root (the folder containing Package.swift or the .xcodeproj). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| score | Yes | 0-100 defect density. 100 = no findings. penalty = 10*blockers + 3*serious + 1*minor; capacity = files*10. Comparable across runs on ONE project, not between projects. | |
| counts | Yes | ||
| issues | Yes | Every finding, most severe first. | |
| summary | Yes | One-line plain-language result. | |
| suggestions | Yes | Prioritized next actions, deduplicated by rule — not a restatement of every issue's fix. | |
| files_checked | Yes | Swift files actually scanned. |