-
Notifications
You must be signed in to change notification settings - Fork 462
[SwiftWarningControl] Add ability to query warning group behavior including client-specified enclosing control rules #3180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
artemcm
merged 1 commit into
swiftlang:main
from
artemcm:WarningControl-EnclosingControls
Nov 3, 2025
Merged
[SwiftWarningControl] Add ability to query warning group behavior including client-specified enclosing control rules #3180
artemcm
merged 1 commit into
swiftlang:main
from
artemcm:WarningControl-EnclosingControls
Nov 3, 2025
Conversation
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
|
@swift-ci test |
0c5dd9b to
59c2431
Compare
|
@swift-ci test |
59c2431 to
c05eac6
Compare
|
@swift-ci test |
ahoppen
reviewed
Oct 31, 2025
Sources/SwiftWarningControl/SyntaxProtocol+WarningControl.swift
Outdated
Show resolved
Hide resolved
c05eac6 to
ac0b0d1
Compare
…luding client-specified enclosing control rules Adds an optional parameter `with enclosingControls: [DiagnosticGroupIdentifier: WarningGroupBehavior] = [:]` to both: - `SyntaxProtocol.warningGroupControlRegionTree` - `SyntaxProtocol.warningGroupBehavior` to specify enclosing global warning group behavior controls which span the entire syntax node. This mechanism will be used by the compiler to specify global controls over certain diagnostic groups from the compilation configuration. For example, a command-line-specified `-Werror Group` will become an input to this mechanism to be used as *the* behavior control at source positions where no syntactic control (`@warn`) is specified. With this in place, the `SwiftWarningControl` API can be used as a single query which captures both syntactic and command-line configuration of warning diagnostic group behavior.
ac0b0d1 to
804df14
Compare
|
@swift-ci test |
ahoppen
approved these changes
Nov 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
|
@swift-ci Please test Windows |
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.
Adds an optional parameter
with enclosingControls: [DiagnosticGroupIdentifier: WarningGroupBehavior] = [:]to both:SyntaxProtocol.warningGroupControlRegionTreeSyntaxProtocol.warningGroupBehaviorto specify enclosing global warning group behavior controls which span the entire syntax node.This mechanism will be used by the compiler to specify global controls over certain diagnostic groups from the compilation configuration. For example, a command-line-specified
-Werror Groupwill become an input to this mechanism to be used as the behavior control at source positions where no syntactic control (@warn) is specified.With this in place, the
SwiftWarningControlAPI can be used as a single query which captures both syntactic and command-line configuration of warning diagnostic group behavior.