summaryrefslogtreecommitdiff
path: root/xmake/actions/build/check.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-02-21 23:23:14 +0800
committerruki <[email protected]>2023-02-21 23:23:14 +0800
commit77c0a9dcfbbad5e72b3b59b02ebdf8f00a3141ac (patch)
treed45f6dd8b71b30942a8dcf438d3f6a3c0cb0d741 /xmake/actions/build/check.lua
parentd4a354d714f69c598945f91557f7a6eec2334161 (diff)
improve check stage
Diffstat (limited to 'xmake/actions/build/check.lua')
-rw-r--r--xmake/actions/build/check.lua17
1 files changed, 3 insertions, 14 deletions
diff --git a/xmake/actions/build/check.lua b/xmake/actions/build/check.lua
index 6bbb45b8a..e26e4f0d0 100644
--- a/xmake/actions/build/check.lua
+++ b/xmake/actions/build/check.lua
@@ -44,18 +44,8 @@ function _show(str, opt)
end
end
-function _check_target(target)
- local checkers = checker.checkers()
- for name, info in table.orderpairs(checkers) do
- -- just do some faster checkers
- if info.timely then
- import("private.check.checkers." .. name, {anonymous = true})({
- target = target, show = _show})
- end
- end
-end
-
-function main(targetname)
+function main(targetname, opt)
+ opt = opt or {}
-- get targets
local targets = {}
@@ -75,8 +65,7 @@ function main(targetname)
-- do check
local checkers = checker.checkers()
for name, info in table.orderpairs(checkers) do
- -- just do some faster checkers
- if info.timely then
+ if (info.build and opt.build) or (info.build_failure and opt.build_failure) then
local check = import("private.check.checkers." .. name, {anonymous = true})
for _, target in ipairs(targets) do
check({target = target, show = _show})