Skip to content

closed_compounds doesn't handle inflected forms #2267

@hippietrail

Description

@hippietrail

Describe the bug
linting/closed_compounds.rs closes compounds incorrectly written with a space between the parts that shouldn't be there: "any body", "desk top", "under clock", etc.

But it ignores inflected forms: "any body's", "desk tops", "under clocking", etc.

To Reproduce
Steps to reproduce the behavior:

  1. Type something like "I bought another lap top so now I have two lap tops."
  2. Notice that only the singular form is flagged with the suggestion Did you mean the closed compound noun “laptop”?

Expected behavior
All related forms should be corrected.

Screenshots

Image

Additional context

Since it's implemented as a macro that assigns a name for a setting for a single mapping, it would be clunky to have to have separate settings Desktop and Desktops. Rather a solution similar to how I split phrase_set_corrections off from phrase_corrections would allow all forms of a term to be corrected under a single setting in the options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglinting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions