clang-tidy is a nice tool for catching likely bugs and definitely poor
syntax. You can use it on your latest patch with:

git diff asf-gerrit/master |
"${IMPALA_TOOLCHAIN}/llvm-${IMPALA_LLVM_VERSION}/share/clang/clang-tidy-diff.py"
-clang-tidy-binary
"${IMPALA_TOOLCHAIN}/llvm-${IMPALA_LLVM_VERSION}/bin/clang-tidy" -p 1

You can check the whole repo with:

bin/run_clang_tidy.sh

The latter produces a lot of output and takes 10-15 minutes. Warnings
are lines that end in ']'.

Time permitting, I will expand the checks we use and try to integrate
this into tests or code review tools. I added it to the wiki:

https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=65868536

Reply via email to