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

Adjust for "remark" diagnostic severity #605

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/swift-format/Utilities/DiagnosticsEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ final class DiagnosticsEngine {
case .error: severity = .error
case .warning: severity = .warning
case .note: severity = .note
case .remark: severity = .note // should we model this?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good enough as a minimal change to unblock the other PR. I can go back later and look at modeling it as a unique kind in swift-format later on. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I wasn't sure if it made sense for swift-format to model remarks or not. They're only used in narrow places in the compiler itself, and might not be interesting here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there plans to have any remarks come out of the parser or just the later phases of the compiler? Because parser diagnostics are the only ones that swift-format cares about.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No plans to have remarks come out of the parser. At the moment, it's usually later phases providing extra information about the build itself---when a Swift module was rebuilt from its interface, which plugin is providing a macro.

}
return Diagnostic(
severity: severity,
Expand Down