<div dir="auto"><div class="gmail_extra" dir="auto"><div class="gmail_quote">On 10 Dec 2017 14:52, "Even Rouault" <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="font-family:'Sans Serif';font-size:9pt;font-weight:400;font-style:normal">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br></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">(*) sed "s/NULL/nullptr/g" is not an option, as there is a significant number of occurences of NULL being in a string (think to SQL statements).</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">clang-tidy works great, but as it does a true parsing of the code, you need to pass it the same -D and -I switches as the compiler would take. I guess there would perhaps be a way of creating a CXX script that could be used as a fake compiler and would redirect to clang-tidy.</p></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Even, best results clang-tidy delivers if used with clang compile database (JSON file). Its easy to generate one with CMake, but that's obviously not an (convenient) option for GDAL. </div><div dir="auto"><br></div><div dir="auto">Have you tried Bear instead? </div><div dir="auto"><a href="https://github.com/rizsotto/Bear">https://github.com/rizsotto/Bear</a><br></div><div dir="auto"><br></div><div dir="auto">It can intercept compile commands from any build system on Linux. </div><div dir="auto"><br></div><div dir="auto">Mateusz </div><div class="gmail_extra" dir="auto"></div></div>