-
Notifications
You must be signed in to change notification settings - Fork 770
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
Cargo Clippy Triggers Warning from #[pallet::call]
#5697
Comments
Should be fixed by: #5676 |
I opened an issue a year ago about the same problem: #163, which is more about allowing parachain teams to define their own set of linting rules they want to meet, and the generated code from the SDK should not get in the way. I was trying to work on a PR to address this. @bkchr would this require us to use a specific Rust version? Or could it work for older versions, e.g., 1.74? Regardless of the polkadot-sdk version we would be based on, if simply cherry-picking the fix to an older branch could work, that would be great. |
Sounds reasonable to me. I mean in the best case these macros should not generate any warning at all in no clippy configuration. |
One example for all: https://github.com/KILTprotocol/polkadot-sdk/blob/4aa29a41cf731b8181f03168240e8dedb2adfa7a/substrate/frame/support/procedural/src/pallet/expand/pallet_struct.rs#L237. If we want to forbid any use of any constructs that can panic, including |
There is probably no way around putting the "allow(all)" everywhere it is needed. IMO the best would also be to fix the issues clippy reports as best as we can. |
Going to close this. Errors went away when i bumped to stable2409: |
Ideally such warnings would not be produced by macro code.
The text was updated successfully, but these errors were encountered: