Skip to content
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

[SR-11919] Fix "did you mean" diagnostics that don't include a question mark #54338

Closed
beccadax opened this issue Dec 6, 2019 · 4 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation good first issue Good for newcomers

Comments

@beccadax
Copy link
Contributor

beccadax commented Dec 6, 2019

Previous ID SR-11919
Radar rdar://problem/57712457
Original Reporter @beccadax
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI, StarterBug
Assignee faical (JIRA)
Priority Medium

md5: 0e7401d03d738cc7a88cf37628e6e9c6

Issue Description:

When Swift displays a diagnostic which uses the phrase "did you mean…", it usually ends the message with a question mark. However, at least one such diagnostic— could_not_find_enum_case in DiagnosticsSema.def—does not have a question mark at the end.

Someone should look through all the "did you mean" diagnostics and correct any that don't end with a question mark. There will definitely be at least one, but I don't know how many more there will be too.

Please also make sure you update any tests for these diagnostics. These tests might not break when you fix these bugs because -verify mode allows you to specify a substring of the full diagnostic.

@beccadax
Copy link
Contributor Author

beccadax commented Dec 6, 2019

@swift-ci create

@beccadax
Copy link
Contributor Author

beccadax commented Dec 6, 2019

This would be a good task for a brand-new contributor—it'll help you learn how Swift's diagnostics work and how its tests are written. Searching all of the Diagnostics*.def files for the phrase "did you mean" is a good place to start. When your PR is ready, tag @brentdax in the comments and I'll help you get the ball rolling.

@swift-ci
Copy link
Collaborator

Comment by Faiçal (JIRA)

Hi brentdax (JIRA User)! Would love to work on this one if that’s okay.

@swift-ci
Copy link
Collaborator

Comment by Faiçal (JIRA)

#28872

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants