Skip to content

Adj of a curation 2025 04 09 #1053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion harper-core/dictionary.dict
Original file line number Diff line number Diff line change
Expand Up @@ -20430,7 +20430,7 @@ demimondaine/1SM
demimonde/1M
demise/~14MGDS
demitasse/1MS
demo/~154GMD
demo/~14GMD # only wiktionary calls this an adjective. doing so messes with 'adj of a' lint
democracy/~1SM
democrat/~1MS
democratic/~51UQ
Expand Down
30 changes: 30 additions & 0 deletions harper-core/src/linting/adjective_of_a.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const FALSE_POSITIVES: &[&str] = &[
"equivalent",
"full",
"inside",
"up",
// "more" is tricky but it often seems correct and idiomatic.
"more",
"much",
Expand All @@ -22,8 +23,10 @@ const FALSE_POSITIVES: &[&str] = &[
"bit",
"bottom",
"chance",
"clockwork",
"derivative",
"dream",
"eighth",
"front",
"half",
"head",
Expand Down Expand Up @@ -448,4 +451,31 @@ mod tests {
0,
);
}

#[test]
fn dont_flag_clockwork() {
assert_lint_count(
"so something's wrong in this clockwork of a thing and I'm not going to bother taking this apart",
AdjectiveOfA,
0,
);
}

#[test]
fn dont_flag_up() {
assert_lint_count(
"Yeah gas is made up of a bunch of teenytiny particles all moving around.",
AdjectiveOfA,
0,
);
}

#[test]
fn dont_flag_eighth() {
assert_lint_count(
"It's about an eighth of an inch or whatever",
AdjectiveOfA,
0,
);
}
}