Skip to content

Commit

Permalink
List canonical topics in alphabetical order. (#8445)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Jan 6, 2025
1 parent 2b0608e commit c65e113
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
6 changes: 6 additions & 0 deletions app/test/service/topics/topics_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ void main() {
fail('The alias "$alias" is listed in "aliases" for two topics!');
}
}

// Check if names are in alphabetical order
final orderedNames = topics.map((e) => e.topic).toList()..sort();
if (orderedNames.join(',') != topics.map((e) => e.topic).join(',')) {
fail('Topic entries are not in alpahbetical order.');
}
});

test('topics are canonicalized', () {
Expand Down
20 changes: 10 additions & 10 deletions doc/topics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,14 @@
# The editorial guidelines are intended to evolve as we gain more experience
# merging/managing topics.
topics:
- topic: widget
description: Packages that contain Flutter widgets.
- topic: form
description: Packages that facilitate form display or processing.
aliases:
- widgets
- forms
- topic: i18n
description: Packages that facilitate internationalization.
aliases:
- internationalization
- topic: logging
description: Packages for writing log messages.
aliases:
Expand All @@ -72,11 +76,7 @@ topics:
description: Packages that facilitate testing.
aliases:
- test
- topic: i18n
description: Packages that facilitate internationalization.
aliases:
- internationalization
- topic: form
description: Packages that facilitate form display or processing.
- topic: widget
description: Packages that contain Flutter widgets.
aliases:
- forms
- widgets

0 comments on commit c65e113

Please sign in to comment.