Skip to content
This repository was archived by the owner on Aug 12, 2023. It is now read-only.

feat(formatting):adding range_formatting for google-java-format builtin#1623

Open
deanbear wants to merge 2 commits intojose-elias-alvarez:mainfrom
deanbear:range_formatting4google_java_format
Open

feat(formatting):adding range_formatting for google-java-format builtin#1623
deanbear wants to merge 2 commits intojose-elias-alvarez:mainfrom
deanbear:range_formatting4google_java_format

Conversation

@deanbear
Copy link
Copy Markdown

Hi there,

This PR is about adding the range_formatting method to the built-in source of google-java-format.
In fact, google-java-format already supports the --lines option for range formatting.
However, there's a trick: you need to add four additional options to properly perform the range formatting operation; otherwise, the entire file will be formatted.
Please see the issue at google/google-java-format#942 for more details.

I chose not to use the helpers because there are extra options involved, and I didn't want to disrupt the range_formatting_args_factory.

Have a nice day.

@mskelton
Copy link
Copy Markdown
Contributor

I'm taking a stab at forking null-ls given the recent announcement that null-ls is being archived, and I've implemented this in mskelton@ea1a4539

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants