Skip to content

Files

Latest commit

 

History

History
34 lines (23 loc) · 595 Bytes

dangling_library_doc_comments.md

File metadata and controls

34 lines (23 loc) · 595 Bytes

Pattern: Dangling library doc comment

Issue: -

Description

Attach library doc comments (with ///) to library directives, rather than leaving them dangling near the top of a library.

Example of incorrect code:

/// This is a great library.
import 'package:math';
/// This is a great library.

class C {}

Example of correct code:

/// This is a great library.
library;

import 'package:math';

class C {}

Further Reading