-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
A-lintArea: New lintsArea: New lints
Description
What it does
In the Linux kernel we had some documentation added with ///
instead of //!
, which meant the docs applied to a use
line and thus silently discarded.
Advantage
Documentation is not discarded silently.
Drawbacks
False positives when someone does want to document an item that follows. However, if it is something like a private use
, it is likely it was a mistake. Thus the lint should limit itself to such cases.
Example
Both
//! Title.
/// Long...
///
/// ...description.
use ...;
and
//! Title.
/// Long...
///
/// ...description.
use ...;
should probably have been written as
//! Title.
//!
//! Long...
//!
//! ...description.
use ...;
tylerlaprade
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lints