CodeVetter · Repo Unpack · Data flow
oxc-project/oxc
Source text enters through filesystem reads or explicit binding arguments and becomes arena-owned compiler data. Configuration resolution selects rule state or a typed formatting strategy before processing. Node parser output crosses an additional coordinate and serialization boundary. Filesystem outputs and suppression baselines are distinct from temporary allocator, module-graph, and directive state.
- Parser binding input consists of filename, source text, and ParserOptions; parse_with_return creates an allocator, derives SourceType and AST flavor, then calls parse_impl.
- Node parser results optionally accumulate semantic diagnostics, convert AST/module/error offsets from UTF-8 to UTF-16, serialize ESTree fields, and return comments plus module metadata.
- Oxlint normalizes explicit paths, filters ignore sources, walks candidates, loads root/nested configuration, and combines resolved rule state and external-plugin metadata into ConfigStore.
- Lint Runtime stores source and section semantics under an AllocatorGuard-backed self_cell; a concurrent module graph retains Arc-owned records, with other cyclic references required to use Weak.
- PartialLoader separates framework source sections; each section is parsed and semantically analyzed, and failed-section diagnostic spans are shifted back to original file coordinates.
- Oxfmt streams FormatStrategy entries over an mpsc channel; FormatService bridges them into Rayon processing, reads source, formats it, and sends success or wrapped diagnostics over separate channels.
- JS formatting acquires a pooled allocator and a FormatSession carrying resolved host services, calls format_with_session, and prints its result; embedded children inherit the host's resolved config rather than resolving a virtual path.
- Suppression state maps filenames to rule diagnostic counts; serialization sorts filenames and rules, while finalization compares runtime counts with the baseline before saving updates or reporting differences.