Closed Compound Matcher Conversions#608
Conversation
|
@hippietrail, I've taken a more data-driven approach for nouns. Let me know what you think. |
| create_closed_compound_linter!(Nonetheless, "none the less", "nonetheless"); | ||
| create_closed_compound_linter!(Hereafter, "here after", "hereafter"); | ||
| create_closed_compound_linter!(Otherwise, "other wise", "otherwise"); | ||
| create_closed_compound_linter!(Therein, "there in", "therein"); |
| create_closed_compound_linter!(Thereupon, "there upon", "thereupon"); | ||
| create_closed_compound_linter!(Hereby, "here by", "hereby"); | ||
| create_closed_compound_linter!(Hereunder, "here under", "hereunder"); | ||
| create_closed_compound_linter!(Forthwith, "forth with", "forthwith"); |
There was a problem hiding this comment.
Can occur in coding context: In my day we had to code in Forth with a line editor!
| create_closed_compound_linter!(Therein, "there in", "therein"); | ||
| create_closed_compound_linter!(Thereupon, "there upon", "thereupon"); | ||
| create_closed_compound_linter!(Hereby, "here by", "hereby"); | ||
| create_closed_compound_linter!(Hereunder, "here under", "hereunder"); |
There was a problem hiding this comment.
"It's hidden right here under the carpet".
| create_closed_compound_linter!(Forthwith, "forth with", "forthwith"); | ||
| create_closed_compound_linter!(Insofar, "in so far", "insofar"); | ||
| create_closed_compound_linter!(Whereupon, "where upon", "whereupon"); | ||
| create_closed_compound_linter!(Thereafter, "there after", "thereafter"); |
There was a problem hiding this comment.
"I got there after him". "Go back there after dinner and finish it." etc. Much more common than the legalese.
| create_closed_compound_linter!(Insofar, "in so far", "insofar"); | ||
| create_closed_compound_linter!(Whereupon, "where upon", "whereupon"); | ||
| create_closed_compound_linter!(Thereafter, "there after", "thereafter"); | ||
| create_closed_compound_linter!(Downright, "down right", "downright"); |
There was a problem hiding this comment.
"We've gotta do down right here" etc.
78c24b7 to
f2640e4
Compare
|
All the counter examples that @hippietrail gave are extremely valuable. They should be added in a non-regression tests that will be a global one and not directly linked to this rule. Someone in the future may be tempted to open a PR to fix anything listed by @hippietrail as valid/invalid EDIT: I opened |
Co-authored-by: hippietrail <hippietrail@users.noreply.github.com>
I absolutely agree. I added them to the global tests, which actually revealed some issues. They've since been fixed. |
793ac4d to
7ec90f4
Compare
Co-authored-by: ccoVeille <ccoVeille@users.noreply.github.com>
7ec90f4 to
fec6f47
Compare
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [Automattic/harper/harper-ls](https://github.com/Automattic/harper) | minor | `v0.19.1` -> `v0.20.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>Automattic/harper (Automattic/harper/harper-ls)</summary> ### [`v0.20.0`](https://github.com/Automattic/harper/releases/tag/v0.20.0) [Compare Source](Automattic/harper@v0.19.1...v0.20.0) #### What's Changed - chore: Maintenance Changes by [@​mcecode](https://github.com/mcecode) in Automattic/harper#583 - build: use `just`-native dependency resolution by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#554 - build(deps): bump tree-sitter-dart from 0.0.3 to 0.0.4 by [@​dependabot](https://github.com/dependabot) in Automattic/harper#566 - build(deps): bump serde_json from 1.0.137 to 1.0.138 by [@​dependabot](https://github.com/dependabot) in Automattic/harper#568 - build(deps-dev): bump [@​rollup/plugin-typescript](https://github.com/rollup/plugin-typescript) from 11.1.6 to 12.1.2 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#569 - feat(web): add link to the Discord server by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#585 - clean up strange character at end-of-line by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#580 - feat(core): Lint for those who don't like Oxford commas by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#562 - docs(obsidian): notify people they should use up-to-date Electron by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#586 - build(deps-dev): bump vitest from 2.1.8 to 2.1.9 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#588 - build(deps-dev): bump [@​vitest/browser](https://github.com/vitest/browser) from 2.1.8 to 2.1.9 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#591 - fix(core): add `on` to the list of special cases by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#592 - feat(core): start support for hex numbers by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#553 - feat: change `just addnoun` to have different affixes as per [#​595](Automattic/harper#595) by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#601 - Phrase fixes by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#589 - dict: add inclusivity by [@​lukasmwerner](https://github.com/lukasmwerner) in Automattic/harper#590 - docs(vscode): revised introductional material by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#602 - docs: missing word in web/author-a-rule by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#614 - feat: adds a brief helpful comment to each entry describing its function by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#593 - fix(ls): release config lock to avoid deadlocks by [@​nyonson](https://github.com/nyonson) in Automattic/harper#612 - feat(core): create rule for the possessive version of "you" by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#619 - bench(harper.js): add benchmarks for configuration methods by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#618 - grammar agreement in obsidion plugin comment by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#622 - feat: clarify message for uncapitalized "I" by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#625 - build(deps-dev): bump [@​types/node](https://github.com/types/node) from 22.13.0 to 22.13.1 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#632 - build(deps-dev): bump esbuild from 0.24.2 to 0.25.0 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#633 - build(deps-dev): bump typescript from 5.6.3 to 5.7.3 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#631 - build(deps-dev): bump [@​sveltejs/kit](https://github.com/sveltejs/kit) from 2.16.1 to 2.17.1 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#629 - chore: correct some affix annotations by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#617 - feat: split triggers in `matcher.rs` into categories with explanations by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#636 - Cut-and-paste error in "report error" template by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#623 - bug: reverse correcting "supposed to" to "suppose to" by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#621 - feat: if spellcheck only has one suggestion mention it directly by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#626 - fix(obsidian): correctly handle Unicode conversions by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#627 - feat: add `harper-cli forms` and `just getforms` by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#615 - Closed Compound Matcher Conversions by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#608 - build(deps): bump clap from 4.5.27 to 4.5.28 by [@​dependabot](https://github.com/dependabot) in Automattic/harper#635 - build(deps): bump esbuild from 0.23.1 to 0.25.0 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#639 - fix(core): make narrow linter specifically for `long and behold` by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#641 - fix(core): currency placement with certain decimal positions by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#604 #### New Contributors - [@​nyonson](https://github.com/nyonson) made their first contribution in Automattic/harper#612 **Full Changelog**: Automattic/harper@v0.19.1...v0.20.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjQuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->

This continues work on #472 by defining a macro to be used to create rules that condense valid words into closed compound words. This may close #440.
If there are any additions, let me know. The current list is in
harper-core/src/linting/closed_compoundsaround line 60.