refactor(linter): avoid fs reads in TsGoLintState when --silent is used#13199
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Instrumentation Performance ReportMerging #13199 will not alter performanceComparing Summary
Footnotes |
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes the TsGoLintState to avoid unnecessary filesystem reads when the --silent flag is used. When silent mode is enabled, detailed diagnostic messages with source text context are not needed, so the file system access for reading source files can be skipped.
- Add silent mode support to TsGoLintState to skip filesystem reads when diagnostics won't be displayed
- Wire up the silent flag from CLI options to TsGoLintState configuration
- Add test coverage for the new silent mode functionality
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/oxc_linter/src/tsgolint.rs | Add silent field and with_silent method, skip source text reading in silent mode |
| apps/oxlint/src/lint.rs | Pass silent flag to TsGoLintState and add test for silent mode |
| apps/oxlint/src/snapshots/fixtures__tsgolint_--type-aware --silent no-floating-promises@oxlint.snap | Test snapshot for silent mode output |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
6a260cd to
7014ac7
Compare
Merge activity
|
7014ac7 to
c138fad
Compare

No description provided.