I think adding .gitattributes file is a good idea to simplify environment setup. -- Jody Garnett
On Wed, 8 Dec 2021 at 03:19, Andrea Aime <andrea.a...@geosolutionsgroup.com> wrote: > On Tue, Dec 7, 2021 at 7:17 PM Andrea Aime < > andrea.a...@geosolutionsgroup.com> wrote: > >> Reformatter upgrade >> >> Java 11 required for latest version (aside, latest Wicket too). >> >> https://github.com/geotools/geotools/pull/3697 >> >> Also, project closer to get un-maintained, fork pending: >> >> https://github.com/coveooss/fmt-maven-plugin/issues/105 >> >> Two Options >> >> 1. >> >> Apply patch with log fix to older release & use that for now >> 2. >> >> Migrate to a different formatting plugin >> 1. >> >> e.g. “spotless >> <https://github.com/diffplug/spotless/tree/main/plugin-maven>” >> format plugin. This is not actually as much as it sounds, as the >> underlying >> formatter is still the same, mainly just changes in how the plugin is >> invoked (pom + doc changes mostly) >> >> Leaning towards spotless because it’s better supported, but no strong >> opinion. >> > > Tried spotless and... found problems. > As said, the formatter can apply other tools, like java-format, but seems > to add its own extra sauce. > One of those bits is line endings handling, which only has four options, > regardless of which one we choose, > they will end up uniformly applying one line ending convention to all > files: > > https://github.com/diffplug/spotless/blob/master/lib/src/main/java/com/diffplug/spotless/LineEnding.java > > Turns out, we have a fair amount of inconsistency, so quite a bit of files > get fully reformatted. > Good thing? Maybe? > > Our developer guide says to set the autocrlf to "input" > <https://docs.geotools.org/latest/userguide/build/source.html>, which, as > far as I know, stores files with > LF in the repository, but then checks them out with the platform preferred > line ending. > The default is false, which results in files being stored in the repo as > they are. > Turns out, we have a fair amount of files stored in the repo with CRLF, > which spotless just > reformats to LF (on my machine). E.g., on a clean checkout: > > ~/devel/git-gt/modules/library (spotless) $ file > coverage/src/main/java/org/geotools/image/io/BaseGridCoverageProgressAdapter.java > coverage/src/main/java/org/geotools/image/io/BaseGridCoverageProgressAdapter.java: > ASCII text, *with CRLF line terminators* > > Part of the issue is due to how we suggested the setup of autocrlf... > takes one to read the dev guide > and take action on the git settings... Using the .gitattributes file > <https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings#per-repository-settings> > would have probably been better... > Not sure what would happen if we applied it now though. > > Thoughts? > > The simpler option is to just forget about it and move on to do the small > fork of the coveo plugin... > > Cheers > Andrea > > == > GeoServer Professional Services from the experts! > > Visit http://bit.ly/gs-services-us for more information. > == > > Ing. Andrea Aime > @geowolf > Technical Lead > > GeoSolutions Group > phone: +39 0584 962313 > > fax: +39 0584 1660272 > > mob: +39 333 8128928 > > https://www.geosolutionsgroup.com/ > > http://twitter.com/geosolutions_it > > ------------------------------------------------------- > > 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 > _______________________________________________ > Geoserver-devel mailing list > Geoserver-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-devel >
_______________________________________________ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel