@@ -26,6 +26,7 @@ import("core.project.config")
26
26
import (" core.project.project" )
27
27
import (" lib.detect.find_tool" )
28
28
import (" async.runjobs" )
29
+ import (" utils.progress" )
29
30
import (" private.action.require.impl.packagenv" )
30
31
import (" private.action.require.impl.install_packages" )
31
32
@@ -118,10 +119,11 @@ function _check_sourcefiles(clang_tidy, sourcefiles, opt)
118
119
end
119
120
table.insert (argv , sourcefile )
120
121
end
122
+ progress .show (100 , " clang-tidy.analyzing %s .. %d" , sourcefiles [1 ], # sourcefiles )
121
123
local argsfile = os .tmpfile () .. " .args.txt"
122
124
io .writefile (argsfile , os .args (argv ))
123
125
argv = {" @" .. argsfile }
124
- os .execv (clang_tidy .program , argv , {curdir = projectdir })
126
+ os .vrunv (clang_tidy .program , argv , {curdir = projectdir })
125
127
os .rm (argsfile )
126
128
else
127
129
-- split sourcefiles
@@ -143,8 +145,9 @@ function _check_sourcefiles(clang_tidy, sourcefiles, opt)
143
145
144
146
-- run clang-tidy
145
147
runjobs (" checker.tidy" , function (index , total , opt )
146
- local argv = sourcefiles_jobs [index ]
147
- os .execv (clang_tidy .program , argv , {curdir = projectdir })
148
+ local tidy_argv = sourcefiles_jobs [index ]
149
+ progress .show (index * 100 / total , " clang-tidy.analyzing %s .. %d" , tidy_argv [1 ], # tidy_argv )
150
+ os .vrunv (clang_tidy .program , tidy_argv , {curdir = projectdir })
148
151
end , {total = # sourcefiles_jobs , comax = opt .jobs or os .default_njob ()})
149
152
end
150
153
end
0 commit comments