-
Notifications
You must be signed in to change notification settings - Fork 118
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
Add source URL to diagnostic about extra content in @Links directive #753
Add source URL to diagnostic about extra content in @Links directive #753
Conversation
@swift-ci please test |
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.
FYI Chris Sanders just saw this in production and filed a new Radar for it.
@@ -238,3 +240,8 @@ extension TaskGroup { | |||
} | |||
} | |||
|
|||
private extension SourceRange { | |||
var source: URL? { | |||
lowerBound.source ?? upperBound.source |
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.
Out of curiosity, is there a case where lowerBound.source may not exist but upperBound.source would exist?
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.
In theory it's possible but I don't think there's a real case where it would happen.. I believe in practice either one or both of the source locations would have a source.
@swift-ci please test |
Bug/issue #, if applicable: rdar://118478839
Summary
This fixes an issue where diagnostic about extra content in
@Links
directives didn't display on the line of that content because the diagnostic didn't have a source URL.Dependencies
None
Testing
@Links
directive with some extra content after one of the links, for example:Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/test
script and it succeeded[ ] Updated documentation if necessary