anomalyco / anomalyco/opencode
Glob returns hidden files with hidden disabled
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
A broad glob returns hidden files even with hidden: false or the option omitted. The registered tool description says hidden files and directories are excluded by default.
Plugins
Built-in glob tool; native ripgrep 15.2.0.
OpenCode version
V2 source checkout at 541937d12449e64d078c67e9013f1c288004b83f.
Steps to reproduce
- Create a temporary directory containing
visible.ts,.hidden.ts, and.hidden/nested.ts. - Run the glob tool with
pattern: "**/*.ts", first omittinghidden, then setting it tofalse.
Expected: only visible.ts. Actual: .hidden.ts and visible.ts. This fixture does not traverse the hidden directory unless hidden: true; that option correctly returns all three files. The positive ripgrep glob overrides hidden-basename filtering.
Operating System
macOS arm64, Bun 1.4.1.
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 built-in glob tool entry point and reproduce the issue with the temporary directory containing visible.ts, .hidden.ts, and .hidden/nested.ts. Trace how the positive ripgrep glob interacts with hidden-basename filtering, then add regression coverage showing that omitted or false hidden excludes both hidden files and hidden directories while true returns all three.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100