Running cargo clippy for code generated by proc-macro
⚓ Rust 📅 2025-05-26 👤 surdeus 👁️ 11Is there any way (even with cargo-expand) to run clippy on macro codegen?
In my project a lot of code is generated through proc-macro and currently the only way to analyze what happens inside is by manually running cargo-expand, stripping all unnecessary code and wrapping things in a test on which cargo clippy is then run.
As a side note, if somebody knows whether it is possible in IDE to expand proc-macros (I mostly use nvim with coc.nvim extension, but I can change LSP) or whether it is possible to feed cargo-expand output to the debugger (I usually use WinDbg, but I can switch), your advice is greatly appreciated!
2 posts - 2 participants
🏷️ rust_feed