Skip to content

feat(oxlint): add --hide-fixable option - #28588

Open
Aschenbath wants to merge 3 commits into
oxc-project:mainfrom
Aschenbath:feat/hide-fixable-16911
Open

Aschenbath wants to merge 3 commits into
oxc-project:mainfrom
Aschenbath:feat/hide-fixable-16911

Conversation

@Aschenbath

@Aschenbath Aschenbath commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Add --hide-fixable for development integrations that leave automatic fixes to a pre-commit hook or CI. It collects actual safe fixes from native rules, JavaScript plugins, and type-aware rules, then hides those diagnostics without modifying source files. Suggestions, dangerous fixes, missing fixes, and edits that leave the source unchanged remain visible.

Hidden diagnostics do not affect warning thresholds or exit status, and bulk suppression accounting still includes them. The option cannot be combined with the fix flags; CLI help documents this. The type-aware path supports the current concurrent TSGolint runner.

Closes #16911

The safety audit is tracked separately: #29522 fixes 11 uncovered native issues, and oxc-project/tsgolint#1363 fixes the three uncovered type-aware issues. The other 22 reported rule cases have existing PRs #29309 and #29493–#29512. Those changes still require upstream review/merging and, for TSGolint, a backend release; this feature relies on rules classifying their fixes correctly.

Validation against current upstream main (1475cfa8):

  • Unfiltered cargo test --all-features -p oxc_linter: 1,319 unit tests plus integration/doc tests passed; 7 existing doc tests ignored.
  • Unfiltered cargo test --all-features -p oxlint: 382 tests passed, 1 existing test ignored. The tracked symlink fixture was checked out as a real symlink on Windows.
  • All 9 website_linter tests passed; the Markdown and terminal CLI documentation snapshots include --hide-fixable.
  • just lint -p oxc_linter -p oxlint --no-deps and just doc -p oxc_linter -p oxlint passed. The full Windows lint command encounters four existing Clippy warnings in unchanged oxc_language_server files; selected-crate lint passes with warnings denied.
  • Built the Node binding with testing,allocator,ruledocs, built the JavaScript package, and passed the hide_fixable, fixes, and suggestions CLI fixtures. The updated snapshot confirms identical replacements and empty edit lists remain visible.
  • Tested the built CLI with TSGolint commit acf0dda7: five diagnostics become four under --hide-fixable, while literal-union/branded-template and array membership diagnostics stay visible. The source is byte-for-byte unchanged; strict TypeScript 7.0.2 checking and runtime checks both pass.
  • Rust/repository formatting and diff checks passed.

AI disclosure: OpenAI Codex was used to implement, review, and test this change.

@github-actions github-actions Bot added A-linter Area - Linter (oxlint): rules, config, diagnostics, fixes. Add L-* labels for details A-cli Area - oxlint / oxfmt common CLI behavior: flags, ignore files, oxc_config L-js-plugins Linter > JS plugins (ESLint-compatible plugin API) labels Nov 14, 2026
@codspeed

codspeed Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 5 untouched benchmarks
⏩ 105 skipped benchmarks1


Comparing Aschenbath:feat/hide-fixable-16911 (1fb9340) with main (1dc0ee9)2

Open in CodSpeed

Footnotes

  1. 105 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - oxlint / oxfmt common CLI behavior: flags, ignore files, oxc_config A-linter Area - Linter (oxlint): rules, config, diagnostics, fixes. Add L-* labels for details L-js-plugins Linter > JS plugins (ESLint-compatible plugin API)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linter: option to hide lint issues that have fixers available

1 participant