rivosinc / salus

Risc-V hypervisor for TEE development
92 stars 25 forks source link

build: Treat unit tests warnings as errors #312

Closed sboeuf closed 1 year ago

sboeuf commented 1 year ago

Turn on the rustc flag -Dwarnings for all bazel rust tests so that all warnings would show up as errors.

Fixes #309

sboeuf commented 1 year ago

/cc @rbradford I think this is fixing #309 :)

rbradford commented 1 year ago

/cc @rbradford I think this is fixing #309 :)

Although this is definitely an improvement - catching errors in the test build. I don't think it is the equivalent of cargo clippy --tests as this make clippy cover the test code?

sboeuf commented 1 year ago

/cc @rbradford I think this is fixing #309 :)

Although this is definitely an improvement - catching errors in the test build. I don't think it is the equivalent of cargo clippy --tests as this make clippy cover the test code?

Well I know this is different but this is eventually reaching the same goal of "not allowing warnings to be missed".

rbradford commented 1 year ago

/cc @rbradford I think this is fixing #309 :)

Although this is definitely an improvement - catching errors in the test build. I don't think it is the equivalent of cargo clippy --tests as this make clippy cover the test code?

Well I know this is different but this is eventually reaching the same goal of "not allowing warnings to be missed".

This is definitely an improvement but it doesn't solve #309 which is about clippy not covering the tests as clippy warns about things that rustc doesn't.

dgreid commented 1 year ago

Thanks, I merged this, then reopened 309.