get specs-unused-steps
The get specs unused-steps command scans step definition files in godog components and compares them against feature files in specs/ to find step definitions that are not matched by any Gherkin step.
This helps identify dead code and maintain a clean test codebase.
Shared steps from go/eac/specs/internal/steps.go are checked against all pairs.
Usage: get specs unused-steps [flags]
| Flag | Description |
|---|---|
-v, --verbose (optional, default: false) |
Show detailed output including all scanned files |
-m, --module <string> (optional) |
Only analyze a specific module (e.g., eac) |
Output
Prints unused step definitions grouped by file, with line numbers and truncated patterns. Summary reports total unused count.
Exit Codes
| Code | Meaning |
|---|---|
| 0 | No unused steps found |
| 1 | Unused steps detected (or error) |
See Also
Tutorials | How-to Guides | Explanation | Reference
You are here: Reference — information-oriented technical descriptions of the system.