Skip to content
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

Output the formatting issue #47

Open
ngomichael opened this issue Apr 20, 2020 · 1 comment
Open

Output the formatting issue #47

ngomichael opened this issue Apr 20, 2020 · 1 comment

Comments

@ngomichael
Copy link

Hey,

I was wondering if there is a way for the plugin to output the formatting issue with the file. Currently, it outputs ExampleClass.java is not correctly formatted ! which only tells me that there is an issue with the formatting, not specifying why or which part of the code is causing the failure. I don't see anything in the documentation that can let me add to the output what the specific formatting rule the file isn't following (and what line in the file).

Is it possible to achieve what I want using this plugin? If this isn't possible, can/will you add this functionality to the plugin?

Thanks!

@reda-alaoui
Copy link
Member

reda-alaoui commented Apr 20, 2020

Hi,

That would be a nice feature.

There is currently nothing allowing to do that. Also https://github.com/google/google-java-format does not provide a straight way of doing that.

IMO, we would need to call https://github.com/google/google-java-format/blob/4ddb9148c103b9c65768e519884b0c8ad5caaf39/core/src/main/java/com/google/googlejavaformat/java/Formatter.java#L278 and interpret its output.

Since it is not a priority for me, I hope you or somebody else will contribute with a pull request :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants