Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint Rust demos with clippy #908

Open
Hofer-Julian opened this issue Feb 15, 2024 · 1 comment
Open

Lint Rust demos with clippy #908

Hofer-Julian opened this issue Feb 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Hofer-Julian
Copy link
Contributor

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
@Hofer-Julian Hofer-Julian added the enhancement New feature or request label Feb 15, 2024
@sonnyp
Copy link
Contributor

sonnyp commented Feb 15, 2024

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.

@sonnyp sonnyp transferred this issue from workbenchdev/demos Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants