You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[linter/directives_ordering] Pluralize in Dart code rather than message template.
In a follow-up CL I will be changing the format of the
`problemMessage` templates in `pkg/linter/messages.yaml`, so that
instead of using numeric placeholders like `{0}`, it will use named
placeholders of the form `#IDENTIFIER`. This will make the
analyzer/linter diagnostic message code generation more similar to the
CFE's diagnostic message code generation, which should help pave the
way for one day unifying the two diagnostic message representations.
This poses a problem for the `directives_ordering_dart` and
`directives_ordering_package_before_relative` diagnostic messages:
prior to this CL, they used `{0}s` in their `problemMessage` templates
to pluarlize argument zero. That can't be done using placeholders of
the form `#IDENTIFIER`, since `s` is a valid identifier character.
In an ideal world we would probably fix this by adding support for a
placeholder syntax like `#{IDENTIFIER}`. But since only these two
messages are affected, it's more pragmatic to just do the
pluralization in Dart code rather than in the templates.
Change-Id: Ifbe2008aa1e252375c684b5770848eb143972703
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444386
Reviewed-by: Samuel Rawlins <[email protected]>
Commit-Queue: Paul Berry <[email protected]>
0 commit comments