Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc_markdown suggests backticks for text that is not an identifier #13097

Closed
leighmcculloch opened this issue Jul 15, 2024 · 1 comment · Fixed by #13163
Closed

doc_markdown suggests backticks for text that is not an identifier #13097

leighmcculloch opened this issue Jul 15, 2024 · 1 comment · Fixed by #13163
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have

Comments

@leighmcculloch
Copy link

Summary

The doc_markdown lint suggested backticks for text that is not an identifier anywhere in the code file or in the workspace.

Lint Name

doc_markdown

Reproducer

I tried this code:

#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, clap::ValueEnum)]
pub enum OutputFormat {
    /// Colorful, human-oriented console output
    Pretty,
    /// Human-oriented console output without colors
    Plain,
    /// JSONified console output
    Json,
}

I saw this happen:

error: item in documentation is missing backticks
   --> cmd\soroban-cli\src\commands\events.rs:131:9
    |
131 |     /// JSONified console output
    |         ^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
    |
131 |     /// `JSONified` console output
    |         ~~~~~~~~~~~

Ref: https://github.com/stellar/stellar-cli/actions/runs/9933470510/job/27436261859?pr=1453

I expected to see this happen:

No warning, as the text "JSONified" doesn't refer to an identifier.

Version

1.79.0-x86_64-pc-windows-msvc installed - rustc 1.79.0 (129f3b996 2024-06-10)

Additional Labels

No response

@leighmcculloch leighmcculloch added C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have labels Jul 15, 2024
@GuillaumeGomez
Copy link
Member

Taking a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants