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 should ignore things which just contain acronyms #1136

Open
Manishearth opened this issue Aug 5, 2016 · 4 comments
Open

doc_markdown should ignore things which just contain acronyms #1136

Manishearth opened this issue Aug 5, 2016 · 4 comments
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages good-first-issue These issues are a good way to get started with Clippy

Comments

@Manishearth
Copy link
Member

Instead of needing to manually whitelist, we should ignore things like DirectX and OpenGL. For something to be camel case, it should have at least two camelcase words in it, each which have at least one lowercase letter.

@mcarton mcarton added good-first-issue These issues are a good way to get started with Clippy C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages labels Aug 17, 2016
@gnzlbg
Copy link
Contributor

gnzlbg commented Jan 30, 2017

I have a crate where this warning is extremely annoying: https://github.com/gnzlbg/bitintr

The documentation is full of acronyms like x86_64, ARMv7, AMD, ... this warning trips up in extremely many files.

IMO the correct fix should be to only suggest putting something into `` when it is actually a type.

@mcarton
Copy link
Member

mcarton commented Jan 30, 2017

@gnzlbg

when it is actually a type.

Or a function, or a variant, or a mod, or… A this must be from any crate the project depends on.

Do you know that this lint is configurable?

@cauebs
Copy link
Contributor

cauebs commented Oct 25, 2020

@Manishearth That will still end up linting 15/39 of the current whitelist ("GitHub", "GitLab", "ClojureScript", "CoffeeScript", "JavaScript", "PureScript", "TypeScript", "NaNs", "OpenStreetMap", "TensorFlow", "TrueType", "LaTeX", "BibTeX", "BibLaTeX", "CamelCase"). It might be a step in the right direction, but what does it achieve effectively?

I could give this one a crack but I think first we have to figure out a decent heuristic. The current rule is not great, specially that it ignores things that end in 's' as if they're plural (what about DeviceBus?). I'm not keen on complicating this lint a lot more, though.

The idea of checking if the word is an identifier present in the crate (or module) or its dependencies sounds better. Is it feasible?

@Kinrany
Copy link

Kinrany commented Jun 17, 2022

Perhaps PascalCase words should have their own separate lint. It feels sufficiently more pedantic and less consequential than other parts of doc_markdown that actually protect Markdown rendering from being broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages good-first-issue These issues are a good way to get started with Clippy
Projects
None yet
Development

No branches or pull requests

6 participants