Skip to content

dartdoc_test with a main that is not void fails  #251

@sigurdm

Description

@sigurdm

Both this:

/// This class is excellent
/// ```dart
/// Future<void> main() {
///  print('hi');
/// }
/// ```
class Foo {}

and

/// This class is excellent
/// ```dart
/// main() {
///  print('hi');
/// }
/// ```
class Foo {}

reports

> dart test
00:01 +0: loading test/dartdoc_test.dart                                                                                       Extracting code samples ...
Analyzing code samples ...
00:02 +0 -1: test/dartdoc_test.dart: [dartdoc_test] lib/abc.dart test for main [E]                                             
  package:ddt/abc.dart:3:18: : The declaration 'main' isn't referenced.
    ╷
  3 │ /// Future<void> main() {
    │                  ^^^^
    ╵
  package:matcher                                fail
  package:dartdoc_test/src/reporter.dart 163:13  _RepoterForTest._reportIssue.<fn>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions