Skip to content

Commit d877261

Browse files
committed
Release note for diagnostic category
1 parent e651bd9 commit d877261

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Release Notes/602.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## New APIs
44

5+
- `DiagnosticMessage` has a new optional property, `category`, that providesa category name and documentation URL for a diagnostic.
6+
- Description: Tools often have many different diagnostics. Diagnostic categories allow tools to group several diagnostics together with documentation that can help users understand what the diagnostics mean and how to address them. This API allows diagnostics to provide this category information. The diagnostic renderer will provide the category at the end of the diagnostic message in the form `[#CategoryName]`.
7+
- Pull Request: https://github.com/swiftlang/swift-syntax/pull/2981
8+
- Migration steps: None required. The new `category` property has optional type, and there is a default implementation that returns `nil`. Types that conform to `DiagnosticMessage` can choose to implement this property and provide a category when appropriate.
9+
510
## API Behavior Changes
611

712
## Deprecations

0 commit comments

Comments
 (0)