veracruz
veracruz copied to clipboard
Add build target for `cargo clippy` in Veracruz Makefile
At the moment we do not have support for the Clippy linter in the Veracruz Makefile. Some of Clippy's lint groups would be useful to check on the Veracruz codebase, especially those related to correctness, performance, and idiomatic Rust code style. In the past, I quickly experimented with Clippy on Veracruz but found that lint warnings in our code were swamped by warnings originating from our dependencies. Apparently, this cannot be turned off (see e.g. here). However, maybe this situation has changed, or maybe there's some way of filtering the lint warnings to produce warnings originating from only our code, or similar, which should be investigated.
should this solve it now ?
After being able to exclude dependencies from clippy
warnings, I have a proposal for clippy
in Veracruz
-
Add
clippy
target to eachMakefile
in all workspaces. Eachclippy
target will scan only themembers
and relevant dependencies of the specified workspace. For example, runningmake clippy
insideveracruz/workspaces/linux-host
will generate only warnings for our dependencies and the members of thelinux-host
workspace excluding all external dependencies. -
Add
clippy
target toworkspaces/Makefile
, which will invoke allclippy
targets in all workspaces. -
After making sure that our
clippy
targets are behaving as expected, I think Veracruz team should discuss ourclippy
configurations if there are any unnecessary rules -
Add
clippy
to our CI workflow. We can either- add it as an independent
job
that will invokeclippy
targets in all workspaces - or add it as an included
step
in eachjob
, and each job will invoke itsclippy
target from the correspondingMakefile
- add it as an independent
I made a PR here #419
We have this