-
Notifications
You must be signed in to change notification settings - Fork 884
API for dry-run mode #210
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
Comments
One option for an API would be to add |
While it's true that a built-in implementation could theoretically be made faster than Can you provide more detail about the issue with gradle? If you're using the API, does the |
Thanks for the info on this. |
The dry-mode mode introduced in #105 is a much-appreciated addition to
google-java-format
. Thank you for taking the time to add this option!An API to accompany the CLI option for a dry-run mode would be useful as well. This would have advantages, as an API method would:
google-java-format
in validation mode without spinning up a new JVM. When runninggoogle-java-format
once per Gradle module, this can make a very large difference in efficiency.Now, this would only be a benefit if the API call didn't do all of this under the hood. Save for obviating the need to spin up a new JVM, I wouldn't expect the API to display any additional efficiencies on it's first implementation, but one can always dream for the future, right?
One additional consideration: from an implementation perspective, it's easier for Gradle plugins to place the
google-java-format
library on the runtime classpath and call its API than it is to make a CLI call. Using the API also enables users to easily specify the version ofgoogle-java-format
they want the Gradle plugin to use, as is done with the gradle-errorprone-plugin.The text was updated successfully, but these errors were encountered: