db-scheduler
db-scheduler copied to clipboard
Use GoogleJavaFormat for code formatting
I know code formatting is very subjective, but is it possible to use GoogleJavaFormat to format the code in this repo? A lot of open source projects use the same formatter and its also easier to read.
Good suggestion, I will think about it. I have seen PRs with variations in code-format
If you are okay, I can raise a PR which formats entire codebase using GoogleJavaFormat.
I had a look at it but was not convinced due to the short max-length of lines in the google-java-format.
What plugin do you recommend? Is there one with configurable max-length? (Say if I want 120)
I did a trial run using spotless and the palantir code format, which is google-based with some tweaks. I tried google format which has 2 indents. I mostly liked it, but it some cases the indents were really hard to see..
you can always customize the format and put in the repo in such a way that intellij like what armeria does. https://github.com/line/armeria/tree/main/settings/intellij_idea So that any new developer automatically get those settings.
I am going to go with the google format. It just seem cleaner to me, and it was a better IntelliJ experience than the others.
Merged to master via PR #375