Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

fix: "a software renderer" no longer flagged (#3945)

Andrew Dunbar79ed21189c00
diff --git a/harper-core/src/linting/mass_nouns/noun_countability.rs b/harper-core/src/linting/mass_nouns/noun_countability.rs
index 95c6c2c0c..23b4753c5 100644
--- a/harper-core/src/linting/mass_nouns/noun_countability.rs
+++ b/harper-core/src/linting/mass_nouns/noun_countability.rs
@@ -75,6 +75,11 @@ impl ExprLinter for NounCountability {
// the mass noun
let noun = toks[2].get_str(src).to_lowercase();
+ // specific exceptions
+ if noun == "software" && followed_by_word(ctx, |t| t.get_ch(src).eq_str("rendered")) {
+ return None;
+ }
+
let synonym_corrections: &'static [Correction] = match (noun.as_str(), dq.as_str()) {
("advice", "a" | "an" | "another" | "each" | "every" | "one") => &[
ReplaceNounWith("tip"),
@@ -570,4 +575,12 @@ mod tests {
"Not in this form because it currently works with one punctuation mark with one letter either side.",
);
}
+
+ #[test]
+ fn dont_flag_a_software_rendered_game() {
+ assert_no_lints(
+ "There was a software rendered game in vein of Tomb Raider",
+ NounCountability::default(),
+ );
+ }
}