micromatch / micromatch/picomatch
Incorrectly matches `[1-5]` against `[1-5]`
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 135
- Avg merge
- 23h 38m
- Merged PRs (30d)
- 7
Description
- Code:
picomatch('[1-5]')('[1-5]') - Expected result:
false - Actual result:
true
Apparently this mistake is caused explicitly:
Why? This should not match. Please remove this check.
As a workaround, I am using picomatch.makeRe(pattern).test(str) instead of picomatch(pattern)(str).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the check linked in lib/picomatch.js around line 128 and reproduce picomatch('[1-5]')('[1-5]'). Compare that result with picomatch.makeRe(pattern).test(str), then verify the direct matcher returns false for the reported case and add regression coverage using the project's existing test structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100