[M] Change in dart/sdk[main]: [dartdev] Validate command names and check subcommands recursively

0 views
Skip to first unread message

Ben Konyi (Gerrit)

unread,
Jul 14, 2026, 11:38:16 AM (2 days ago) Jul 14
to Jaime Wren, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org
Attention needed from Jaime Wren

Ben Konyi added 2 comments

File pkg/dartdev/test/commands/flag_test.dart
Line 41, Patchset 1 (Latest): if (commandKey != 'debug_adapter') {
Ben Konyi . unresolved

Should we consider making `debug_adapter` an alias for `debug-adapter` (https://pub.dev/documentation/args/latest/command_runner/Command/aliases.html)?

Line 69, Patchset 1 (Latest): command.subcommands.forEach((String subKey, Command<int> subCommand) {
Ben Konyi . unresolved

Nit: wouldn't this work?

```dart
command.subcommands.forEach(validateCommand);
```

Open in Gerrit

Related details

Attention is currently required from:
  • Jaime Wren
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I1b28e7c3bc8b858d021f92949d709ba72632155f
Gerrit-Change-Number: 523320
Gerrit-PatchSet: 1
Gerrit-Owner: Jaime Wren <jw...@google.com>
Gerrit-Reviewer: Ben Konyi <bko...@google.com>
Gerrit-Reviewer: Jaime Wren <jw...@google.com>
Gerrit-Attention: Jaime Wren <jw...@google.com>
Gerrit-Comment-Date: Tue, 14 Jul 2026 15:38:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Jaime Wren (Gerrit)

unread,
Jul 14, 2026, 12:46:49 PM (2 days ago) Jul 14
to Ben Konyi, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org
Attention needed from Ben Konyi

Jaime Wren added 2 comments

File pkg/dartdev/test/commands/flag_test.dart
Line 41, Patchset 1 (Latest): if (commandKey != 'debug_adapter') {
Ben Konyi . resolved

Should we consider making `debug_adapter` an alias for `debug-adapter` (https://pub.dev/documentation/args/latest/command_runner/Command/aliases.html)?

Jaime Wren

Done

Line 69, Patchset 1 (Latest): command.subcommands.forEach((String subKey, Command<int> subCommand) {
Ben Konyi . resolved

Nit: wouldn't this work?

```dart
command.subcommands.forEach(validateCommand);
```

Jaime Wren

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Ben Konyi
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I1b28e7c3bc8b858d021f92949d709ba72632155f
Gerrit-Change-Number: 523320
Gerrit-PatchSet: 1
Gerrit-Owner: Jaime Wren <jw...@google.com>
Gerrit-Reviewer: Ben Konyi <bko...@google.com>
Gerrit-Reviewer: Jaime Wren <jw...@google.com>
Gerrit-Attention: Ben Konyi <bko...@google.com>
Gerrit-Comment-Date: Tue, 14 Jul 2026 16:46:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ben Konyi <bko...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Ben Konyi (Gerrit)

unread,
Jul 15, 2026, 12:59:54 PM (12 hours ago) Jul 15
to Jaime Wren, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org
Attention needed from Jaime Wren

Ben Konyi voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Jaime Wren
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I1b28e7c3bc8b858d021f92949d709ba72632155f
Gerrit-Change-Number: 523320
Gerrit-PatchSet: 2
Gerrit-Owner: Jaime Wren <jw...@google.com>
Gerrit-Reviewer: Ben Konyi <bko...@google.com>
Gerrit-Reviewer: Jaime Wren <jw...@google.com>
Gerrit-Attention: Jaime Wren <jw...@google.com>
Gerrit-Comment-Date: Wed, 15 Jul 2026 16:59:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Jaime Wren (Gerrit)

unread,
Jul 15, 2026, 1:05:20 PM (12 hours ago) Jul 15
to Ben Konyi, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org

Jaime Wren voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I1b28e7c3bc8b858d021f92949d709ba72632155f
Gerrit-Change-Number: 523320
Gerrit-PatchSet: 2
Gerrit-Owner: Jaime Wren <jw...@google.com>
Gerrit-Reviewer: Ben Konyi <bko...@google.com>
Gerrit-Reviewer: Jaime Wren <jw...@google.com>
Gerrit-Comment-Date: Wed, 15 Jul 2026 17:05:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

dart-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

unread,
Jul 15, 2026, 1:34:06 PM (12 hours ago) Jul 15
to Jaime Wren, Ben Konyi, rev...@dartlang.org

dart-...@luci-project-accounts.iam.gserviceaccount.com submitted the change

Change information

Commit message:
[dartdev] Validate command names and check subcommands recursively

Enhances command formatting tests to enforce consistent naming styles and recursively validate subcommand descriptions and formats.
- Recursively checks all subcommand names and descriptions under DartdevRunner.
- Excludes commands that are not subclasses of DartdevCommand (such as package:pub or package:dart_style) to avoid enforcing custom conventions on foreign package integrations.
- Enforces kebab-case formatting on command names, maintaining `debug_adapter` as an explicit legacy exception.
Change-Id: I1b28e7c3bc8b858d021f92949d709ba72632155f
Reviewed-by: Ben Konyi <bko...@google.com>
Commit-Queue: Jaime Wren <jw...@google.com>
Files:
  • M pkg/dartdev/lib/src/commands/build.dart
  • M pkg/dartdev/lib/src/commands/debug_adapter.dart
  • M pkg/dartdev/test/commands/debug_adapter_test.dart
  • M pkg/dartdev/test/commands/flag_test.dart
Change size: M
Delta: 4 files changed, 86 insertions(+), 50 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Ben Konyi
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I1b28e7c3bc8b858d021f92949d709ba72632155f
Gerrit-Change-Number: 523320
Gerrit-PatchSet: 3
Gerrit-Owner: Jaime Wren <jw...@google.com>
Gerrit-Reviewer: Ben Konyi <bko...@google.com>
Gerrit-Reviewer: Jaime Wren <jw...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages