Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: seam→seem (#2826)
Andrew Dunbar17d3a49e0164
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rsindex 79b858daa..43b716996 100644--- a/harper-core/src/linting/phrase_set_corrections/mod.rs+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs@@ -418,6 +418,31 @@ pub fn lint_group() -> LintGroup {"Corrects `scape goat` to `scapegoat`, which is the proper term for a person blamed for others' failures.",LintKind::Eggcorn),+ "SeamToSeem" => (+ &[+ ("seam to be", "seem to be"),+ ("seams to be", "seems to be"),+ ("i seam", "i seem"),+ ("we seam", "we seem"),+ ("we all seam", "we all seem"),+ ("we both seam", "we both seem"),+ ("you seam", "you seem"),+ ("you all seam", "you all seem"),+ ("you both seam", "you both seem"),+ ("he seams", "he seems"),+ ("she seams", "she seems"),+ ("it seams", "it seems"),+ ("they seam", "they seem"),+ ("they all seam", "they all seem"),+ ("they both seam", "they both seem"),+ ("everything seams", "everything seems"),+ ("everybody seams", "everybody seems"),+ ("everyone seams", "everyone seems")+ ],+ "Did you mean `seem`? `Seam` refers to a line where two pieces of material are sewn together.",+ "Corrects `seam` to `seem` when used as a verb meaning `to appear` or `to give the impression`.",+ LintKind::Spelling+ ),"WreakHavoc" => (&[("wreck havoc", "wreak havoc"),diff --git a/harper-core/src/linting/phrase_set_corrections/tests.rs b/harper-core/src/linting/phrase_set_corrections/tests.rsindex d84fa59f1..5e96fc443 100644--- a/harper-core/src/linting/phrase_set_corrections/tests.rs+++ b/harper-core/src/linting/phrase_set_corrections/tests.rs@@ -270,7 +270,6 @@ fn dont_flag_what_dose_it_takes() {// -dose it- verb false positives-// And then I have to re-add the salts back to it to dose it back up to drinkable.#[test]#[ignore = "would be a false positive in a naive implementation"]fn dont_flag_to_dose_it() {@@ -281,7 +280,6 @@ fn dont_flag_to_dose_it() {);}-// So my conclusion is: don't dose it too high or it actually is dangerous and not pleasant at all#[test]#[ignore = "would be a false positive in a naive implementation"]fn dont_flag_dont_dose_it_too_high() {@@ -1098,6 +1096,188 @@ fn fix_escape_goats() {);}+// SeamToSeem++//-seam to be-+#[test]+fn fix_seam_to_be() {+ assert_suggestion_result(+ "amdvlk is deprecated but my system still uses it as default and I can't seam to be able to change it.",+ lint_group(),+ "amdvlk is deprecated but my system still uses it as default and I can't seem to be able to change it.",+ );+}++//-seams to be-+fn fix_seams_to_be() {+ assert_suggestion_result(+ "Problem: Docker image is seriously broken and everything seams to be related to trivial things like creating directory or dumping key",+ lint_group(),+ "Problem: Docker image is seriously broken and everything seems to be related to trivial things like creating directory or dumping key",+ );+}++//-I seam-+#[test]+fn fix_i_seam() {+ assert_suggestion_result(+ "so now whatever i seam to try it doesnt work",+ lint_group(),+ "so now whatever i seem to try it doesnt work",+ );+}++//-we seam-+#[test]+fn fix_we_seam() {+ assert_suggestion_result(+ "using a 4G network we seam to get ICE messages mixing Ipv6 and Ipv4",+ lint_group(),+ "using a 4G network we seem to get ICE messages mixing Ipv6 and Ipv4",+ );+}++//-we-all-seam-+#[test]+fn fix_we_all_seam() {+ assert_suggestion_result(+ "if it is your own nation then we all seam to get the update",+ lint_group(),+ "if it is your own nation then we all seem to get the update",+ );+}++//-we-both-seam-+#[test]+// because we both seam to have enough for frivolous things+fn fix_we_both_seam() {+ assert_suggestion_result(+ "because we both seam to have enough for frivolous things",+ lint_group(),+ "because we both seem to have enough for frivolous things",+ );+}++//-you seam-+#[test]+fn fix_you_seam() {+ assert_suggestion_result(+ "Assigning you, since you seam to have already made the fix.",+ lint_group(),+ "Assigning you, since you seem to have already made the fix.",+ );+}++//-you-all-seam+#[test]+fn fix_you_all_seam() {+ assert_suggestion_result(+ "That's a good advice which you all seam to agree upon.",+ lint_group(),+ "That's a good advice which you all seem to agree upon.",+ );+}++//-you-both-seam+#[test]+fn fix_you_both_seam() {+ assert_suggestion_result(+ "since you both seam to like the game",+ lint_group(),+ "since you both seem to like the game",+ );+}++//-he seams-+#[test]+fn fix_he_seams() {+ assert_suggestion_result(+ "tagging @PedroTroller as he seams to still be active on this project.",+ lint_group(),+ "tagging @PedroTroller as he seems to still be active on this project.",+ );+}++//-she seams-+#[test]+fn fix_she_seams() {+ assert_suggestion_result(+ "Here is the exact timestamp where she seams to talk about exactly this -> video.",+ lint_group(),+ "Here is the exact timestamp where she seems to talk about exactly this -> video.",+ );+}++//-it seams-+#[test]+fn fix_it_seams() {+ assert_suggestion_result(+ "It seams i cannot use $tries and $timeout properties on my queued listener class?",+ lint_group(),+ "It seems i cannot use $tries and $timeout properties on my queued listener class?",+ );+}++//-they seam-+#[test]+fn fix_they_seam() {+ assert_suggestion_result(+ "Lets start with the \"not\" and \"and\" gates because they seam the easiest.",+ lint_group(),+ "Lets start with the \"not\" and \"and\" gates because they seem the easiest.",+ );+}++//-they all seam-+#[test]+fn fix_they_all_seam() {+ assert_suggestion_result(+ "I have tried the sum, product, max and min functions and they all seam to work.",+ lint_group(),+ "I have tried the sum, product, max and min functions and they all seem to work.",+ );+}++//-they-both-seam-+#[test]+fn fix_they_both_seam() {+ assert_suggestion_result(+ "It's probably cause they both seam to combine martial arts with animal instincts",+ lint_group(),+ "It's probably cause they both seem to combine martial arts with animal instincts",+ );+}++//-everything seams-+#[test]+fn fix_everything_seams() {+ assert_suggestion_result(+ "Note that if you try to slider the slider first to the right and then to the left, everything seams alright.",+ lint_group(),+ "Note that if you try to slider the slider first to the right and then to the left, everything seems alright.",+ );+}++//-everybody seams-+#[test]+fn fix_everybody_seams() {+ assert_suggestion_result(+ "I'm currently a little disappointed because everybody seams to care only about the Rails framework",+ lint_group(),+ "I'm currently a little disappointed because everybody seems to care only about the Rails framework",+ );+}++//-everyone seams-+#[test]+fn fix_everyone_seams() {+ assert_suggestion_result(+ "everyone seams to use the editor now a days plus there is a tun of extensions available",+ lint_group(),+ "everyone seems to use the editor now a days plus there is a tun of extensions available",+ );+}+// WreakHavoc#[test]