Skip to content

Create linter for non-idiomatic "back in the days"#707

Merged
elijah-potter merged 6 commits into
masterfrom
back-in-the-days
Feb 18, 2025
Merged

Create linter for non-idiomatic "back in the days"#707
elijah-potter merged 6 commits into
masterfrom
back-in-the-days

Conversation

@elijah-potter
Copy link
Copy Markdown
Collaborator

Should resolve #702.

Two things happened here.

  1. I modified the PatternLinter trait to allow cancelling a lint in the match_lint phase by returning Option::None.
  2. I wrote a linter to implement feat: Flag "back in the days" instead of "back in the day" #702.

Also the unit tests from my version of this lint I was working on yesterday.
@hippietrail
Copy link
Copy Markdown
Collaborator

Should resolve #702.

Two things happened here.

  1. I modified the PatternLinter trait to allow cancelling a lint in the match_lint phase by returning Option::None.
  2. I wrote a linter to implement feat: Flag "back in the days" instead of "back in the day" #702.

I was working on a linter for this one yesterday too and got stuck. I can see that new functionality was indeed needed.

I also found another false positive with "Back in the days when ...". I submitted a PR with that change plus all my unit tests to this branch: #712

feat: another exception for "back in the days before"
@elijah-potter elijah-potter merged commit 9029c56 into master Feb 18, 2025
@elijah-potter elijah-potter deleted the back-in-the-days branch February 18, 2025 20:06
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.

feat: Flag "back in the days" instead of "back in the day"

2 participants