commit | 88db4c207487a3af57e2ca165029f605fe02078a | [log] [tgz] |
---|---|---|
author | Ed Tanous <edtanous@google.com> | Tue Jan 25 15:15:59 2022 -0800 |
committer | Ed Tanous <edtanous@google.com> | Tue Jan 25 15:24:52 2022 -0800 |
tree | bcb0dcb908721f53cb0151c4e7b3abde243a354e | |
parent | 32768b878248216d1499790a003ad4ce57a26a79 [diff] |
Make clang-tidy propose diffs clang-tidy supports a -fix option, which will directly apply the diffs that it's able to do automatically to the tree. This is advantageous for developers, because it gives them a quick way to "do as the robot commands" when run locally, and makes it more obvious in the output exactly what's being asked for in a changeset. Unfortunately, to use this feature, the run-clang-tidy script needs to be run from the build folder directly, which involves a cd into the directory. We actually already had to do this for cmake elsewhere in this file, but it didn't get propagated to meson builds. At the same time, when run-clang-tidy fails to run, catch the error and run the same "git diff" procedure that we run elsewhere such that the diff is printed to the console. Tested: Updated clang-tidy to include a new check for https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/50660 and ran run-unit-test-docker.sh, and observed that both the bmcweb tree had been updated locally, and the diff was printed to the console output. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I04ef8c136c8e72e7787cebe018cfe2289d7f2c59
Build script for CI jobs in Jenkins.