Support swift-testing warnings#2244
Merged
Merged
Conversation
Implement support for SE-0013 (issue severity warnings), swift-testing emits issues with severity "warning" and `isFailure: false`. These were previously dropped silently by the JSON event stream parser. Route warning-severity issues through a new `recordWarning` path that publishes them via `TestRun.appendOutput` (with location-linked yellow text in the editor view) and as `DiagnosticSeverity.Warning` entries in a "swift-test-warnings" `DiagnosticCollection` (for editor squiggles and the Problems panel). Tests with only warnings continue to pass; tests with both a warning and a failing issue still fail.
Contributor
Author
award999
reviewed
May 21, 2026
| this.warningDiagnosticUris.add(location.uri.toString()); | ||
| } | ||
|
|
||
| private clearWarningDiagnostics() { |
Contributor
There was a problem hiding this comment.
IDK how readily this proxy object is available but ideally swift.clearDiagnosticsCollection command would also call this
Contributor
Author
There was a problem hiding this comment.
Would that clear all diagnostics? I want to just clear the swift-testing warning diagnostics
Contributor
There was a problem hiding this comment.
I just meant when swift.clearDiagnosticsCollection is called, can we clear these swift-testing ones as well?
Contributor
Author
There was a problem hiding this comment.
Ah I see what you mean now. I've updated the patch
award999
approved these changes
May 25, 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.

Implement support for SE-0013 (issue severity warnings), swift-testing emits issues with severity "warning" and
isFailure: false. These were previously dropped silently by the JSON event stream parser.Route warning-severity issues through a new
recordWarningpath that publishes them viaTestRun.appendOutput(with location-linked yellow text in the editor view) and asDiagnosticSeverity.Warningentries in a "swift-test-warnings"DiagnosticCollection(for editor squiggles and the Problems panel). Tests with only warnings continue to pass; tests with both a warning and a failing issue still fail.Tasks