summaryrefslogtreecommitdiff
path: root/xmake/plugins/check/checkers/api/target/version.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-02-20 22:47:16 +0800
committerruki <[email protected]>2023-02-20 22:47:16 +0800
commit2e04812cae7e38d9b097b40cce90b34ec6fb8fca (patch)
treefc25c1fb5259908a3a6d4c6e97ca22a2361cb19a /xmake/plugins/check/checkers/api/target/version.lua
parent1ceae4d5e4b2786c395a705f7c89601e6ef8aedc (diff)
improve target checkers
Diffstat (limited to 'xmake/plugins/check/checkers/api/target/version.lua')
-rw-r--r--xmake/plugins/check/checkers/api/target/version.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/plugins/check/checkers/api/target/version.lua b/xmake/plugins/check/checkers/api/target/version.lua
index e476cd8d4..889864f5b 100644
--- a/xmake/plugins/check/checkers/api/target/version.lua
+++ b/xmake/plugins/check/checkers/api/target/version.lua
@@ -22,8 +22,9 @@
import("core.base.semver")
import(".api_checker")
-function main()
- api_checker.check_targets("version", {check = function(target, value)
+function main(opt)
+ opt = opt or {}
+ api_checker.check_targets("version", table.join(opt, {check = function(target, value)
local errors
local ok = try {
function()
@@ -37,5 +38,5 @@ function main()
}
}
return ok, errors
- end, level = "error"})
+ end, level = "error"}))
end