-
Notifications
You must be signed in to change notification settings - Fork 467
JSON Formatting in mvn plugin #1445
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
There is no reason for it, and it would be a great contribution from a newcomer! |
A PR is open. I see this will not fulfil my own need ('\t' as tabulation). Ecryd sortPom accepts -1 spaces to trigger tabulation indentation (https://github.com/Ekryd/sortpom/wiki/Parameters#for-both-the-sort-and-verify-goal). Is it OK I open another PR to accept such a parameter in com.diffplug.spotless.json.gson.GsonStep.State.generateIndent(int)? |
Thanks for the PR If the only problem is indenting with tabs vs space, I would recommend the |
Thanks @nedtwigg. The existing PR does not hold anything relating to tabs. Being new to Spotless, it took few a few seconds to understand your point. My suggested changes (-1 for tabulation) would be very minimal. I agree it is awkward, still it is the way some plugin works (e.g. Ecryd SortPom, then some formatting-plugins users are used to it (at the very least myself,, which is of course veryopinionated xD)). I see the gradlePlugin enables Prettier and other external formatters to enable JSON formatting. However, it seems more difficult to reach with maven. Could you provide a snippet of the mvn pom.xml |
I am terrible at maven, I just merge things that
So whatever -1 flags you want to add are okay with me, but I still think this existing feature is easier to use and definitely easier to build (already done!) <indent>
<tabs>true</tabs>
<spacesPerTab>4</spacesPerTab>
</indent> |
@nedtwigg I now better understand your point. Something unclear to me was how The PR for JSON formatting in mvn is ready. I open another issue which may describe an issue related to interleaving formats and specialized formatters (#1455) |
Published in |
The maven plugin seems not to support JSON formatting. Is there a good reason for this? Or would it be considered a good contribution from a new-comer ?
The text was updated successfully, but these errors were encountered: