1- local lclient = require ' lclient'
2- local furi = require ' file-uri'
3- local ws = require ' workspace'
4- local files = require ' files'
5- local diag = require ' provider.diagnostic'
6- local util = require ' utility'
7- local json = require ' json-beautify'
8- local lang = require ' language'
9- local define = require ' proto.define'
10- local config = require ' config.config'
1+ local lclient = require ' lclient'
2+ local furi = require ' file-uri'
3+ local ws = require ' workspace'
4+ local files = require ' files'
5+ local diag = require ' provider.diagnostic'
6+ local util = require ' utility'
7+ local json = require ' json-beautify'
8+ local lang = require ' language'
9+ local define = require ' proto.define'
10+ local config = require ' config.config'
11+ local timer = require ' timer'
12+ local platform = require ' bee.platform'
1113
1214if type (CHECK ) ~= ' string' then
1315 print ((' The argument of CHECK must be a string, but got %s' ):format (type (CHECK )))
@@ -34,6 +36,8 @@ lclient():start(function (client)
3436 results [params .uri ] = params .diagnostics
3537 end )
3638
39+ io.write (lang .script (' CLI_CHECK_INITING' ))
40+
3741 ws .awaitReady (rootUri )
3842
3943 local checkLevel = define .DiagnosticSeverity [CHECKLEVEL ] or define .DiagnosticSeverity .Warning
@@ -53,9 +57,16 @@ lclient():start(function (client)
5357 diag .doDiagnostic (uri , true )
5458 if os.clock () - lastClock > 0.2 then
5559 lastClock = os.clock ()
56- print ((' %d/%d' ):format (i , max ))
60+ local output = ' \x0D '
61+ .. (' >' ):rep (math.ceil (i / max * 20 ))
62+ .. (' =' ):rep (20 - math.ceil (i / max * 20 ))
63+ .. ' '
64+ .. (' 0' ):rep (# tostring (max ) - # tostring (i ))
65+ .. tostring (i ) .. ' /' .. tostring (max )
66+ io.write (output )
5767 end
5868 end
69+ io.write (' \x0D ' )
5970end )
6071
6172local count = 0
0 commit comments