4

I tried using the #![warn(missing_docs)] macro to check for missing documentation in my pallet, but when running clippy it complains about some pallet macros

warning: missing documentation for a struct
   --> frame/clearing-house/src/lib.rs:128:12
    |
128 |       #[pallet::storage]
    |  _______________^
129 | |     /// Supported collateral asset ids
130 | |     pub type CollateralTypes<T: Config> = StorageMap<_, Twox64Concat, AssetIdOf<T>, ()>;
    | |_______^

even though I documented the type declaration. Is there a fix for this? Or is it not worth using the #![warn(missing_docs)] at all?

1 Answer 1

3

this was a result of a bug in the pallet macro. It was generating functions that are internal usage and didn't hide them for the docs. This should now be fixed after https://github.com/paritytech/substrate/pull/11075 this is merged.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.