[JUnit Platform Engine] Warn when selected line does not exist #3056
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.
⚡️ What's your motivation?
It is possible to select a line in a classpath resource that does not exist. For example:
In a trivial suite this will result in an exception as no scenarios could be found. In a non-trivial suite that does discover other scenarios this error will go unnoticed.
By reporting this as a discovery issue and falling back to running the whole feature we ensure that no-tests go unexecuted while also informing the callers about this mis-configuration.
Example of the warning:
🏷️ What kind of change is this?
📋 Checklist: