Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] auto-formatting source code ?


> On 14 May 2024, at 13:31, Matthias Sohn via jgit-dev <jgit-dev@xxxxxxxxxxx> wrote:
> 
> I am tired of discussing source code formatting and some JGit contributors don't use Eclipse IDE hence they have a hard time getting formatting right since we currently use the Eclipse auto-formatter.
> 
> Hence I propose we adopt the approach the Gerrit project is using and switch from Eclipse auto-formatter to google-java-format [1] and add a Gerrit submit rule and a label "CodeStyle" which the CI can vote on to block changes which weren't properly auto-formatted using google-java-format.
> 
> WDYT ?

+1 to that :-)

I would also propose to:

1) Integrate the check on the CI, and provide the comments back to Gerrit as in-lined comments
2) (optional - nice to have): make the 1) an “suggested change” styled comment, so that can be applied by “one click”

Luca.



Back to the top