diff options
| author | ruki <[email protected]> | 2023-02-01 22:58:56 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-02-01 22:58:56 +0800 |
| commit | 527419011e0bf460e3de4a08949bcaf9be160849 (patch) | |
| tree | f3b8776beda6952978ad3aa6c3e10d867ef53ab8 | |
| parent | d2f69f28647643f501628a793fbc8d8a83728b84 (diff) | |
check package values
| -rw-r--r-- | xmake/plugins/check/checkers/api/api_checker.lua | 2 | ||||
| -rw-r--r-- | xmake/plugins/check/checkers/api/target/packages.lua | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/xmake/plugins/check/checkers/api/api_checker.lua b/xmake/plugins/check/checkers/api/api_checker.lua index 6fc9c1cae..349a7b402 100644 --- a/xmake/plugins/check/checkers/api/api_checker.lua +++ b/xmake/plugins/check/checkers/api/api_checker.lua @@ -71,7 +71,7 @@ function check_targets(apiname, opt) local values = target:get(apiname) for _, value in ipairs(values) do if not valueset:has(value) then - _show(apiname, value, target, {level = "warning"}) + _show(apiname, value, target, {level = opt.level or "warning"}) end end end diff --git a/xmake/plugins/check/checkers/api/target/packages.lua b/xmake/plugins/check/checkers/api/target/packages.lua index fe3de2f01..e34f602db 100644 --- a/xmake/plugins/check/checkers/api/target/packages.lua +++ b/xmake/plugins/check/checkers/api/target/packages.lua @@ -18,5 +18,15 @@ -- @file packages.lua -- +-- imports +import("core.project.project") +import(".api_checker") + function main() + local packages = {} + local requires = project.required_packages() + if requires then + table.join2(packages, table.orderkeys(requires)) + end + api_checker.check_targets("packages", {values = packages, level = "note"}) end |
