Automattic / Automattic/harper

Should flag "search" when "search for" is intended

Open
#2,340 1 comment 0 reactions 0 assignees View on GitHub
enhancement harper-core linting
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
106

Description

**The Error**
Many nonnative speakers use "search" with the item sought when it is properly used for the place looked through and "search for" is used for the item sought.

**Examples (2-3):**
1. I can use the search api to search a specific term in the bio like George Washington university like this.
2. I have been **searching a way** to **search photos** by date range, filesystem path, camera etc...
3. Recursively search a file in given directory from name or RegExp.
4. A small search input box to **search the variable name** which will populate the results
5. How to **search a token** on all exchanges with CCXT.

**Potential Edge Cases**
Sometimes it's quite ambiguous. Searching a file for a word is correct. Searching a file in a directory is incorrect. This will be hard to determine.

Contributor guide

Open the contributing guide

Research direction

No repository files, tests, or entry points are named. Review the existing grammar-rule structure and tests, then use the examples and the directory/file edge case to define when “search for” should be flagged and how ambiguous cases should be handled; done means the intended examples are detected without incorrect warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.