Uses Spotless for Java formatting, and uses the latest google-java-format plugin compatible with Java 8 (with improved formatting for streams and annotations)
Uses up-to-date checking to avoid re-formatting files for nothing
The up-to-date file index is kept in a hidden file in each module, “.spotless-index”. On linux that’s invisible by default. The files are in gitignore so they won’t be committed.
Using spotless, we’ll be eventually able to also format with other formatters in the future, like the Eclipse one for XML/HTML for example.
Can people on different platforms try that out and tell me how that works for them? Try running:
mvn spotless:apply -nsu -Dall
Expect a few messages from spotless on the first run, while it’s creating the index files, and then it should be real fast from the second run onwards.
Github actions won’t get a speedup unless we find a way to cache the index files… not sure that we want to do that honestly (might be
complicated to setup and maintain, on a per branch basis…)
On Sunday, 30 January 2022 5:02:31 AM AEDT Andrea Aime wrote:
mvn spotless:apply -nsu -Dall
I tried it on linux. This command works OK, unsurprisingly.
Looks like there were a couple of spots you missed in dealing with the old
coveo based formatter. See PR against your branch.
For novelty, I also tried it on a Windows 11 VM with netbeans. It was a bit
messy to do within the IDE, but I think it ran OK. It worked fine on the
command line (once I found maven).
I tried it on linux. This command works OK, unsurprisingly.
Looks like there were a couple of spots you missed in dealing with the old
coveo based formatter. See PR against your branch.
Thanks, issues noted, I’ll try to address them in the upcoming weekends.
For novelty, I also tried it on a Windows 11 VM with netbeans. It was a bit
messy to do within the IDE, but I think it ran OK. It worked fine on the
command line (once I found maven).
Great, thanks for testing!
Do we have anyone on OSX?
Cheers
Andrea
···
==
GeoServer Professional Services from the experts!
Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail
Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail
Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail