[Virtio-fs] [virtiofsd-rs] MR opened: Fail CI when clippy warns
virtiofs-bot at sinrega.org
virtiofs-bot at sinrega.org
Wed Apr 21 17:13:56 UTC 2021
Hi,
Clippy is part of our CI, but its warnings are ignored, because it does not exit with a non-zero status when there are only warnings (but no errors). Considering that rustfmt is part of our CI, too, I believe clippyâs warnings should count as errors for the CI.
Iâm not sure, though, so perhaps this merge request is in fact not something that we really want. One problem I can see is that clippyâs warnings seem to differ between versions quite starkly, so it may happen that clippy gets a new warning and suddenly all new merge requests fail even though itâs not their fault. Another problem may be that people donât always agree with clippy, but, well, I also often disagree with rustfmt, but itâs still part of the CI, so.
As far as Iâm aware, the simplest way to make clippy fail on warnings is to pass `-Dwarnings` to `cargo clippy`, so this is what patch 2 does.
Patch 1 fixes all but one of the warnings Iâm currently aware of. That one warning it doesnât fix occurs in src/main.rs (src/main.rs:386, that should be a `.map(|rules| ...)` instead of a `match { Some(rules) => ... }`), but that piece of code is dropped by merge request 17, and the gitlab clippy doesnât complain about it (I hope...), so I see no need to touch it here.
---
https://gitlab.com/virtio-fs/virtiofsd-rs/-/merge_requests/23
More information about the Virtio-fs
mailing list