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
clippytarget to eachMakefilein all workspaces. Eachclippytarget will scan only themembersand relevant dependencies of the specified workspace. For example, runningmake clippyinsideveracruz/workspaces/linux-hostwill generate only warnings for our dependencies and the members of thelinux-hostworkspace excluding all external dependencies. -
Add
clippytarget toworkspaces/Makefile, which will invoke allclippytargets in all workspaces. -
After making sure that our
clippytargets are behaving as expected, I think Veracruz team should discuss ourclippyconfigurations if there are any unnecessary rules -
Add
clippyto our CI workflow. We can either- add it as an independent
jobthat will invokeclippytargets in all workspaces - or add it as an included
stepin eachjob, and each job will invoke itsclippytarget from the correspondingMakefile
- add it as an independent
I made a PR here #419
We have this