Group: style

Maturity: stable

Dart SDK: >= 2.0.0 • (Linter v0.1.1)


View the Project on GitHub dart-lang/linter

DO provide doc comments for all public APIs.

As described in the pub package layout doc, public APIs consist in everything in your package's lib folder, minus implementation files in lib/src, adding elements explicitly exported with an export directive.

For example, given lib/foo.dart:

export 'src/bar.dart' show Bar;
export 'src/baz.dart';

class Foo { }

class _Foo { }

its API includes:

All public API members should be documented with /// doc-style comments.


/// A Foo.
abstract class Foo {
  /// Start foo-ing.
  void start() => _start();



class Bar {
  void bar();

Advice for writing good doc comments can be found in the Doc Writing Guidelines.