Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0a02666

Browse files
stereotype441Commit Queue
authored and
Commit Queue
committed
[messages] Remove unnecessary sorting TODO.
Removes the TODO message suggesting that the messages in the `sharedAnalyzerCodes` variable should be sorted by `camelCaseName`. It turns out these messages are already sorted by `camelCaseName`. Also adjusts the documentation string above `DiagnosticTables.sortedSharedDiagnostics` (the table that `sharedAnalyzerCodes` is built from during code generation) to clarify that it is sorted by `camelCaseName`. Change-Id: I6a6a696499dcae105a1bd6ba4e8a4569a17bc596 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461522 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
1 parent c2c5357 commit 0a02666

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

‎pkg/analyzer/tool/messages/generate.dart‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ part of 'diagnostic_code_values.dart';
220220
void _generateSharedAnalyzerCodeList() {
221221
out.writeln('final sharedAnalyzerCodes = <DiagnosticCode>[');
222222
for (var entry in diagnosticTables.sortedSharedDiagnostics) {
223-
// TODO(paulberry): after `generateTopLevelConstants` has been changed to
224-
// `true`, sort these entries by camelCaseName.
225223
out.writeln('${entry.analyzerCode.analyzerCodeReference},');
226224
}
227225
out.writeln('];');

‎pkg/analyzer_utilities/lib/messages.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ enum DiagnosticParameterType {
401401
/// A set of tables derived from shared, CFE, analyzer, and linter diagnostics.
402402
class DiagnosticTables {
403403
/// List of shared diagnostics for which analyzer diagnostics should be
404-
/// automatically generated, sorted by analyzer code.
404+
/// automatically generated, sorted by [AnalyzerCode.camelCaseName].
405405
final List<SharedMessage> sortedSharedDiagnostics = [];
406406

407407
/// List of front end diagnostics, sorted by front end code.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /