Skip to content

Commit 8404b93

Browse files
Debug lint-docs
1 parent fba31bb commit 8404b93

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/tools/lint-docs/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ impl Level {
158158
impl<'a> LintExtractor<'a> {
159159
/// Collects all lints, and writes the markdown documentation at the given directory.
160160
pub fn extract_lint_docs(&self) -> Result<(), Box<dyn Error>> {
161+
println!("[lint-docs] Gathering lints");
161162
let mut lints = self.gather_lints()?;
162163
for lint in &mut lints {
164+
println!("[lint-docs] Generating output for {}", lint.name);
163165
self.generate_output_example(lint).map_err(|e| {
164166
format!(
165167
"failed to test example in lint docs for `{}` in {}:{}: {}",
@@ -170,9 +172,13 @@ impl<'a> LintExtractor<'a> {
170172
)
171173
})?;
172174
}
175+
println!("[lint-docs] Add renamed lints");
173176
add_renamed_lints(&mut lints);
177+
println!("[lint-docs] Save lints markdown");
174178
self.save_lints_markdown(&lints)?;
179+
println!("[lint-docs] Generate group docs");
175180
self.generate_group_docs(&lints)?;
181+
println!("[lint-docs] Done");
176182
Ok(())
177183
}
178184

src/tools/lint-docs/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ and are only modifying the doc comments to avoid rebuilding the compiler.
2222
}
2323

2424
fn doit() -> Result<(), Box<dyn Error>> {
25+
println!("[lint-docs] Starting");
2526
let mut args = std::env::args().skip(1);
2627
let mut src_path = None;
2728
let mut out_path = None;
@@ -91,7 +92,7 @@ fn doit() -> Result<(), Box<dyn Error>> {
9192
if rustc_target.is_none() {
9293
return Err("--rustc-target must be specified to the rustc target".into());
9394
}
94-
let le = lint_docs::LintExtractor {
95+
let mut le = lint_docs::LintExtractor {
9596
src_path: &src_path.unwrap(),
9697
out_path: &out_path.unwrap(),
9798
rustc_path: &rustc_path.unwrap(),
@@ -101,5 +102,6 @@ fn doit() -> Result<(), Box<dyn Error>> {
101102
verbose,
102103
validate,
103104
};
105+
le.verbose = true;
104106
le.extract_lint_docs()
105107
}

0 commit comments

Comments
 (0)