Previously, `ignorePatterns` could not skip directories in `filter_entry()` because doing so might hide nested configs beneath them.
This PR pre-scans config locations before the walk, so `filter_entry()` can safely skip `ignorePatterns` directories that have no nested config beneath them.
With all configs known upfront, the walk also resolves each file's scope dynamically from a pre-loaded scope map, replacing the sequential child-scope walks (`run_child_scope()` recursion) with a single parallel walk.
The pre-scan also preserves current streaming architecture (walk → channel → format workers), keeping format workers busy sooner than a batch-collect alternative would.
Fixes#19509
Initially, I thought about sharing the implementation with Oxlint, but finally I decided not to do it due to constraints and structural differences.
- Strategy
- Oxlint: Collects all file paths into memory upfront
- for cross-module analysis?
- then filters by `ignorePatterns` afterward
- Oxfmt: Streams files to the formatter as they are discovered while walking
- Scope-based walk resolves config at walk time, avoiding a separate post-walk filtering pass
- Config
- Oxlint: There is a difference in what can be configured in the root config versus the rest
- Oxfmt: No difference