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

Clippy links to master instead of actual version #4167

Open
Lakelezz opened this issue Jun 2, 2019 · 4 comments
Open

Clippy links to master instead of actual version #4167

Lakelezz opened this issue Jun 2, 2019 · 4 comments

Comments

@Lakelezz
Copy link

Lakelezz commented Jun 2, 2019

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 : )

@mati865
Copy link
Contributor

mati865 commented Jun 2, 2019

The 0.0.212 is one year old and there is no plan to release Clippy versions because it's tied to Rust internals too much to make any sense.

IMO better solution would be to make old links redirect to the new one when lint is renamed.

@Manishearth
Copy link
Member

We need to completely overhaul the versioning here.

For now I think we should get rid of the old versions from the list and make the homepage redirect to /master, and then get it to deal with renames. After that, we can see if we can hook this up to rust's release system so that we get proper docs. Though I'm also fine with only maintaining docs for master.

@Lakelezz
Copy link
Author

Lakelezz commented Jun 2, 2019

The 0.0.212 is one year old and there is no plan to release Clippy versions because it's tied to Rust internals too much to make any sense.

Oh! I just checked on Github and yes, it really is a year old.
I was simply doing: cargo clippy --version and it gave me: clippy 0.0.212 (265318db 2019-05-17)
That caused me to think it was not too old.

Having no versions might make it hard to refer to a specific version then. If I use a certain toolchain version, am I guaranteed that everyone is using the same Clippy?

@Manishearth
Copy link
Member

Yeah so the clippy version is actually the Rust version (try rustc -V).. As long as everyone has the same rustc you will have the same Clippy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants