-
Notifications
You must be signed in to change notification settings - Fork 289
[ci] enable clippy #62
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
Conversation
95ab8a0
to
5fabb5a
Compare
I'm not sure that I want this, primarily because it targets Rust's unstable plugin API and is therefore prone to breakage. Case in point, this PR is failing because Clippy doesn't compile. I personally will get pretty annoyed pretty quickly if we can't merge PRs because of this. I also generally feel like most of the code in this crate is pretty simplistic, so the bang-to-buck ratio here isn't that great IMO. |
Clippy is currently broken on nightly. I've added An alternative could be to add some extra builds to travis and appveyor to just run clippy. That way it is easy to see if clippy is broken, and we can still merge PRs.
I've fixed some clippy errors locally but if I commit them would like to have somehow clippy enabled as a sanity test. |
I'm personally not a huge fan and I feel like an "essentially auto generated" crate such as this probably won't benefit too much? |
cb3b0a3
to
537ed6d
Compare
So I've fixed all the clippy warnings that I considered relevant, that is, some shifts by zero, a duplicated function in the runtime that felt through the code-review cracks, etc. I've silenced all of the lints that do not apply to this library, but I've also silenced one lint that I cannot fix right now but we should probably improve on ( Now I hope that travis marks this as green and let me know what you think. IMO it did not found a lot of issues, but it found some beginner issues. I think that if this doesn't break CI all the time (I've put it in an allow_failure build) maybe we can just "try our bests" to keep it green. |
8156e7b
to
7b83e03
Compare
@BurntSushi and @alexcrichton so I've documented all missing items and enabled the clippy lint. IMO PR's for intrinsics should require documentation, clippy will complain if this isn't the case. |
.travis.yml
Outdated
@@ -16,9 +16,14 @@ matrix: | |||
script: ci/run.sh | |||
- install: true | |||
script: ci/dox.sh | |||
|
|||
- env: CLIPPY=On TARGET=x86_64-unknown-linux-gnu NO_ADD=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the CLIPPY
env var isn't needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Er nvmd, this is needed to distinguish it in allow_failures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes that's right, I should add a comment, I did the same for the RUSTFMT=On variable, I just left it there so that one can tell the builds appart, maybe there is a better way to name the builds?
I'm personally not a huge fan of all the |
@alexcrichton me neither, AFAIK there isn't a way to specify which lints are allowed in the |
@llogiq any tips on how to set up clippy in CI ? |
I assume you are on nightly already. So, you should be able to I personally don't think it makes much sense to even let a successful clippy run break the build at the moment. We are still adding more lints, so even when there is no breakage, every new clippy might uncover new warnings. |
An advantage of the |
@BurntSushi I will update this once the formatting commit is merged, hope we can merge this as well. |
104917d
to
abb71f9
Compare
@alexcrichton I've rebased this :) |
Looks like CI may be failing? |
@alexcrichton done! |
Closes #110 .