31.43 Flutter Lint Dangling Library Doc Comments

20220202

The lint rule dangling_library_doc_comments warns about library doc-comments (those that begin with three slashes ///) that do not belong to the imports or first block of code (the first declaration).

Historically the dart doc tool automatically treated the document comments as a library comment on coming across the first import in the file. If there were no imports though, the comment became a comment on the first declaration of the library, meaning that the comment was not shown as a library documentation.

A dart fix will automatically fix this issue. By adding the library; directive after the header batch of doc comments (///) the comments are attached to the library’s documentation.



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0