Automattic / Automattic/harper

Would be handy to have a way to return multiple `Lint`s from a `Linter`/`ExprLinter`

Open
#3,329 0 comments 0 reactions 1 assignee Claimed by @hippietrail View on GitHub
agreement enhancement harper-core linting
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
106

Description

Sometimes, and especially when dealing with grammatical agreement, there are two fixes in different areas, such as a verb form that only works with singular pronouns and nouns mismatched with a plural pronoun or noun.

When there are other words in between, you can only handle that by returning multiple `Suggestion`s on the same `Lint` with the same `span` and therefore the `span` must cover the full extent of text that encompasses both parts that can be fixed.

It would be easier to code, and the code would be easier to read, if you could return two `Lint`s, each with a `span` just for the part it needs to fix.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.