summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-01-31 22:54:01 +0800
committerruki <[email protected]>2023-01-31 22:54:01 +0800
commit73ad9cdddf5168a19a738bd098a775c22a390a85 (patch)
treef3f98cabe02eca5d89a793713be1d782f6a8cd15
parent7dccbc709bafaec3be01d9723b7b9150f7092a5b (diff)
add xmake check stub
-rw-r--r--xmake/plugins/check/main.lua25
-rw-r--r--xmake/plugins/check/xmake.lua30
-rw-r--r--xmake/plugins/show/main.lua1
-rw-r--r--xmake/plugins/show/xmake.lua37
4 files changed, 68 insertions, 25 deletions
diff --git a/xmake/plugins/check/main.lua b/xmake/plugins/check/main.lua
new file mode 100644
index 000000000..8b34cbcaf
--- /dev/null
+++ b/xmake/plugins/check/main.lua
@@ -0,0 +1,25 @@
+--!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 main.lua
+--
+
+-- imports
+import("core.base.option")
+
+function main()
+end
diff --git a/xmake/plugins/check/xmake.lua b/xmake/plugins/check/xmake.lua
new file mode 100644
index 000000000..5fce74cd6
--- /dev/null
+++ b/xmake/plugins/check/xmake.lua
@@ -0,0 +1,30 @@
+--!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 xmake.lua
+--
+
+task("check")
+ set_category("plugin")
+ on_run("main")
+ set_menu {
+ usage = "xmake check [options] [arguments]",
+ description = "Check the project configuration.",
+ options = {
+ }
+ }
+
diff --git a/xmake/plugins/show/main.lua b/xmake/plugins/show/main.lua
index 39b2bc0a0..71538649a 100644
--- a/xmake/plugins/show/main.lua
+++ b/xmake/plugins/show/main.lua
@@ -26,7 +26,6 @@ function _show_list(name)
assert(#name > 0 and import("lists." .. name, {try = true, anonymous = true}), "unknown list name(%s)", name)()
end
--- main entry
function main()
-- show list?
diff --git a/xmake/plugins/show/xmake.lua b/xmake/plugins/show/xmake.lua
index 79eef1c0d..f652ed620 100644
--- a/xmake/plugins/show/xmake.lua
+++ b/xmake/plugins/show/xmake.lua
@@ -18,34 +18,23 @@
-- @file xmake.lua
--
--- define task
task("show")
-
- -- set category
set_category("plugin")
-
- -- on run
on_run("main")
-
- -- set menu
set_menu {
- -- usage
- usage = "xmake show [options] [arguments]"
-
- -- description
- , description = "Show the given project information."
-
- -- options
- , options =
- {
- {'l', "list" , "kv" , nil , "Show the values list of the given name."
- , values = function (complete, opt)
- return import("list").lists()
- end},
- {'t', "target" , "kv" , nil , "Show the information of the given target."
- , values = function (complete, opt) return import("private.utils.complete_helper.targets")(complete, opt) end }
- }
- }
+ usage = "xmake show [options] [arguments]",
+ description = "Show the given project information.",
+ options = {
+ {'l', "list", "kv", nil, "Show the values list of the given name.",
+ values = function (complete, opt)
+ return import("list").lists()
+ end},
+ {'t', "target", "kv", nil, "Show the information of the given target.",
+ values = function (complete, opt)
+ return import("private.utils.complete_helper.targets")(complete, opt)
+ end}
+ }
+ }