summaryrefslogtreecommitdiff
path: root/xmake/modules/private/check
diff options
context:
space:
mode:
authorruki <[email protected]>2025-11-20 00:46:17 +0800
committerruki <[email protected]>2025-11-20 00:46:17 +0800
commitbb23918bcc9423cecc98275759d529adf41f4ca5 (patch)
tree2665c846d3f89604fdfb24aa88ff94af0e74f803 /xmake/modules/private/check
parentd4f99444640e55c2170c7407ca567af2047dc558 (diff)
add
Diffstat (limited to 'xmake/modules/private/check')
-rw-r--r--xmake/modules/private/check/checkers/clang/tidy.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/xmake/modules/private/check/checkers/clang/tidy.lua b/xmake/modules/private/check/checkers/clang/tidy.lua
index edd671db3..66c9feb87 100644
--- a/xmake/modules/private/check/checkers/clang/tidy.lua
+++ b/xmake/modules/private/check/checkers/clang/tidy.lua
@@ -155,6 +155,19 @@ function _check_sourcefiles(clang_tidy, sourcefiles, opt)
-- run clang-tidy
local analyze_time = os.mclock()
+ local runjobs_opt = {
+ total = #sourcefiles,
+ comax = opt.jobs or os.default_njob(),
+ showtips = false
+ }
+ -- Only set timer for multirow refresh mode
+ if progress.is_multirow() then
+ runjobs_opt.timeout = 500
+ runjobs_opt.on_timer = function (running_indices)
+ -- Periodically refresh multirow progress to update elapsed time
+ progress.refresh()
+ end
+ end
runjobs("checker.tidy", function (index, total, job_opt)
local sourcefile = sourcefiles[index]
local tidy_argv = table.join(argv, {sourcefile})
@@ -163,7 +176,7 @@ function _check_sourcefiles(clang_tidy, sourcefiles, opt)
projectdir = projectdir,
progress = job_opt.progress
})
- end, {total = #sourcefiles, comax = opt.jobs or os.default_njob(), showtips = false})
+ end, runjobs_opt)
analyze_time = os.mclock() - analyze_time
progress.show(100, "${color.success}clang-tidy analyzed %d files, spent %.3fs", #sourcefiles, analyze_time / 1000)
end