dangling-library-doc-comments
Same as dangling_library_doc_comments in Dart lints
- Group
- Style
- Path
lint/style/dangling-library-doc-comments- Default
- On (recommended)
- Origin
- Dart lints
- Rule
- 214 of 512
Attach library documentation to an explicit library directive.
Line docs stay grouped across blank lines and ordinary comments; declarations
report the doc token immediately before the first internal gap.
Invalid
/// A library-level doc comment separated from the code below.
import 'dart:async';
void main() {}/// A library-level doc comment separated from the code below.Valid
/// A widget that documents the class directly below it.
// An ordinary comment does not detach the documentation.
class Widget {}Configure dangling-library-doc-comments
Set its severity in falcon.json. See the configuration guide.
{
"linter": {
"rules": {
"style": {
"dangling-library-doc-comments": "error"
}
}
}
}Or silence one occurrence with a suppression comment; the reason is required.
// falcon-ignore lint/style/dangling-library-doc-comments: <reason>More style rules
- deprecated-consistency
deprecated_consistencyrecommendedFlags deprecations that are not carried through to related declarations.
- directives-ordering
directives_orderingFlags import and export directives that break the Effective Dart ordering.
- do-not-use-environment
do_not_use_environmentDisallow reading compilation environment declarations, including type aliases.
- double-literal-format
double-literal-formatFlags double literals written with redundant or missing digits.
- empty-constructor-bodies
empty_constructor_bodiesrecommendedFlags constructors with an empty block body
{}. - enum-constants-ordering
Flags enum constants whose declared names violate the configured order.
- eol-at-end-of-file
eol_at_end_of_filerecommendedFlags a non-empty file that does not end with exactly one line break.
- extend-equatableequatable
Require Equatable semantics for configured class/file name patterns.