-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add initial formatter implementation #2883
Merged
Merged
Commits on Feb 15, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 8a8c748 - Browse repository at this point
Copy the full SHA 8a8c748View commit details -
Configuration menu - View commit details
-
Copy full SHA for c3adfb6 - Browse repository at this point
Copy the full SHA c3adfb6View commit details -
refactor(ruff_fmt): More idiomatic use of formatter API (#3)
This PR makes the formatter code more idiomatic by: * Unifying sequential `write!` calls into a single `write` * Replace `format_args![item]` with `item` (`format_args` is to format multiple arguments). You can think of `format_args` as a `Format` implementation for tuples of arbitrary size * Return an object that implements `Format` for `join_names` so that it can be used as part of the DSL `write!(f, [space, join_names(names)])` * Use `space` instead of `text(" ")`
Configuration menu - View commit details
-
Copy full SHA for d2bb161 - Browse repository at this point
Copy the full SHA d2bb161View commit details -
refactor(ruff_fmt): Replace
rome_rowan
dependency with `rome_text_s……ize` (#2) Remove the `rome_rowan` dependency from `ruff_fmt` and use `rome_text_size` directly. This is just an aesthetic cleanup that does not improve compile time because `ruff_fmt` depends on `rome_formatter` which depends on `rome_rowan`.
Configuration menu - View commit details
-
Copy full SHA for 3a801f0 - Browse repository at this point
Copy the full SHA 3a801f0View commit details -
Add a smoke test to
ruff_fmt
to debug formatter changes (#4)Adds a smoke test to `ruff_fmt` to debug formatter changes. This PR changes the return value of `fmt` to `Result<Formatted>` to allow printing the formatted IR in the quick test. The motivation behind returning `Formatted` is that the IR represents the formatted source code. Printing it only changes its representation from the IR to a string.
Configuration menu - View commit details
-
Copy full SHA for 51d04ad - Browse repository at this point
Copy the full SHA 51d04adView commit details -
Configuration menu - View commit details
-
Copy full SHA for b219d5c - Browse repository at this point
Copy the full SHA b219d5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 41c10f8 - Browse repository at this point
Copy the full SHA 41c10f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8081cf5 - Browse repository at this point
Copy the full SHA 8081cf5View commit details -
Add a hacky mechanism for allowing string adjustments in tests (#9)
It's nice to be able to track tests that are "almost" passing, modulo string normalization, so this PR adds a dedicated section for snippets that fit that description.
Configuration menu - View commit details
-
Copy full SHA for 20d7c95 - Browse repository at this point
Copy the full SHA 20d7c95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1472abc - Browse repository at this point
Copy the full SHA 1472abcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f216b3 - Browse repository at this point
Copy the full SHA 4f216b3View commit details -
Create remaining simple_cases fixtures (#12)
Removes all the other fixtures, runs the conversion script over all remaining cases, and removes the `.bak` files.
Configuration menu - View commit details
-
Copy full SHA for d1a7f5e - Browse repository at this point
Copy the full SHA d1a7f5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d8802ed - Browse repository at this point
Copy the full SHA d8802edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 811a2e2 - Browse repository at this point
Copy the full SHA 811a2e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c4a44f - Browse repository at this point
Copy the full SHA 6c4a44fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c2be15 - Browse repository at this point
Copy the full SHA 7c2be15View commit details
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.