Skip to content

Rust Analyzer should be configured to disable specific rules on generated/expanded code #15978

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

Closed
irvingoujAtDevolution opened this issue Nov 27, 2023 · 3 comments
Labels
C-feature Category: feature request

Comments

@irvingoujAtDevolution
Copy link

When using wasm_bindgen, sometimes there are generated code that does not follow the naming convention, however, it is not necessary to check the naming conventions of generated code.
image

@irvingoujAtDevolution irvingoujAtDevolution added the C-feature Category: feature request label Nov 27, 2023
@irvingoujAtDevolution irvingoujAtDevolution changed the title Rust Analyzer should be configured to disable rules on generated/expanded code Rust Analyzer should be configured to disable specific rules on generated/expanded code Nov 27, 2023
@lnicola
Copy link
Member

lnicola commented Nov 27, 2023

Duplicate of #15344.

@lnicola lnicola closed this as completed Nov 27, 2023
@irvingoujAtDevolution
Copy link
Author

Duplicate of #15344.

Hi there, I think my request is slightly different from what this person mentioned in his bug report. I think it should be, in general, give user the power to turn off certain checks in macro expanded code. As naming conventions in generated code seems a bit unnecessary.

@lnicola
Copy link
Member

lnicola commented Nov 27, 2023

Even if you could turn them off in RA, cargo check and cargo build would still warn, so you'd need an #[allow] somewhere. And if you have that and we respect it, there's no need for a separate setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature request
Projects
None yet
Development

No branches or pull requests

2 participants