Skip to content
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

feat: lex 4-digit plural decades #675

Merged
merged 3 commits into from
Feb 21, 2025

Conversation

hippietrail
Copy link
Contributor

@hippietrail hippietrail commented Feb 14, 2025

Addresses #673
Work in progress since it passes all test but does not fix 673's problem

@elijah-potter I think I'm going to need help with this one. It still fails with "1980s and" but I don't really know how to debug it. I would assume the "number" lexer is matching the "1980" part but "1980s" on its own passes its test... So perhaps "s and" is getting lexed first?

Addresses Automattic#673
Work in progress since it passes all test but does not fix 673's problem
@hippietrail hippietrail marked this pull request as ready for review February 14, 2025 22:23
@elijah-potter
Copy link
Collaborator

elijah-potter commented Feb 17, 2025

Great work. I'm curious, are there any new lints that could make use of TokenKind::Decade?

@elijah-potter elijah-potter linked an issue Feb 17, 2025 that may be closed by this pull request
@hippietrail
Copy link
Contributor Author

hippietrail commented Feb 17, 2025

Great work. I'm curious, are there any new lints that could make use of TokenKind::Decade?

I don't think so yet but there might be.
But Is there another way to get special patterns of characters to avoid being treated as words besides making a new token for them? Maybe for this one making it a word token would be better than making a new kind of token?

@elijah-potter elijah-potter merged commit 9b535c1 into Automattic:master Feb 21, 2025
4 checks passed
@hippietrail hippietrail deleted the decade_lex branch February 21, 2025 17:36
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Feb 26, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [Automattic/harper/harper-ls](/~https://github.com/Automattic/harper) | minor | `v0.22.0` -> `v0.23.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.23.0`](/~https://github.com/Automattic/harper/releases/tag/v0.23.0)

[Compare Source](Automattic/harper@v0.22.0...v0.23.0)

#### What's Changed

-   feat: another exception for "back in the days before" by [@&#8203;hippietrail](/~https://github.com/hippietrail) in Automattic/harper#712
-   feat(core): allow the `ThenThan` linter to cover more cases by [@&#8203;elijah-potter](/~https://github.com/elijah-potter) in Automattic/harper#714
-   Create linter for non-idiomatic "back in the days" by [@&#8203;elijah-potter](/~https://github.com/elijah-potter) in Automattic/harper#707
-   Make `Lintkind::Spelling` exclusive to one rule. by [@&#8203;elijah-potter](/~https://github.com/elijah-potter) in Automattic/harper#713
-   feat: github template for reporting false positives by [@&#8203;hippietrail](/~https://github.com/hippietrail) in Automattic/harper#728
-   chore: dictionary curation by [@&#8203;hippietrail](/~https://github.com/hippietrail) in Automattic/harper#727
-   Overhaul by [@&#8203;elijah-potter](/~https://github.com/elijah-potter) in Automattic/harper#726
-   feat(core): added technical words to dictionary by [@&#8203;ficcdaf](/~https://github.com/ficcdaf) in Automattic/harper#729
-   feat: lex 4-digit plural decades by [@&#8203;hippietrail](/~https://github.com/hippietrail) in Automattic/harper#675
-   fix(core): edge case found in Harper's documentation by [@&#8203;elijah-potter](/~https://github.com/elijah-potter) in Automattic/harper#737
-   fix(core): address edge cases in `ThenThan` rule by [@&#8203;elijah-potter](/~https://github.com/elijah-potter) in Automattic/harper#735
-   feat(core): add rule that corrects `ban together` by [@&#8203;elijah-potter](/~https://github.com/elijah-potter) in Automattic/harper#734
-   fix(vscode-plugin): update config keys to new standard by [@&#8203;mcecode](/~https://github.com/mcecode) in Automattic/harper#733
-   feat: reimplement "operative system(s)" by [@&#8203;hippietrail](/~https://github.com/hippietrail) in Automattic/harper#719
-   fix(core): restrict `GeneralCompoundNouns` to ignore adverb prefixes by [@&#8203;elijah-potter](/~https://github.com/elijah-potter) in Automattic/harper#736
-   feat(core): added plural form of integration by [@&#8203;ficcdaf](/~https://github.com/ficcdaf) in Automattic/harper#740
-   build(deps): bump typst-syntax from 0.12.0 to 0.13.0 by [@&#8203;dependabot](/~https://github.com/dependabot) in Automattic/harper#757
-   build(deps): bump anyhow from 1.0.95 to 1.0.96 by [@&#8203;dependabot](/~https://github.com/dependabot) in Automattic/harper#758
-   build(deps-dev): bump prettier from 3.4.2 to 3.5.2 in /packages by [@&#8203;dependabot](/~https://github.com/dependabot) in Automattic/harper#763
-   build(deps-dev): bump [@&#8203;vitest/browser](/~https://github.com/vitest/browser) from 3.0.5 to 3.0.6 in /packages by [@&#8203;dependabot](/~https://github.com/dependabot) in Automattic/harper#762
-   build(deps-dev): bump [@&#8203;rollup/plugin-node-resolve](/~https://github.com/rollup/plugin-node-resolve) from 15.3.1 to 16.0.0 in /packages by [@&#8203;dependabot](/~https://github.com/dependabot) in Automattic/harper#764
-   chore: dictionary curation by [@&#8203;hippietrail](/~https://github.com/hippietrail) in Automattic/harper#745
-   feat: tests for sentences containing a decade by [@&#8203;hippietrail](/~https://github.com/hippietrail) in Automattic/harper#747
-   feat(vscode-plugin): config updates by [@&#8203;mcecode](/~https://github.com/mcecode) in Automattic/harper#754
-   fix(core): improper pattern by [@&#8203;elijah-potter](/~https://github.com/elijah-potter) in Automattic/harper#739
-   doc(web): updated environment and language-server documentation on the website by [@&#8203;ficcdaf](/~https://github.com/ficcdaf) in Automattic/harper#741
-   build(deps): bump serde from 1.0.217 to 1.0.218 by [@&#8203;dependabot](/~https://github.com/dependabot) in Automattic/harper#760
-   feat: add `just sample` to list all forms of random dictionary words by [@&#8203;hippietrail](/~https://github.com/hippietrail) in Automattic/harper#646
-   build(deps): bump ordered-float from 4.6.0 to 5.0.0 by [@&#8203;dependabot](/~https://github.com/dependabot) in Automattic/harper#759
-   build(deps-dev): bump [@&#8203;microsoft/api-documenter](/~https://github.com/microsoft/api-documenter) from 7.26.7 to 7.26.10 in /packages by [@&#8203;dependabot](/~https://github.com/dependabot) in Automattic/harper#765
-   feat: capitalize multi-word country and capital city names by [@&#8203;hippietrail](/~https://github.com/hippietrail) in Automattic/harper#703
-   Fuzz results by [@&#8203;elijah-potter](/~https://github.com/elijah-potter) in Automattic/harper#773
-   feat: move 'could of' etc from `matcher.rs` to its own linter by [@&#8203;hippietrail](/~https://github.com/hippietrail) in Automattic/harper#715
-   fix: better ascii and hex digit checks by [@&#8203;hippietrail](/~https://github.com/hippietrail) in Automattic/harper#776
-   build(deps-dev): bump [@&#8203;microsoft/api-extractor](/~https://github.com/microsoft/api-extractor) from 7.49.2 to 7.50.1 in /packages by [@&#8203;dependabot](/~https://github.com/dependabot) in Automattic/harper#761
-   fix: mostly `j` annotations for adverbs in `-ly` by [@&#8203;hippietrail](/~https://github.com/hippietrail) in Automattic/harper#778

#### New Contributors

-   [@&#8203;ficcdaf](/~https://github.com/ficcdaf) made their first contribution in Automattic/harper#729

**Full Changelog**: Automattic/harper@v0.22.0...v0.23.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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODAuMyIsInVwZGF0ZWRJblZlciI6IjM5LjE4MC4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue Parsing Plural Years/Decades
2 participants