Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion script/cli/check.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ end
if count == 0 then
print(lang.script('CLI_CHECK_SUCCESS'))
else
local outpath = LOGPATH .. '/check.json'
local outpath = CHECK_OUT_PATH
if outpath == nil then
outpath = LOGPATH .. '/check.json'
end
util.saveFile(outpath, jsonb.beautify(results))

print(lang.script('CLI_CHECK_RESULTS', count, outpath))
Expand Down
6 changes: 6 additions & 0 deletions script/global.d.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ DOC = ''
---@type string | '"Error"' | '"Warning"' | '"Information"' | '"Hint"'
CHECKLEVEL = 'Warning'

--Where to write the check results (JSON).
--
--If nil, use `LOGPATH/check.json`.
---@type string|nil
CHECK_OUT_PATH = ''

---@type 'trace' | 'debug' | 'info' | 'warn' | 'error'
LOGLEVEL = 'warn'

Expand Down