rustdoc: add option to abort process on markdown differences
This commit is contained in:
parent
eff3de0927
commit
e766f60c44
2 changed files with 14 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue