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-valid-idents in clippy.toml being ignored #8145

Closed
Kage-Yami opened this issue Dec 19, 2021 · 3 comments
Closed

doc-valid-idents in clippy.toml being ignored #8145

Kage-Yami opened this issue Dec 19, 2021 · 3 comments
Labels
C-an-interesting-project Category: Interesting projects, that usually are more involved design/code wise. C-bug Category: Clippy is not doing the correct thing E-hard Call for participation: This a hard problem and requires more experience or effort to work on

Comments

@Kage-Yami
Copy link

Kage-Yami commented Dec 19, 2021

Summary

I'm attempting to add a new element to doc-valid-idents in clippy.toml to ignore a GitHub username, but it doesn't seem to be taking any effect, as clippy:doc_markdown still flags it.

Reproducer

I tried this code:

// ./src/lib.rs
#![warn(clippy::doc_markdown)]

/// TruePikachu
mod example {}
# ./clippy.toml
doc-valid-idents = [
    # defaults
    "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "DirectX", "ECMAScript", "GPLv2", "GPLv3", "GitHub", "GitLab", "IPv4", "IPv6",
    "ClojureScript", "CoffeeScript", "JavaScript", "PureScript", "TypeScript", "NaN", "NaNs", "OAuth", "GraphQL", "OCaml", "OpenGL",
    "OpenMP", "OpenSSH", "OpenSSL", "OpenStreetMap", "OpenDNS", "WebGL", "TensorFlow", "TrueType", "iOS", "macOS", "FreeBSD", "TeX",
    "LaTeX", "BibTeX", "BibLaTeX", "MinGW", "CamelCase",
    # custom
    "TruePikachu"
]

I expected to see this happen:

> cargo clippy
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s

Instead, this happened:

> cargo clippy
warning: you should put `TruePikachu` between ticks in the documentation
  --> src\lib.rs:14:5
   |
14 | /// TruePikachu
   |     ^^^^^^^^^^^
   |
note: the lint level is defined here
  --> src\lib.rs:12:9
   |
12 | #![warn(clippy::doc_markdown)]
   |         ^^^^^^^^^^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown

warning: `terraria-minimap-viewer` (lib) generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 0.39s

Version

rustc 1.57.0 (f1edd0429 2021-11-29)
binary: rustc
commit-hash: f1edd0429582dd29cccacaf50fd134b05593bd9c
commit-date: 2021-11-29
host: x86_64-pc-windows-msvc
release: 1.57.0
LLVM version: 13.0.0

Additional Labels

No response

@Kage-Yami Kage-Yami added the C-bug Category: Clippy is not doing the correct thing label Dec 19, 2021
@Kage-Yami
Copy link
Author

Kage-Yami commented Dec 19, 2021

Oh. It's working now after I nuked ./target. So perhaps this could instead be a suggestion to tweak the README to add a comment that cached compilation artifacts can result in false positives if the config is added after the lint originally triggers?

@xFrednet
Copy link
Member

xFrednet commented Dec 19, 2021

Thanks for the report, caching currently sadly ignores changes to the configuration. This is the second issue I've seen on the topic. It might be good to document this in the readme until it is fixed 👍. Would you like to do that?

I'll also add some labels related to fixing the actual underlying issue, of the cache ignoring configuration changes. I'm uncertain if it's really hard, but it will most likely require a bit more work maybe also in different repos 🙃

@xFrednet xFrednet added C-an-interesting-project Category: Interesting projects, that usually are more involved design/code wise. E-hard Call for participation: This a hard problem and requires more experience or effort to work on labels Dec 19, 2021
@Alexendoo
Copy link
Member

Fixed by #9707

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-an-interesting-project Category: Interesting projects, that usually are more involved design/code wise. C-bug Category: Clippy is not doing the correct thing E-hard Call for participation: This a hard problem and requires more experience or effort to work on
Projects
None yet
Development

No branches or pull requests

3 participants