Skip to content

Commit ac9c9c7

Browse files
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 <[email protected]> Change-Id: Ic6e1c6253b7fba075c26d9aad607854b49be9b23
1 parent 16baaf7 commit ac9c9c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/unit-test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ def analyze(self):
10391039
if not os.path.isfile(".openbmc-no-clang"):
10401040
check_call_cmd("meson", "compile", "-C", build_dir)
10411041
try:
1042-
check_call_cmd("ninja", "-C", build_dir, "clang-tidy")
1042+
check_call_cmd("ninja", "-C", build_dir, "clang-tidy-fix")
10431043
except subprocess.CalledProcessError:
10441044
check_call_cmd(
10451045
"git", "-C", CODE_SCAN_DIR, "--no-pager", "diff"

0 commit comments

Comments
 (0)