Repository navigation
fix(ruff): preserve selected output formats and shell completions - #4896
Open
Protocol-zero-0 wants to merge 1 commit into
Open
Protocol-zero-0 wants to merge 1 commit into
Protocol-zero-0 wants to merge 1 commit into
Conversation
📊 Automated PR Analysis
SummaryThis PR fixes rtk's ruff command wrapper so that explicitly selected output formats, Review Checklist
Linked issues: #4655 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
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.
Fixes #4655.
Selected Ruff output formats, rule documentation and generated shell completions are currently summarized or truncated. For example,
rtk ruff generate-shell-completion bashreturns 2,001 bytes and an invalid script instead of Ruff's complete output. This change sends explicitly selected--output-formatdocuments and the routedrule/generate-shell-completioncommands through the existing native passthrough, preserving stdout bytes, stderr and exit status, including documents above the capture limit. Default checks keep their summary. Missing output-format values are forwarded to native validation without injecting a second format or a default path.The output-format lookup uses the existing tokenizer, consuming global option values and respecting
--. A path named--output-format=jsonstays a path. This consolidates the two patches already shared on #4655 and the completion increment previously offered on #3968's source branch. It builds directly on merged #3968; #4892's AnalyzeGraph routing remains separate. No runner changes or dependencies.Validation on Linux with Ruff 0.17.0:
86547ee0(its Ruff implementation differs from this PR's19ece88ebase only by graph routing). Twenty format cases previously capped at 2,001 bytes now remain complete. JSON/XML consumers parse 23 output cases.bash -n; the same five baseline scripts fail syntax checking. Generated scripts are not evaluated.Other platforms and Ruff versions have not been tested locally.