Mark internal codes as never being displayed to users
Change-Id: I70b903059b37765c57bacf0f0402ec73e405fd4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229980
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/analyzer/lib/src/error/codes.g.dart b/pkg/analyzer/lib/src/error/codes.g.dart
index d3dc572..edeba68 100644
--- a/pkg/analyzer/lib/src/error/codes.g.dart
+++ b/pkg/analyzer/lib/src/error/codes.g.dart
@@ -8431,35 +8431,38 @@
/**
* 12.1 Constants: A constant expression is ... a constant list literal.
+ *
+ * Note: This diagnostic is never displayed to the user, so it doesn't need
+ * to be documented.
*/
static const CompileTimeErrorCode MISSING_CONST_IN_LIST_LITERAL =
CompileTimeErrorCode(
'MISSING_CONST_IN_LIST_LITERAL',
- "List literals must be prefixed with 'const' when used as a constant "
- "expression.",
- correctionMessage: "Try adding the keyword 'const' before the literal.",
+ "Seeing this message constitutes a bug. Please report it.",
);
/**
* 12.1 Constants: A constant expression is ... a constant map literal.
+ *
+ * Note: This diagnostic is never displayed to the user, so it doesn't need
+ * to be documented.
*/
static const CompileTimeErrorCode MISSING_CONST_IN_MAP_LITERAL =
CompileTimeErrorCode(
'MISSING_CONST_IN_MAP_LITERAL',
- "Map literals must be prefixed with 'const' when used as a constant "
- "expression.",
- correctionMessage: "Try adding the keyword 'const' before the literal.",
+ "Seeing this message constitutes a bug. Please report it.",
);
/**
* 12.1 Constants: A constant expression is ... a constant set literal.
+ *
+ * Note: This diagnostic is never displayed to the user, so it doesn't need
+ * to be documented.
*/
static const CompileTimeErrorCode MISSING_CONST_IN_SET_LITERAL =
CompileTimeErrorCode(
'MISSING_CONST_IN_SET_LITERAL',
- "Set literals must be prefixed with 'const' when used as a constant "
- "expression.",
- correctionMessage: "Try adding the keyword 'const' before the literal.",
+ "Seeing this message constitutes a bug. Please report it.",
);
/**
diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml
index f3dcc6d..d791d4c 100644
--- a/pkg/analyzer/messages.yaml
+++ b/pkg/analyzer/messages.yaml
@@ -7304,17 +7304,26 @@
var m = <String, int>{'a' : 2};
```
MISSING_CONST_IN_LIST_LITERAL:
- problemMessage: "List literals must be prefixed with 'const' when used as a constant expression."
- correctionMessage: "Try adding the keyword 'const' before the literal."
- comment: "12.1 Constants: A constant expression is ... a constant list literal."
+ problemMessage: Seeing this message constitutes a bug. Please report it.
+ comment: |-
+ 12.1 Constants: A constant expression is ... a constant list literal.
+
+ Note: This diagnostic is never displayed to the user, so it doesn't need
+ to be documented.
MISSING_CONST_IN_MAP_LITERAL:
- problemMessage: "Map literals must be prefixed with 'const' when used as a constant expression."
- correctionMessage: "Try adding the keyword 'const' before the literal."
- comment: "12.1 Constants: A constant expression is ... a constant map literal."
+ problemMessage: Seeing this message constitutes a bug. Please report it.
+ comment: |-
+ 12.1 Constants: A constant expression is ... a constant map literal.
+
+ Note: This diagnostic is never displayed to the user, so it doesn't need
+ to be documented.
MISSING_CONST_IN_SET_LITERAL:
- problemMessage: "Set literals must be prefixed with 'const' when used as a constant expression."
- correctionMessage: "Try adding the keyword 'const' before the literal."
- comment: "12.1 Constants: A constant expression is ... a constant set literal."
+ problemMessage: Seeing this message constitutes a bug. Please report it.
+ comment: |-
+ 12.1 Constants: A constant expression is ... a constant set literal.
+
+ Note: This diagnostic is never displayed to the user, so it doesn't need
+ to be documented.
MISSING_DART_LIBRARY:
problemMessage: "Required library '{0}' is missing."
correctionMessage: Re-install the Dart or Flutter SDK.