diff options
| author | ruki <[email protected]> | 2023-02-01 23:14:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-02-01 23:14:57 +0800 |
| commit | 8658eae245dafc3b539c6b4280455773caa0ef8a (patch) | |
| tree | 85ca743be696cffc4d098dffd9cfb758f5094fc3 /xmake/plugins/check/checkers/api/api_checker.lua | |
| parent | 87cceb8898b238fa0391ac5ee7085555a408d842 (diff) | |
stats results
Diffstat (limited to 'xmake/plugins/check/checkers/api/api_checker.lua')
| -rw-r--r-- | xmake/plugins/check/checkers/api/api_checker.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/plugins/check/checkers/api/api_checker.lua b/xmake/plugins/check/checkers/api/api_checker.lua index b48cd56e6..e71a28b24 100644 --- a/xmake/plugins/check/checkers/api/api_checker.lua +++ b/xmake/plugins/check/checkers/api/api_checker.lua @@ -22,6 +22,7 @@ import("core.base.option") import("core.base.hashset") import("core.project.project") +import("..checker") -- show result function _show(apiname, value, target, opt) @@ -59,18 +60,23 @@ function _show(apiname, value, target, opt) if not showed[infostr] then cprint(infostr) showed[infostr] = true + return true end end -- check api configuration in targets function check_targets(apiname, opt) opt = opt or {} + local level = opt.level or "warning" local valueset = hashset.from(opt.values) for _, target in pairs(project.targets()) do local values = target:get(apiname) for _, value in ipairs(values) do if not valueset:has(value) then - _show(apiname, value, target, {level = opt.level or "warning"}) + local reported = _show(apiname, value, target, {level = level}) + if reported then + checker.update_stats(level) + end end end end |
