diff options
| author | ruki <[email protected]> | 2025-11-20 00:41:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-20 00:41:24 +0800 |
| commit | d4f99444640e55c2170c7407ca567af2047dc558 (patch) | |
| tree | 746a3513f4d8d9582461d2665a1a5bfb5fedfac9 /xmake/plugins/format/main.lua | |
| parent | 660450b6adb49c5a8b792a0c844a414d0a1b7379 (diff) | |
improve progress
Diffstat (limited to 'xmake/plugins/format/main.lua')
| -rw-r--r-- | xmake/plugins/format/main.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/plugins/format/main.lua b/xmake/plugins/format/main.lua index aa2814af8..743f67eb5 100644 --- a/xmake/plugins/format/main.lua +++ b/xmake/plugins/format/main.lua @@ -219,9 +219,13 @@ function main() runjobs("clang-format", function (index, total, opt) local sourcefile = sourcefiles[index] local format_argv = table.join(argv, {sourcefile}) - progress.show(index * 100 / total, "clang-format.formatting %s", sourcefile) + progress.show(opt.progress, "clang-format.formatting %s", sourcefile) os.execv(clang_format.program, format_argv, {curdir = projectdir}) - end, {total = #sourcefiles, comax = jobs}) + end, { + total = #sourcefiles, + comax = jobs, + showtips = false + }) format_time = os.mclock() - format_time progress.show(100, "${color.success}clang-format formatted %d files, spent %.3fs", #sourcefiles, format_time / 1000) end |
