Skip to content

clippy::doc-markdown lints for PowerShell #16446

@epage

Description

@epage

Summary

PowerShell is the marketing name's case and there are legitimate reasons to have it present in documentation without backticks around it. Seems likely/common enough to be worth considering adding to the default allow list.

Lint Name

clippy::doc-markdown

Reproducer

I tried this code:

#![warn(clippy::doc_markdown)]

/// Note that to execute scripts in PowerShell on Windows,
enum Shells {
    PowerShell,
    Bash,
}
fn main() {}

I saw this happen:

warning: item in documentation is missing backticks
 --> src/main.rs:3:37
  |
3 | /// Note that to execute scripts in PowerShell on Windows, including [`$PROFILE`][$Profile]
  |                                     ^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#doc_markdown
note: the lint level is defined here
 --> src/main.rs:1:9
  |
1 | #![warn(clippy::doc_markdown)]
  |         ^^^^^^^^^^^^^^^^^^^^
help: try
  |
3 - /// Note that to execute scripts in PowerShell on Windows, including [`$PROFILE`][$Profile]
3 + /// Note that to execute scripts in `PowerShell` on Windows, including [`$PROFILE`][$Profile]
  |

I expected to see this happen:

Version

rustc 1.93.0 (254b59607 2026-01-19)
binary: rustc
commit-hash: 254b59607d4417e9dffbc307138ae5c86280fe4c
commit-date: 2026-01-19
host: x86_64-unknown-linux-gnu
release: 1.93.0
LLVM version: 21.1.8

Additional Labels

No response

Metadata

Metadata

Assignees

Labels

C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions