-
Notifications
You must be signed in to change notification settings - Fork 1k
Add rustdoc CI check #5038
Copy link
Copy link
Closed
Labels
E-help-wantedCall for participation: help is requested to fix this issueCall for participation: help is requested to fix this issuegood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributors
Metadata
Metadata
Assignees
Labels
E-help-wantedCall for participation: help is requested to fix this issueCall for participation: help is requested to fix this issuegood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributors
Type
Fields
Give feedbackNo fields configured for issues without a type.
Now that the builds in rust-lang/rust are documenting rustfmt as well (rust-lang/rust#87119), we should update our build process to ensure we're not introducing anything that will trigger warnings since such warnings will be hard errors in rust-lang/rust, and they won't show until bors tests the changes (refs rust-lang/rust#90087)
Other than this check needing to be added as part of a GitHub Actions workflow and executed on PRs, it doesn't really matter to me which file the job is defined within nor how it's implemented.
We won't be able to run it exactly the same in our CI as it's executed in rust-lang/rust CI, but should be able to get sufficiently close. The specific args/flags utilized in the compiler build can be derived from here
Note that the rustdoc flags can be provided as an environment variable (e.g.
RUSTDOCFLAGS="--document-private items..."), and be sure to include-D warningsto match the behavior in the compiler builds. Other than that the command should be something simple along the lines ofcargo doc -p rustfmt-nightly -p rustfmt-config_proc_macro` along with the rest of the other flags/args