Skip to content

Commit

Permalink
xtask: Make broken doc links or other doc lint into errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Jul 24, 2024
1 parent 656232e commit a804503
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/xtask/src/xtask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ enum XtaskCommand {
no_run: bool,
},

/// Compile and report warnings without testing.
/// Check for lint and generate documentation, but do not test.
///
/// Caution: If there are rustc or clippy warnings only, the exit code is still zero.
/// <https://github.com/rust-lang/rust-clippy/issues/1209>
Lint,

/// Format code (as `cargo fmt` but covering all packages)
Expand Down Expand Up @@ -201,7 +204,7 @@ fn main() -> Result<(), ActionError> {
// libraries with docs elsewhere.
if config.scope.includes_main_workspace() {
let _t = CaptureTime::new(&mut time_log, "doc");
cargo().arg("doc").run()?;
cargo().env("RUSTDOCFLAGS", "-Dwarnings").arg("doc").run()?;
}
}
XtaskCommand::Fmt => {
Expand Down

0 comments on commit a804503

Please sign in to comment.