Andrea,

the Google formatter looks like the strongest candidate, despite my sharing your lack of fondness for two-space indentation.

(1) Is it idempotent? That is, if you run the formatter a second time, does it change anything? There are some outstanding issues:
https://github.com/google/google-java-format/issues/254
https://github.com/google/google-java-format/issues/211

(2) Do we have a plan for Eclipse formatter:off and formatter:on tags? This is also discussed:
https://github.com/google/google-java-format/issues/137

Thanks for the interesting review of these tools. You had a fun weekend!

Kind regards,
Ben.

On 11/03/18 22:54, Andrea Aime wrote:
Hi,
I've been experimenting a bit with mass code base reformats approaches on
GeoTools (used as a guinea
pig and hoping to transfer the same approach on GeoWebCache and Geoserver
too, hence the
cross post).
I wrote a document to share my findings here (read only, but can be
commented on), along with links
to branches where the reformatting happened:

https://docs.google.com/document/d/1_ub38YX2juf7uM8S8fywUTNzF5j9Zho-Jo5O_dXvI-Y/edit#

Originally I was thinking of approaching mass reformat in a code sprint,
but since we have none planned,
a "lightweight" approach doing the smallest amount of work for the greatest
benefit seems also
feasible.

Of the reformat approaches above, I cannot argue with the tooling and
effectiveness of the Google style one,
but indenting only 2 spaces leaves me a bit "cold", the code is flatter and
structures seem harder to
locate... it may well be just a matter of habit.

The intellij command line one + checkstyle changes our approach to
formatting less, but will
require more manual work on setting up checkstyle the way we want it, and
seems to have more
overhead

So... would you like to see one of these actually committed and enforced?
Expressions of interest to help in this endeavor?

Cheers
Andrea

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility  for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
GeoTools-Devel mailing list
geotools-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


--
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to