rust-lang / rust-lang/rust-clippy

Clippy links to `master` instead of actual version

Open
#4,167 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

Hello everyone,

whenever Clippy suggests a change, it links to further information on its website.
However the link always directs to master, hence if a lint-name changes, the link becomes invalid.

One example is cognitive_complexity.

We can find it on master: https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity
But not on v0.0.212, as there seems to be a name-change: https://rust-lang.github.io/rust-clippy/v0.0.212/index.html#cyclomatic_complexity

It once linked me: https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity
To no success obviously.

It would be great if Clippy would link to the correct version. E.g. v0.0.212 links to https://rust-lang.github.io/rust-clippy/v0.0.212
I would be willingly to contribute this change too!

Thanks for your time, keep the great work up : )

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no file or test. Start by locating the code that constructs Clippy's lint-help links, then compare its generated URL with the versioned Clippy documentation for the reported example. Done means a v0.0.212 link points to that version rather than master, including the renamed lint target.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.