gauge
gauge copied to clipboard
CLI command to find unused step implementations
As a developer I want a CLI command to find unused step implementations So that I can fail the build on dead code
Problem Because step usages (in spec files) are so separated from step implementations (in code files), it's really easy to delete the final usage of a step without realising it, leaving dead code behind. The vscode integration is great for finding these - I just opened up a typescript file and deleted about 10 different steps that all had a little "0 reference(s)" flag on them. But that only helps if you happen to stumble across the unused steps and notice the issue.
Solution
What would be awesome is if the CLI could tell me about steps that have 0 references, either just as a warning to the developer, or to fail the build straight away. Maybe it could be a flag to the validate
command? E.g.
gauge validate --no-unused-steps specs/