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
1 file changed