Skip to content

Commit 32f3a40

Browse files
committed
Migrate the extra_checks check to diagnostics
1 parent ace641c commit 32f3a40

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

src/tools/tidy/src/extra_checks/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ use std::str::FromStr;
2424
use std::{fmt, fs, io};
2525

2626
use crate::CiInfo;
27+
use crate::diagnostics::DiagCtx;
2728

2829
mod rustdoc_js;
2930

@@ -54,8 +55,10 @@ pub fn check(
5455
bless: bool,
5556
extra_checks: Option<&str>,
5657
pos_args: &[String],
57-
bad: &mut bool,
58+
diag_ctx: DiagCtx,
5859
) {
60+
let mut check = diag_ctx.start_check("extra_checks");
61+
5962
if let Err(e) = check_impl(
6063
root_path,
6164
outdir,
@@ -68,7 +71,7 @@ pub fn check(
6871
extra_checks,
6972
pos_args,
7073
) {
71-
tidy_error!(bad, "{e}");
74+
check.error(e);
7275
}
7376
}
7477

src/tools/tidy/src/main.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -170,20 +170,20 @@ fn main() {
170170
)
171171
};
172172
check!(unstable_book, &src_path, collected);
173-
//
174-
// check!(
175-
// extra_checks,
176-
// &root_path,
177-
// &output_directory,
178-
// &ci_info,
179-
// &librustdoc_path,
180-
// &tools_path,
181-
// &npm,
182-
// &cargo,
183-
// bless,
184-
// extra_checks,
185-
// pos_args
186-
// );
173+
174+
check!(
175+
extra_checks,
176+
&root_path,
177+
&output_directory,
178+
&ci_info,
179+
&librustdoc_path,
180+
&tools_path,
181+
&npm,
182+
&cargo,
183+
bless,
184+
extra_checks,
185+
pos_args
186+
);
187187
});
188188

189189
if diag_ctx.into_conclusion() {

0 commit comments

Comments
 (0)