diff options
| -rw-r--r-- | xmake/plugins/check/checker.lua | 2 | ||||
| -rw-r--r-- | xmake/plugins/check/main.lua | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/xmake/plugins/check/checker.lua b/xmake/plugins/check/checker.lua index 257bc6b41..fb3cf11b7 100644 --- a/xmake/plugins/check/checker.lua +++ b/xmake/plugins/check/checker.lua @@ -30,7 +30,7 @@ function checkers() ["api.target.languages"] = {description = "Check languages configuration in target."}, ["api.target.packages"] = {description = "Check packages configuration in target."}, -- clang tidy checker - ["clang.tidy"] = {description = "Check project code using clang-tidy."} + ["clang.tidy"] = {description = "Check project code using clang-tidy.", showstats = false} } _g._CHECKERS = checkers end diff --git a/xmake/plugins/check/main.lua b/xmake/plugins/check/main.lua index dd190624d..9ec6d03fd 100644 --- a/xmake/plugins/check/main.lua +++ b/xmake/plugins/check/main.lua @@ -74,10 +74,17 @@ function _check(group_or_name, arguments) assert(#checked_checkers > 0, "checker(%s) not found!", group_or_name) -- do checkers + local showstats for _, name in ipairs(checked_checkers) do + local info = checkers[name] + if showstats == nil and info and info.showstats ~= nil then + showstats = info.showstats + end import("checkers." .. name, {anonymous = true})(arguments) end - checker.show_stats() + if showstats ~= false then + checker.show_stats() + end end function main() |
