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 Tue, May 14, 2024 at 7:51 PM Thomas Wolf via jgit-dev <jgit-dev@xxxxxxxxxxx> wrote:
On 14.05.24 14:31 , Matthias Sohn via jgit-dev wrote:
> 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] https://github.com/google/google-java-format
> <https://github.com/google/google-java-format>

Don't care much *if* the google-java-format works seamlessly in
Eclipse. Switching away from the Eclipse formatter to something else
simply inverts the burden: currently non-Eclipse users would have to
configure their IDEs to use the Eclipse formatter (which _is_ possible
at least in IntelliJ), in the future, Eclipse users would have to do
so.

IMO, much more important than formatting would be to run the Eclipse
PDE API checks during the normal build at least on Jenkins, and fail
the build if there are any problems. (Wrong @since, non-API types
used in API methods, breaking API, etc.)

We can try to run the API checks using the API Analysis application
If this works we can add another code review label "ApiCheck" and a Gerrit submit requirement
blocking the build if API checks fail.

Regarding @since checks I found
but no hints how this could be run from a build job.
 
Cheers,

   Thomas

_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jgit-dev

Back to the top