diff options
| author | ruki <[email protected]> | 2025-09-15 23:14:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-09-15 23:14:20 +0800 |
| commit | 5a1d0e69b9648a82fd98633cfb54c90e6df51ab5 (patch) | |
| tree | d594cc8ce444dd999a5511a5c5a0dae26c05de24 | |
| parent | f2e4d4c3060f8eb94a25c1ed7878911287c60b8c (diff) | |
improve tips
| -rw-r--r-- | xmake/modules/private/check/checkers/clang/tidy.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xmake/modules/private/check/checkers/clang/tidy.lua b/xmake/modules/private/check/checkers/clang/tidy.lua index d7c7374ac..6342e5cfb 100644 --- a/xmake/modules/private/check/checkers/clang/tidy.lua +++ b/xmake/modules/private/check/checkers/clang/tidy.lua @@ -26,6 +26,7 @@ import("core.project.config") import("core.project.project") import("lib.detect.find_tool") import("async.runjobs") +import("utils.progress") import("private.action.require.impl.packagenv") import("private.action.require.impl.install_packages") @@ -118,10 +119,11 @@ function _check_sourcefiles(clang_tidy, sourcefiles, opt) end table.insert(argv, sourcefile) end + progress.show(100, "clang-tidy.analyzing %s .. %d", sourcefiles[1], #sourcefiles) local argsfile = os.tmpfile() .. ".args.txt" io.writefile(argsfile, os.args(argv)) argv = {"@" .. argsfile} - os.execv(clang_tidy.program, argv, {curdir = projectdir}) + os.vrunv(clang_tidy.program, argv, {curdir = projectdir}) os.rm(argsfile) else -- split sourcefiles @@ -143,8 +145,9 @@ function _check_sourcefiles(clang_tidy, sourcefiles, opt) -- run clang-tidy runjobs("checker.tidy", function (index, total, opt) - local argv = sourcefiles_jobs[index] - os.execv(clang_tidy.program, argv, {curdir = projectdir}) + local tidy_argv = sourcefiles_jobs[index] + progress.show(index * 100 / total, "clang-tidy.analyzing %s .. %d", tidy_argv[1], #tidy_argv) + os.vrunv(clang_tidy.program, tidy_argv, {curdir = projectdir}) end, {total = #sourcefiles_jobs, comax = opt.jobs or os.default_njob()}) end end |
