Joe McDonnell has uploaded this change for review. ( http://gerrit.cloudera.org:8080/9751
Change subject: [experimental] Clang Tidy Diff trial balloon ...................................................................... [experimental] Clang Tidy Diff trial balloon Kudu has a nice script that does clang tidy on a diff rather than the whole source code. Kudu uses this for a Tidy Bot that comments on Gerrit reviews if the code change introduces an issue. This is an experimental change to bring that scripts over and adapt them to Impala. The Kudu scripts are identical except: - The scripts are in ${IMPALA_HOME}/bin, requiring corresponding path fixups. - bin/clang_tidy_gerrit.py use Impala's locations for clang-tidy and clang-tidy-diff.py The main change is to find a way to get the appropriate compilation flags for clang. This is hard-coded in Kudu, but our build is more complicated. This pulls the appropriate compile flags from CMake's internal variables and uses them to populate a templated python file (bin/compile_flags.py.template) that can be imported by clang_tidy_gerrit.py. The script can be invoked directly, but this change also adds a CMake target (stolen from Kudu). A developer can run "make tidy" and the script will be invoked for changes since the last upstream commit. Change-Id: Ie2fb6a13400367fd3d12a4738bbb2dfc944466a7 --- M CMakeLists.txt M be/CMakeLists.txt A bin/clang_tidy_gerrit.py A bin/compile_flags.py.template A bin/get-upstream-commit.sh A bin/tidy.sh M cmake_modules/FindKRPC.cmake 7 files changed, 343 insertions(+), 1 deletion(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/51/9751/1 -- To view, visit http://gerrit.cloudera.org:8080/9751 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2fb6a13400367fd3d12a4738bbb2dfc944466a7 Gerrit-Change-Number: 9751 Gerrit-PatchSet: 1 Gerrit-Owner: Joe McDonnell <joemcdonn...@cloudera.com>