[messages] Use lowerCaseName in verify_docs.

Change the `verify_docs` package's use of `DiagnosticCode.name` to
`DiagnosticCode.lowerCaseName`. There is no functional change since
all diagnostic codes generated by the analyzer are already in lower
case.

This helps pave the way for eventually deprecating and removing
`DiagnosticCode.name`, which will help ensure that analyzer clients
treat diagnostic codes in a case-insensitive fashion.

Change-Id: I6a6a69645300e89b1bed342804d5e89ae9cf556b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/468141
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
Paul Berry
2025-12-15 17:45:52 -08:00
committed by Commit Queue
parent 583fbe5962
commit fb19233ff8
+1 -1
View File
@@ -372,7 +372,7 @@ class ValidateCommentCodeSamplesVisitor extends GeneralizingAstVisitor {
final location = result.lineInfo.getLocation(diagnostic.offset);
print(
' ${_severity(diagnostic.severity)}: ${diagnostic.message} '
'[$location] (${diagnostic.diagnosticCode.name.toLowerCase()})',
'[$location] (${diagnostic.diagnosticCode.lowerCaseName})',
);
}
print('');