Skip to content

Avoid mass noun lints for ing modifiers#3457

Open
puneetdixit200 wants to merge 1 commit into
Automattic:masterfrom
puneetdixit200:fix-mass-noun-participles
Open

Avoid mass noun lints for ing modifiers#3457
puneetdixit200 wants to merge 1 commit into
Automattic:masterfrom
puneetdixit200:fix-mass-noun-participles

Conversation

@puneetdixit200
Copy link
Copy Markdown

Issues

Fixes #1994

Description

This updates the mass noun countability rule to avoid treating -ing words as countability errors when they are acting as present-participle modifiers before a noun head.

It covers adjective chains such as a working direct link and slash-separated modifier chains such as a prototyping/testing/learning tool, while preserving existing mass-noun corrections like one clothing based on weather conditions.

Demo

N/A; linter behavior is covered by unit tests.

How Has This Been Tested?

  • CARGO_HOME=$PWD/.cargo-home CARGO_TARGET_DIR=$PWD/target cargo test -p harper-core linting::mass_nouns::noun_countability::tests:: -- --nocapture
  • CARGO_HOME=$PWD/.cargo-home CARGO_TARGET_DIR=$PWD/target cargo fmt --check
  • CARGO_HOME=$PWD/.cargo-home CARGO_TARGET_DIR=$PWD/target cargo test -p harper-core
  • git diff --check

AI Disclosure

  • I am a human and didn't use any AI.
  • I used LLM features of my editor, but not an agent.
  • I used an AI agent interactively.
  • I am an agent or I got an agent to do the work autonomously.

OpenAI GPT-5 assisted with the implementation and validation.

If Your PR Implements or Enhances a Linter

  • I made up the sentences in the unit tests.
  • The sentences in the unit tests were generated by an AI.
  • I'm using examples from the bug report / feature request.
  • I collected real-world sentences for the unit tests.

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes
  • I have considered splitting this into smaller pull requests.

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.

The mass noun linter flags present participles, wrongly assuming they are gerunds.

1 participant