Workbench
Workbench copied to clipboard
Lint Rust demos with clippy
One thing that would be good to have is to check all Rust demos with clippy.
Clippy both ensures that they build correctly, but also acts as a linter.
Looking at the code it seems like we currently lint with language servers.
That is possible with rust-analyzer, but it's also wasteful compared to just running cargo clippy directly.
What I think should be done:
- Loop through each demo
- Copy all relevant Rust files into the demo
- Run cargo clippy (make sure that target dir is set correctly)
- Remove copied Rust files again
The reason we use the LSP to lint is to guarantee 100% compat with Workbench.
It prevents shipping demos that have errors or warnings once users open them in Workbench. Think of it as headless Workbench.
Eventually we might even open a full Workbench session for each single demo anyway in order to do UI automation tests and screenshot tests.