Repository navigation
feat(oxlint): add --hide-fixable option - #28588
Open
Aschenbath wants to merge 3 commits into
Open
Aschenbath wants to merge 3 commits into
Aschenbath wants to merge 3 commits into
Conversation
Contributor
Merging this PR will not alter performance
Comparing Footnotes
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
--hide-fixablefor 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):cargo test --all-features -p oxc_linter: 1,319 unit tests plus integration/doc tests passed; 7 existing doc tests ignored.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.website_lintertests passed; the Markdown and terminal CLI documentation snapshots include--hide-fixable.just lint -p oxc_linter -p oxlint --no-depsandjust doc -p oxc_linter -p oxlintpassed. The full Windows lint command encounters four existing Clippy warnings in unchangedoxc_language_serverfiles; selected-crate lint passes with warnings denied.testing,allocator,ruledocs, built the JavaScript package, and passed thehide_fixable,fixes, andsuggestionsCLI fixtures. The updated snapshot confirms identical replacements and empty edit lists remain visible.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.AI disclosure: OpenAI Codex was used to implement, review, and test this change.