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

CI: Add check to test for warnings/errors during building of rust docs #621

Closed
QuantumDancer opened this issue Jan 11, 2024 · 0 comments · Fixed by #691
Closed

CI: Add check to test for warnings/errors during building of rust docs #621

QuantumDancer opened this issue Jan 11, 2024 · 0 comments · Fixed by #691
Assignees
Labels
enhancement New feature or request

Comments

@QuantumDancer
Copy link
Contributor

In #619 I fixed a few error related to the rust docs. A code block was missing, resulting in improper formatting of the docs. However, building the docs threw a few warnings, e.g.:

warning: unresolved link to `gt`
   --> auditor/src/lib.rs:229:147
    |
229 | //! | `start_time` | Start time of the event (`DateTime<Utc>`)                              | `gt`, `gte`, `lt`, `lte`               | start_time[gt]=<timestamp>               |
    |                                                                                                                                                   ^^ no item named `gt` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
    = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default

warning: unresolved link to `gt`
   --> auditor/src/lib.rs:230:146
    |
230 | //! | `stop_time`  | Stop time of the event (`DateTime<Utc>`)                               | `gt`, `gte`, `lt`, `lte`               | stop_time[gt]=<timestamp>                |
    |                                                                                                                                                  ^^ no item named `gt` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `gt`
   --> auditor/src/lib.rs:231:144
    |
231 | //! | `runtime`    | Runtime of the event (in seconds)                                      | `gt`, `gte`, `lt`, `lte`               | runtime[gt]=<u64>                        |
    |                                                                                                                                                ^^ no item named `gt` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

We should add a CI check that tests if there are any warnings or errors when building the rust docs.
We need to set RUSTDOCFLAGS="-D warnings" (see this stack overflow thread) and then run cargo doc --workspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants