Add #[allow(clippy::*)] to all our macro-generated Rust code #1200
Labels
assigned
This issue has been assigned to a contributor
codegen
Issues related to emitting code at the end of the wasm-bindgen pipeline
good first issue
This is a good issue for people who have never contributed to wasm-bindgen before
help wanted
We could use some help fixing this issue!
What
Using
wasm-bindgen
withclippy
results in warnings like those reported in #1112 and like:You can test it out by installing clippy:
and then running clippy on
wasm-bindgen/examples/request-animation-frame
:This should print out warnings like
We would ideally like there to be zero clippy warnings in code generated by the
#[wasm-bindgen]
macro. (Note that tehre are unrelated clippy warnings in wasm-bindgen's general code base, which we are less interested in. The goal is to support folks using clippy on projects that use wasm-bindgen.)How to fix
In all the top-level items we create with the
quote! { ... }
macro inwasm-bindgen/crates/backend/src/codegen.rs
, we need to add#[allow(clippy::*)]
to the top-level item (function or static, etc...).The text was updated successfully, but these errors were encountered: