Run clippy in the CI with warnings disallowed; address most warnings#1412
Run clippy in the CI with warnings disallowed; address most warnings#1412MarijnS95 merged 4 commits intorust-windowing:masterfrom
Conversation
6ca97fc to
f077c8e
Compare
07b83e6 to
2d3236c
Compare
|
Looks like That raises the question: is it desired to run So for now this PR will only run |
|
Running on nightly doesn't make much sense, except if the target requires nightly for whatever reason. Just stable is enough, I guess. |
|
Doing that now, and all checks succeed 🎉 - what's your thought about getting the other PRs and this one in? |
11f0fd9 to
9a62def
Compare
|
@kchibisov What would be the advantage of those annotations? I personally don't like disallowing all clippy warnings during development, it doesn't allow contributors to compile code when perhaps having one or two testing variables / functions commented out. Secondly, what's the advantage of disallowing normal |
I mean that with those two you can compile normally, but when you run clippy everything errors out. The intention is to error out on clippy, while allowing checks/builds to throw warnings as usual.
That's what we're using in alacritty for years. Basically it means: "when running clippy, treat all rustc warnings as errors". |
Right, yes. I use Strangely enough it seems to be fine now, without those commits 🤷
Ack, understood. I have previously seen but forgot that Do you mind if I leave
Do you mind if I leave this? In the hypothetical case that a new crate is added? Otherwise this should also be added to every binary (test/example) target. I think that's the downside of this approach: having to add it to every target and not forgetting it on new targets. IMHO it's fine for users to push and open a PR, and address remaining lints after the fact. They usually won't (be able to) test/lint against every target / feature combination anyway. If they run |
That's fine. You can go ahead. |
|
@kchibisov I think I did that in the last push, would you mind re-reviewing this now? What's your suggestion on the |
|
@MarijnS95 sharing is also failing for me. It could be failing that way for a long time on Wayland, and I won't be surprised. Not sure that we should bother with it here since it's not something new. |
|
@kchibisov Perfect, let's go for it then. If you can review this once more and approve it, I'll fix the conflict and re-push! |
kchibisov
left a comment
There was a problem hiding this comment.
Just a small nits I've found after re-review.
|
Nice catch, I hadn't spotted that one in the automatic |
Depends on #1413 + #1408.
This is a draft mainly to look at how
cargo clippy --fixand myself have addressed warnings for most issues. There are still a few remaining, and clippy found some odd/fishy things we should look into.sharingexample (doesn't run at all, but has nontrivialclippywarnings);cargo fmthas been run on this branchcargo docbuilds successfullyCHANGELOG.mdif knowledge of this change could be valuable to users