mirror of
https://github.com/rust-unofficial/awesome-rust
synced 2024-11-24 21:03:25 +00:00
Add warning about bad hyphens
This commit is contained in:
parent
abf2de763f
commit
06f16fa491
1 changed files with 3 additions and 0 deletions
|
@ -584,6 +584,9 @@ async fn main() -> Result<(), Error> {
|
|||
return Err(format_err!("Not high enough metrics ({:?} stars < {}, and {:?} cargo downloads < {}): {}", github_stars, required_stars, cargo_downloads, MINIMUM_CARGO_DOWNLOADS, list_item));
|
||||
}
|
||||
if link_count > 0 && !ITEM_REGEX.is_match(&list_item) {
|
||||
if list_item.contains("—") {
|
||||
warn!("\"{list_item}\" uses a '—' hyphen, not the '-' hyphen and we enforce the use of the latter one");
|
||||
}
|
||||
return Err(format_err!("Item does not match the template: \"{list_item}\". See https://github.com/rust-unofficial/awesome-rust/blob/main/CONTRIBUTING.md#tldr"));
|
||||
}
|
||||
list_items.last_mut().unwrap().data.push(list_item.clone());
|
||||
|
|
Loading…
Reference in a new issue