unit-test: meson: Use clang-tidy-fix
In meson 1.3.0 `clang-tidy-fix` target is added if `.clang-tidy` file
exists. This could be used to run clang-tidy with the fixes applied to
the source code.
Change the unit-test script to use `clang-tidy-fix` for meson projects.
Tested: Manually verify in a meson proejct that the `clang-tidy` check
fixes the code if issues are found.
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ic6e1c6253b7fba075c26d9aad607854b49be9b23
diff --git a/scripts/unit-test.py b/scripts/unit-test.py
index 9368b38..d841834 100755
--- a/scripts/unit-test.py
+++ b/scripts/unit-test.py
@@ -1039,7 +1039,7 @@
if not os.path.isfile(".openbmc-no-clang"):
check_call_cmd("meson", "compile", "-C", build_dir)
try:
- check_call_cmd("ninja", "-C", build_dir, "clang-tidy")
+ check_call_cmd("ninja", "-C", build_dir, "clang-tidy-fix")
except subprocess.CalledProcessError:
check_call_cmd(
"git", "-C", CODE_SCAN_DIR, "--no-pager", "diff"