veracruz icon indicating copy to clipboard operation
veracruz copied to clipboard

Add build target for `cargo clippy` in Veracruz Makefile

Open dominic-mulligan-arm opened this issue 4 years ago • 2 comments

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.

dominic-mulligan-arm avatar Nov 06 '20 16:11 dominic-mulligan-arm

should this solve it now ?

Mo-Fatah avatar Apr 20 '22 11:04 Mo-Fatah

After being able to exclude dependencies from clippy warnings, I have a proposal for clippy in Veracruz

  1. Add clippy target to each Makefile in all workspaces. Each clippy target will scan only the members and relevant dependencies of the specified workspace. For example, running make clippy inside veracruz/workspaces/linux-host will generate only warnings for our dependencies and the members of the linux-host workspace excluding all external dependencies.

  2. Add clippy target to workspaces/Makefile, which will invoke all clippy targets in all workspaces.

  3. After making sure that our clippy targets are behaving as expected, I think Veracruz team should discuss our clippy configurations if there are any unnecessary rules

  4. Add clippy to our CI workflow. We can either

    • add it as an independent job that will invoke clippy targets in all workspaces
    • or add it as an included step in each job , and each job will invoke its clippy target from the corresponding Makefile

I made a PR here #419

Mo-Fatah avatar Apr 23 '22 02:04 Mo-Fatah

We have this

dreemkiller avatar Jun 21 '23 01:06 dreemkiller