Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: add "maximum amount" and "maximum number" to suggestions (#1291)
Andrew Dunbar0aa790214b7c
diff --git a/harper-core/src/linting/most_number.rs b/harper-core/src/linting/most_number.rsindex 65ed7f312..536c155d5 100644--- a/harper-core/src/linting/most_number.rs+++ b/harper-core/src/linting/most_number.rs@@ -43,9 +43,9 @@ impl PatternLinter for MostNumber {let most_amt_num_span = toks[0..3].span()?;let noun_string = toks[2].span.get_content_string(source);let superlatives = if noun_string == "amount" {- vec!["largest", "greatest"]+ vec!["largest", "greatest", "maximum"]} else {- vec!["highest", "largest"]+ vec!["highest", "largest", "maximum"]};let suggestions = superlatives.into_iter()@@ -117,4 +117,13 @@ mod tests {0,);}++ #[test]+ fn corrects_most_amount_with_maximum() {+ assert_top3_suggestion_result(+ "If you want to support the most amount of different architectures ...",+ MostNumber::default(),+ "If you want to support the maximum amount of different architectures ...",+ );+ }}