1
Fork 0

rustdoc: add option to abort process on markdown differences

This commit is contained in:
QuietMisdreavus 2017-12-20 10:20:01 -06:00
parent eff3de0927
commit e766f60c44
2 changed files with 14 additions and 2 deletions

View file

@ -495,7 +495,8 @@ pub fn run(mut krate: clean::Crate,
css_file_extension: Option<PathBuf>,
renderinfo: RenderInfo,
render_type: RenderType,
sort_modules_alphabetically: bool) -> Result<(), Error> {
sort_modules_alphabetically: bool,
deny_render_differences: bool) -> Result<(), Error> {
let src_root = match krate.src {
FileName::Real(ref p) => match p.parent() {
Some(p) => p.to_path_buf(),
@ -659,6 +660,11 @@ pub fn run(mut krate: clean::Crate,
render_difference(d, &mut intro_msg, span, text);
}
}
if deny_render_differences {
println!("Aborting with {} rendering differences", markdown_warnings.len());
::std::process::exit(1);
}
}
result