Skip to content

Commit 75d6404

Browse files
bwilkersonCommit Queue
authored andcommitted
Add hasPublishedDocs to every diagnostic code
This makes it easier for me to find diagnostics that still need to be documented because I can search for 'hasPublishedDocs: false'. It's hard to search for places where it isn't specified. In case you're interested, we currently have documentation for 70% of the diagnostics represented in this file. In almost every case the value is `false`, but there are two codes whose documentation has already been published but which were not marked as such. This means that we weren't associating a URL with the diagnostic, but that's now been fixed. Change-Id: I4e17671e319ec8e8887aacb6758594d7962bfc85 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429202 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]>
1 parent 750ecda commit 75d6404

File tree

2 files changed

+98
-1
lines changed

2 files changed

+98
-1
lines changed

pkg/analyzer/lib/src/error/codes.g.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4582,6 +4582,7 @@ class CompileTimeErrorCode extends DiagnosticCode {
45824582
hasPublishedDocs: true,
45834583
);
45844584

4585+
/// The documentation is in `front_end/message.yaml`.
45854586
static const CompileTimeErrorCode
45864587
RECORD_LITERAL_ONE_POSITIONAL_NO_TRAILING_COMMA = CompileTimeErrorCode(
45874588
'RECORD_LITERAL_ONE_POSITIONAL_NO_TRAILING_COMMA',
@@ -7032,6 +7033,7 @@ class WarningCode extends DiagnosticCode {
70327033
'INVALID_WIDGET_PREVIEW_APPLICATION',
70337034
"The '@Preview(...)' annotation can only be applied to public, statically "
70347035
"accessible constructors and functions.",
7036+
hasPublishedDocs: true,
70357037
);
70367038

70377039
/// Parameters:
@@ -7043,6 +7045,7 @@ class WarningCode extends DiagnosticCode {
70437045
"'@Preview(...)' can only accept arguments that consist of literals and "
70447046
"public symbols.",
70457047
correctionMessage: "Rename private symbol '{0}' to '{1}'.",
7048+
hasPublishedDocs: true,
70467049
);
70477050

70487051
/// Parameters:

0 commit comments

Comments
 (0)