Skip to content

clippy::doc_markdown fires on link with external URL #10302

@KisaragiEffective

Description

@KisaragiEffective

Summary

clippy::doc_markdown fires markdown link label even if it with external URL.

Lint Name

clippy::doc_markdown

Reproducer

I tried this code:

#![deny(clippy::doc_markdown)]
//! - [StackOverflow](https://stackoverflow.com)

(no other code - implies there's no struct StackOverflow or no enum StackOverflow)
I saw this happen:

error: item in documentation is missing backticks
 --> src/lib.rs:2:8
  |
2 | //! - [StackOverflow](https://stackoverflow.com)
  |        ^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
note: the lint level is defined here
 --> src/lib.rs:1:9
  |
1 | #![deny(clippy::doc_markdown)]
  |         ^^^^^^^^^^^^^^^^^^^^
help: try
  |
2 | //! - [`StackOverflow`](https://stackoverflow.com)
  |        ~~~~~~~~~~~~~~~

I expected to no error happen.

Version

rustc 1.69.0-nightly (f3126500f 2023-02-02)
binary: rustc
commit-hash: f3126500f25114ba4e0ac3e76694dd45a22de56d
commit-date: 2023-02-02
host: x86_64-unknown-linux-gnu
release: 1.69.0-nightly
LLVM version: 15.0.7

Additional Labels

@rustbot label +L-pedantic

Metadata

Metadata

Assignees

Labels

C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveL-pedanticLint: Belongs in the pedantic lint group

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions