Skip to content

refactor(linter): avoid fs reads in TsGoLintState when --silent is used#13199

Merged
graphite-app[bot] merged 1 commit intomainfrom
08-18-refactor_linter_avoid_fs_reads_in_tsgolintstate_when_--silent_is_used
Aug 18, 2025
Merged

refactor(linter): avoid fs reads in TsGoLintState when --silent is used#13199
graphite-app[bot] merged 1 commit intomainfrom
08-18-refactor_linter_avoid_fs_reads_in_tsgolintstate_when_--silent_is_used

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Aug 18, 2025

No description provided.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Aug 18, 2025
Copy link
Member Author

Sysix commented Aug 18, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@Sysix Sysix marked this pull request as ready for review August 18, 2025 20:46
Copilot AI review requested due to automatic review settings August 18, 2025 20:46
@Sysix Sysix requested a review from camc314 as a code owner August 18, 2025 20:46
@codspeed-hq
Copy link

codspeed-hq bot commented Aug 18, 2025

CodSpeed Instrumentation Performance Report

Merging #13199 will not alter performance

Comparing 08-18-refactor_linter_avoid_fs_reads_in_tsgolintstate_when_--silent_is_used (c138fad) with main (845c6de)1

Summary

✅ 34 untouched benchmarks

Footnotes

  1. No successful run was found on main (c138fad) during the generation of this report, so 845c6de was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Sysix Sysix force-pushed the 08-18-refactor_linter_avoid_fs_reads_in_tsgolintstate_when_--silent_is_used branch from 6a260cd to 7014ac7 Compare August 18, 2025 20:47
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Aug 18, 2025
Copy link
Contributor

camc314 commented Aug 18, 2025

Merge activity

  • Aug 18, 8:48 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 18, 8:48 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 18, 9:53 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Aug 18, 9:59 PM UTC: Merged by the Graphite merge queue.

@graphite-app graphite-app bot force-pushed the 08-18-refactor_linter_avoid_fs_reads_in_tsgolintstate_when_--silent_is_used branch from 7014ac7 to c138fad Compare August 18, 2025 21:54
@graphite-app graphite-app bot merged commit c138fad into main Aug 18, 2025
24 checks passed
@graphite-app graphite-app bot deleted the 08-18-refactor_linter_avoid_fs_reads_in_tsgolintstate_when_--silent_is_used branch August 18, 2025 21:59
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 18, 2025
This was referenced Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants