Hi all,

Indeed the 4 spaces tab is better and I can live with the other changes,
I doubt we will ever found a format that will make everyone happy :P

So in practice:

1. we would run this once
2. then run a check for each build
3. developers will have two ways of applying this style:
    1. using maven
    2. or using a plugin \ style in the IDE 
https://github.com/google/google-java-format

+1 for this one.

Thanks for the investigation Andrea.

On 03/18/2018 10:12 AM, Andrea Aime wrote:
Hi all,
interesting news, the formatter has basically a single format style option that 
I did overlook
before, choosing between google style and AOSP one, Android Open Source Project.

Checking the google formatter source code, I found just one significant 
difference between the two...
AOSP uses 4 spaces indent!
(reference, https://github.com/google/google-java-format/blob/master/core/src/main/java/com/google/googlejavaformat/java/JavaFormatterOptions.java)

I've setup a different branch using it, so that people can have a look:
https://github.com/aaime/geotools/tree/aosp_format

This kind of look like a winner to me, if we can accept the non full 
idempotency issue.
Personally it's not a deal breaker, as I don't think we should reformat automatically at each commit, but just do it once, and then run a check on each build.

Cheers
Andrea



On Sun, Mar 18, 2018 at 10:49 AM, Andrea Aime <andrea.a...@geo-solutions.it <mailto:andrea.a...@geo-solutions.it>> wrote:

    Hi,
    given the issues on the intellij + checkstyle approach I had a second look 
at the google variant
    and cleaned up the branch to have a good separation of pom changes and 
reformats:

    https://github.com/aaime/geotools/tree/intellij_checkstyle2
    <https://github.com/aaime/geotools/tree/intellij_checkstyle2>

    Indeed, it took 3 runs to get to a stable formatting, you can see them as 
separate commits and
    check
    the changes occurred in each:
    https://github.com/aaime/geotools/tree/google_format
    <https://github.com/aaime/geotools/tree/google_format>

    Looking at the code, I'm suffering from mild nausea... that said, the same 
happened when I
    switched
    from Eclipse to IntelliJ a few months ago, was sick for a week but then it 
went away.

    Cheers
    Andrea
    ==

    GeoServer Professional Services from the experts! Visit 
http://goo.gl/it488V for more
    information.==Ing. Andrea Aime @geowolfTechnical LeadGeoSolutions S.A.S.Via 
di Montramito
    3/A55054  Massarosa (LU)phone: +39 0584 962313 
<tel:+39%200584%20962313>fax: +39 0584 1660272
    <tel:+39%200584%20166%200272>mob: +39  339 8844549
    
<tel:+39%20339%20884%204549>http://www.geo-solutions.ithttp://twitter.com/geosolutions_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.




--

Regards,

Andrea Aime

==GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.==Ing. Andrea Aime @geowolfTechnical LeadGeoSolutions S.A.S.Via di Montramito 3/A55054  Massarosa (LU)phone: +39 0584 962313fax: +39 0584 1660272mob: +39  339 8844549http://www.geo-solutions.ithttp://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-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

--
Regards,
Nuno Oliveira
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V 
for more information.
==

Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer

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

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-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to