Consider --preview flag for server subcommand#12208
Merged
dhruvmanila merged 1 commit intomainfrom Jul 18, 2024
Merged
Conversation
Contributor
|
0ad5123 to
4fc10d9
Compare
This comment was marked as outdated.
This comment was marked as outdated.
8e5605b to
9863e4f
Compare
9863e4f to
24f9a75
Compare
24f9a75 to
0f7a0d4
Compare
MichaReiser
approved these changes
Jul 17, 2024
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.
Summary
This PR removes the requirement of
--previewflag to run theruff serverand instead considers it to be an indicator to turn on preview mode for the linter and the formatter.resolves: #12161
Test Plan
Add test cases to assert the
previewvalue is updated accordingly.In an editor context, I used the local
ruffexecutable in Neovim with the--previewflag and verified that the preview-only violations are being highlighted.Running with:
The screenshot shows that
E502is highlighted with the below config inpyproject.toml: