google/dart-neats

Feature request: formatting for dartdoc_test

Open

#253 opened on Sep 2, 2024

View on GitHub
 (0 comments) (2 reactions) (0 assignees)Dart (93 forks)auto 404
help wantedpkg:dartdoc_test

Repository metrics

Stars
 (508 stars)
PR merge metrics
 (PR metrics pending)

Description

It would be awesome to have:

A command for running dart format across the text of the code samples. (That would modify the code inside the comments)

> dart run dartdoc_test format
Formatted 2 files (1 changed) in 0.10 seconds.

Changes:

/// This class is excellent
/// ```dart
/// void main() {
/// foo();
/// }
/// ```
class Foo {}

to

/// This class is excellent
/// ```dart
/// void main() {
///   foo();
/// }
/// ```
class Foo {}

And also having a test that validates that formatting is done.

And a separate

Contributor guide