Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
fix(core): false positive in the `ToTwoToo` rule (#2721)
Elijah Potter09eb074612a9
diff --git a/harper-core/src/linting/to_two_too/mod.rs b/harper-core/src/linting/to_two_too/mod.rsindex f89399ce9..bdd1fcb62 100644--- a/harper-core/src/linting/to_two_too/mod.rs+++ b/harper-core/src/linting/to_two_too/mod.rs@@ -407,6 +407,14 @@ mod tests {);}+ #[test]+ fn no_lint_asking_to_simply_in_scare_quotes() {+ assert_no_lints(+ "He was asking to simply \"show up\" for the meeting.",+ ToTwoToo::default(),+ );+ }+#[test]fn no_lint_llm_as_judge_to_automatically_score() {assert_no_lints(diff --git a/harper-core/src/linting/to_two_too/to_too_adverb.rs b/harper-core/src/linting/to_two_too/to_too_adverb.rsindex ccea36f71..8398d127f 100644--- a/harper-core/src/linting/to_two_too/to_too_adverb.rs+++ b/harper-core/src/linting/to_two_too/to_too_adverb.rs@@ -6,7 +6,7 @@ use crate::{};use super::{ExprLinter, Lint, LintKind, Suggestion};-use crate::linting::expr_linter::Chunk;+use crate::linting::expr_linter::Sentence;pub struct ToTooAdverb {expr: Box<dyn Expr>,@@ -35,7 +35,7 @@ impl Default for ToTooAdverb {}impl ExprLinter for ToTooAdverb {- type Unit = Chunk;+ type Unit = Sentence;fn expr(&self) -> &dyn Expr {self.expr.as_ref()