<div dir="ltr"><div>I definitely want to add some checks to that script!</div><div><br></div>A lot of what I'm doing is just reading through the code.  I have been taking notes in hopes that I can convert some of the grep's that I do into the script.  Right now, most of them are super high on the false positive side of things.  e.g.<div><br></div><div>find . -name \*.cpp | xargs egrep 'TRUE|FALSE'<br><div><br></div><div>I also have been running a really old version of cppcheck.  It's pretty clear that cppcheck 1.60.1 is much weaker than the current head.</div></div><div><br></div><div>I did just commit my play version of a clang-format config file that loosely matches GDAL style.  It definitely needs help/discussion...  I had put it in a gist, but better to get it into the code base where it might be seen by more interested folks.  If we can make a config file that works for the project, authors will be free to write in whatever style they want and then just transform to GDALs style for commit.  On other projects, I personally write some pretty sloppily formatted code and use clang-format to get it more readable before submitting.  I know people who use clang-format to convert files to their prefered style for editing and then convert it back to a project's style for all edits.</div><div><br></div><div><a href="https://trac.osgeo.org/gdal/changeset/36467">https://trac.osgeo.org/gdal/changeset/36467</a><br></div><div><br></div><div>-k</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 23, 2016 at 6:28 AM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="font-family:'monospace';font-size:9pt;font-weight:400;font-style:normal"><span class="">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">On mercredi 23 novembre 2016 05:43:44 CET Kurt Schwehr wrote:</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> Even,</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> Thank you for your work with getting cppcheck setup and fixing a huge</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> number of warnings (and suppressing a large number of false positives)!!!</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
</span><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">I encourage you as well to extend the tooling so as to check that all the cleanups you do do not regress. I guess you must have some ad-hoc scripts. If there were available, that would at least enable new developments to meet those standards. And if they don't pass on the whole code base, I guess it would be possible to run them on white-listed directories (or exclude black-listed directories)</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">QGIS has a scripts/prepare-commit.sh that handles mostly code formatting (reformatting it automatically), but something similar that would handle formatting and/or other checks could be useful.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Even</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">-- </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Spatialys - Geospatial professional services</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a></p></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--<div><a href="http://schwehr.org" target="_blank">http://schwehr.org</a></div></div>
</div>