Skip to content
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

add #[allow(rustdoc::broken_intra_doc_links)] to subxt-codegen #998

Merged
merged 3 commits into from
Jun 5, 2023

Conversation

StackOverflowExcept1on
Copy link
Contributor

We are developing gear protocol and have decided to enable flag that will convert all warnings to errors when the link in a document comment does not exist.

I think it makes sense to add this attribute in order not to get warnings when building documentation.
The cargo doc warning looks like this and it comes from the code generated by subxt-codegen

warning: unresolved link to `IdentityInfo`
    --> gsdk/src/metadata/generated.rs:2590:21
     |
2590 | /                     #[doc = "Provide a judgement for an account's identity."]
2591 | |                     #[doc = ""]
2592 | |                     #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"]
2593 | |                     #[doc = "of the registrar whose index is `reg_index`."]
...    |
2605 | |                     #[doc = "  - where `R` registrar-count (governance-bounded)."]
2606 | |                     #[doc = "  - where `X` additional-field-count (deposit-bounded and code-bounded)."]
     | |_______________________________________________________________________________________________________^
     |
     = note: the link appears in this line:
             
             - `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided.
                                            ^^^^^^^^^^^^^^
     = note: no item named `IdentityInfo` in scope
     = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
     = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default

@StackOverflowExcept1on StackOverflowExcept1on requested a review from a team as a code owner June 3, 2023 06:47
@cla-bot-2021
Copy link

cla-bot-2021 bot commented Jun 3, 2023

User @StackOverflowExcept1on, please sign the CLA here.

Copy link
Collaborator

@jsdw jsdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[edit: whoops, commented rather than commited!]

@jsdw
Copy link
Collaborator

jsdw commented Jun 5, 2023

I'm ok with this being added to the codegen since it is likely to be a common case; I just added it to the "main" codegen path, too.

@jsdw jsdw merged commit 1ad9a20 into paritytech:master Jun 5, 2023
@jsdw jsdw mentioned this pull request Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants