RIIR update_lints: Update changelog links

This now also updates the link list at the bottom of the changelog.
This commit is contained in:
Philipp Hansch
2018-10-17 08:18:05 +02:00
parent 284c63e84d
commit 9f3ac4e5a3
2 changed files with 41 additions and 3 deletions

View File

@@ -59,8 +59,8 @@ fn print_lints() {
}
fn update_lints() {
let lint_list = gather_all();
let usable_lints: Vec<Lint> = Lint::usable_lints(lint_list).collect();
let lint_list: Vec<Lint> = gather_all().collect();
let usable_lints: Vec<Lint> = Lint::usable_lints(lint_list.clone().into_iter()).collect();
let lint_count = usable_lints.len();
replace_region_in_file(
@@ -74,4 +74,12 @@ fn update_lints() {
]
}
);
replace_region_in_file(
"../CHANGELOG.md",
"<!-- begin autogenerated links to lint list -->",
"<!-- end autogenerated links to lint list -->",
false,
|| { gen_changelog_lint_list(lint_list.clone()) }
);
}