bottlerocket
bottlerocket copied to clipboard
Fail `cargo make build` if clippy / linter checks fail
What I'd like:
From a discussion in a previous community meeting, it would be nice to have builds fail if the lint checks fail - in theory, anything that is on the tip of develop
should be a fully passing build and pass linters. Any changes that are being made which don't conform with the checks would fail, indicating it's not ready for review.
However, we don't want to make the buildtimes extra long - since we'd be invoking cargo
several times, we run into the problem of essentially doing multiple builds (may be good to get @bcressey's ideas on this). One idea is to somehow link builds across jobs to prevent multiple builds.
Any alternatives you've considered:
- Don't fail on clippy / lint / formatting problems. Contributors can have an easier time going from a change they're trying to make to and actual build. Further, simple formatting changes may not indicate that a build is unable to work. I.e., not doing this enables people making changes to keep making changes fast.
- Add an extra make target. Maybe something like
cargo make safe-build
orcargo make check-build
which invokes checking and building.