feat(cli): name the existing tags when --tag matches nothing - #1266
Merged
Conversation
A tag is a user-defined string that appears only in `# @tag` comments, and nothing lists them: `--list --list-format json` reports the tags of the tests it selected, which is empty precisely when the selection failed. So a typo'd `--tag` left a bare "No tests found" with no way back, while a typo'd --filter has had a hint since #1237. The tags map is cached per script, so only the last file's would survive to the summary; the names are accumulated as each file is scanned instead. That is per file, not per test, and the hint only renders on a run that already selected nothing. An untagged selection gets a different message, because it is a different mistake: naming an empty list would say nothing. Closes #1265
This was referenced Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 Background
Related #1265
A mistyped
--filterhas explained itself since #1237, but a mistyped--tagstill ended on a bareNo tests found. Tags are worse off: a filter matches a function name, which is visible in any normal run, while a tag exists only inside# @tagcomments and nothing lists them —--list-format jsonreports the tags of the tests it selected, which is empty exactly when you need them.💡 Changes
--tagselection now names the tags the run actually saw:No test matches tag 'integraton'. Tags in the selected files: integration,slow.