summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-02-01 23:00:27 +0800
committerruki <[email protected]>2023-02-01 23:00:27 +0800
commit87cceb8898b238fa0391ac5ee7085555a408d842 (patch)
treea9246ff45d6fb8daac47e0419b04d4f8eab0a967
parent527419011e0bf460e3de4a08949bcaf9be160849 (diff)
improve show level
-rw-r--r--xmake/plugins/check/checkers/api/api_checker.lua5
-rw-r--r--xmake/plugins/check/xmake.lua3
2 files changed, 3 insertions, 5 deletions
diff --git a/xmake/plugins/check/checkers/api/api_checker.lua b/xmake/plugins/check/checkers/api/api_checker.lua
index 349a7b402..b48cd56e6 100644
--- a/xmake/plugins/check/checkers/api/api_checker.lua
+++ b/xmake/plugins/check/checkers/api/api_checker.lua
@@ -27,10 +27,9 @@ import("core.project.project")
function _show(apiname, value, target, opt)
opt = opt or {}
- -- match level?
+ -- match level? verbose: note/warning/error, default: warning/error
local level = opt.level
- local level_option = option.get("level")
- if level_option and level_option ~= "all" and level_option ~= level then
+ if not option.get("verbose") and level == "note" then
return
end
diff --git a/xmake/plugins/check/xmake.lua b/xmake/plugins/check/xmake.lua
index 0aadc0c8f..d4a7dc19a 100644
--- a/xmake/plugins/check/xmake.lua
+++ b/xmake/plugins/check/xmake.lua
@@ -27,11 +27,10 @@ task("check")
options = {
{'l', "list", "k", nil, "Show all supported checkers list."},
{nil, "info", "kv", nil, "Show the given checker information."},
- {nil, "level", "kv", "all", "Just show information for the given level.", values = {"note", "warning", "error", "all"}},
{nil, "checkers", "v", "api", "Use the given checkers to check project.",
"e.g.",
" - xmake check api",
- " - xmake check --level=error api.target",
+ " - xmake check -v api.target",
" - xmake check api.target.languages",
"",
"The supported checkers list:",