<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Ñб, 3 мар. 2018 г. в 0:05, Sandro Santilli <<a href="mailto:strk@kbt.io">strk@kbt.io</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Mar 02, 2018 at 10:49:23AM +0000, Darafei "KomÑpa" Praliaskouski wrote:<br>
<br>
> I volunteer to commit to maintain consistent PostGIS codebase formatting as<br>
> responsibility in project.<br>
><br>
> That would save everyone the hassle of thinking about styling, finding<br>
> exact version numbers of software they don't care about, and get no<br>
> frustration of broken CI because of code white space and not logic.<br>
<br>
How do you plan to do that ?<br>
I'd like to avoid a change history like:<br><br>
 ...<br>
<br>
Avoiding that would imply a pre-commit processing.<br></blockquote><div><br>We don't really need to format every commit, people "blend into" surrounding code most of time nowadays. I see it this way:<br><br>r2000 Format<br>r2001 Add feature<br>r2002 Add feature</div><div>r2003 Fix bug<br>...<br>r2055 Format per request of <username><br>r2056 Bugfix by <username><br>....<br>r2156 Format<br>r2157 Release 2.5.N+1 tag.<br><span style="color:rgb(0,0,0)">Â </span><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> The main reason I formatted lwgeom_geos.c file completely was it having<br>
> unmatched indentation levels that are hard to find manually.<br>
<br>
Theoretically those should be taken care of by editorconfig, does<br>
your editor support it ? Does it change all lines on exit or just<br>
the ones you tweak ?</blockquote><div><br>Sandro, it's not how editorconfig works. What it does is setting editor's tab stops width and type of characters to generate on pressing tab on the start of the line.<br>Think of it as of a replacement for vim's ModeLines, that used to be /* vim: set ts=8 sw=4 tw=0 noet : */.</div><div><br></div><div>It's going to auto-set the cursor to right spot for the newly written code after typing {<enter>, but not perform a reflow and fix a mismatch in indentation (error in level, not type) of old code.<br></div></div></div>