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 cargo doc warning lint to github actions #3150

Closed
A-Walrus opened this issue Jul 22, 2022 · 0 comments · Fixed by #3650
Closed

Add cargo doc warning lint to github actions #3150

A-Walrus opened this issue Jul 22, 2022 · 0 comments · Fixed by #3650
Labels
A-documentation Area: Documentation improvements C-enhancement Category: Improvements

Comments

@A-Walrus
Copy link
Contributor

Describe your feature request

Currently running cargo doc --document-private-items on the master branch of helix results in 5 warnings:

warning: unresolved link to `AddedIndent`
   --> helix-core/src/indent.rs:436:40
    |
436 | /// Each of these nodes produces some [AddedIndent] for:
    |                                        ^^^^^^^^^^^ no item named `AddedIndent` in scope
    |
    = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `IndentResult`
   --> helix-core/src/indent.rs:444:10
    |
444 | /// The [IndentResult] is simply the sum of the [AddedIndent] for all lines.
    |          ^^^^^^^^^^^^ no item named `IndentResult` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `AddedIndent`
   --> helix-core/src/indent.rs:444:50
    |
444 | /// The [IndentResult] is simply the sum of the [AddedIndent] for all lines.
    |                                                  ^^^^^^^^^^^ no item named `AddedIndent` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `AddedIndent`
   --> helix-core/src/indent.rs:446:39
    |
446 | /// Specifying which line exactly an [AddedIndent] applies to is important because indents on the same line combine differently than inde...
    |                                       ^^^^^^^^^^^ no item named `AddedIndent` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: `helix-core` (lib doc) generated 4 warnings
 Documenting helix-term v0.6.0 (/home/guy/Documents/Programming/Rust/Forks/helix/helix-term)
    Checking helix-term v0.6.0 (/home/guy/Documents/Programming/Rust/Forks/helix/helix-term)
warning: this URL is not a hyperlink
   --> helix-term/src/ui/prompt.rs:103:21
    |
103 |     /// Taken from: https://github.com/wez/wezterm/blob/e0b62d07ca9bf8ce69a61e30a3c20e7abc48ce7e/termwiz/src/lineedit/mod.rs#L516-L611
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://github.com/wez/wezterm/blob/e0b62d07ca9bf8ce69a61e30a3c20e7abc48ce7e/termwiz/src/lineedit/mod.rs#L516-L611>`
    |
    = note: `#[warn(rustdoc::bare_urls)]` on by default
    = note: bare URLs are not automatically turned into clickable links

warning: `helix-term` (lib doc) generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 6.31s

One error is a URL not formatted as an automatic link, and the rest are due to out of date documentation referencing structs that don't exist anymore.
Having an automatic lint could help prevent this

@A-Walrus A-Walrus added the C-enhancement Category: Improvements label Jul 22, 2022
@sudormrfbin sudormrfbin added the A-documentation Area: Documentation improvements label Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: Documentation improvements C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants