summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-02-02 22:33:28 +0800
committerruki <[email protected]>2023-02-02 22:33:28 +0800
commit1804f783f3b7fa873e9a0f745788cf86518dda26 (patch)
tree5d6d3243d69e0e8de58e277bae362047042cb79a
parenteb427b3a97c9dd8b73d0c3f28bf34df58f840cd8 (diff)
add warnings checker
-rw-r--r--xmake/plugins/check/checker.lua1
-rw-r--r--xmake/plugins/check/checkers/api/target/warnings.lua26
2 files changed, 27 insertions, 0 deletions
diff --git a/xmake/plugins/check/checker.lua b/xmake/plugins/check/checker.lua
index 1b1f15813..b49233328 100644
--- a/xmake/plugins/check/checker.lua
+++ b/xmake/plugins/check/checker.lua
@@ -29,6 +29,7 @@ function checkers()
-- target api checkers
["api.target.version"] = {description = "Check version configuration in target."},
["api.target.optimize"] = {description = "Check optimize configuration in target."},
+ ["api.target.warnings"] = {description = "Check warnings configuration in target."},
["api.target.languages"] = {description = "Check languages configuration in target."},
["api.target.packages"] = {description = "Check packages configuration in target."},
-- clang tidy checker
diff --git a/xmake/plugins/check/checkers/api/target/warnings.lua b/xmake/plugins/check/checkers/api/target/warnings.lua
new file mode 100644
index 000000000..2d2159e91
--- /dev/null
+++ b/xmake/plugins/check/checkers/api/target/warnings.lua
@@ -0,0 +1,26 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015-present, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file warnings.lua
+--
+
+-- imports
+import(".api_checker")
+
+function main()
+ api_checker.check_targets("warnings", {values = {"none", "less", "more", "all", "allextra", "everything", "error"}})
+end