- Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Description
Summary
If tabs exist before the asterisk of a multiline comment, clippy will flag it.
Lint Name
clippy::tabs_in_doc_comments
Reproducer
I tried this code:
mod clippy { /** * This comment is fine */ pub const I_LOVE_TABS: bool = true; }
I saw this happen:
warning: using tabs in doc comments is not recommended --> src/lib.rs:13:1 | 13 | * This comment is fine | ^^^^ help: consider using four spaces per tab | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default warning: using tabs in doc comments is not recommended --> src/lib.rs:14:1 | 14 | */ | ^^^^ help: consider using four spaces per tab | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments
I expected to see this happen:
Nothing should happen, the tabs are outside the comment.
Version
rustc 1.72.0 (5680fa18f 2023-08-23) binary: rustc commit-hash: 5680fa18feaa87f3ff04063800aec256c3d4b4be commit-date: 2023-08-23 host: x86_64-unknown-linux-musl release: 1.72.0 LLVM version: 16.0.5
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have