Commit a5ce5b6
[analyzer/linter] Use structured parameter format in messages.yaml.
This commit changes the format of `messages.yaml`. Message parameters
are now defined in a structured `parameters` section, replacing the
old free-form comments. This new format explicitly names and types
each parameter, which will allow for future improvements to static
error checking.
Also, the placeholder syntax is changed from `{N}` to `#NAME` to align
with the CFE, which will facilitate sharing error messages between the
analyzer and CFE in the future.
For now, the parameter names and types have been chosen fairly
arbitrarily; I plan to refine them in future CLs, working with small
sets of error messages at a time.
Additionally, the code generator now documents the parameters in a new
`Parameters:` section at the end of each error code's doc
comment. This change doesn't alter the generated files for now (to
give extra confidence that the change won't affect behavior). In a
follow-up, I plan to update the generated comments to include the
parameter names and types.
Change-Id: Ia704e2c30d466b379b956ba8bbcee8bbef7bf11a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444388
Commit-Queue: Paul Berry <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
Reviewed-by: Johnni Winther <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Reviewed-by: Phil Quitslund <[email protected]>1 parent a8879f9 commit a5ce5b6
File tree
4 files changed
+2891
-3430
lines changed- pkg
- analyzer
- tool/messages
- linter
4 files changed
+2891
-3430
lines changed
0 commit comments