Hello Jim Apple, Philip Zeyliger, Tim Armstrong, I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9751 to look at the new patch set (#2). 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 those scripts over and adapt them to Impala. The Kudu scripts are mostly unchanged from the Kudu versions. The changes are: - The scripts are in ${IMPALA_HOME}/bin, requiring corresponding path fixups. - clang_tidy_gerrit.py has been renamed to clang_tidy_diff.py to make a distinction between this clang-tidy functionality and the existing run_clang_tidy.sh. For the same reason, tidy.sh is now tidy-diff.sh and the Kudu compile target "make tidy" is now "make tidy-diff". - bin/clang_tidy_diff.py use Impala's locations for clang-tidy and clang-tidy-diff.py - All of the clang-tidy diff includes comments indicating it is experimental. 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_diff.py. The script can be invoked directly, but this change also adds a CMake target (stolen from Kudu). A developer can run "make tidy-diff" 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_diff.py A bin/compile_flags.py.template A bin/get-upstream-commit.sh M bin/run_clang_tidy.sh A bin/tidy-diff.sh M cmake_modules/FindKRPC.cmake 8 files changed, 366 insertions(+), 4 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/51/9751/2 -- 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: newpatchset Gerrit-Change-Id: Ie2fb6a13400367fd3d12a4738bbb2dfc944466a7 Gerrit-Change-Number: 9751 Gerrit-PatchSet: 2 Gerrit-Owner: Joe McDonnell <joemcdonn...@cloudera.com> Gerrit-Reviewer: Jim Apple <jbapple-imp...@apache.org> Gerrit-Reviewer: Joe McDonnell <joemcdonn...@cloudera.com> Gerrit-Reviewer: Philip Zeyliger <phi...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>