From 849606b78fe250ed3315fb65a085ca6c860ddcaf Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 18 Jun 2026 22:54:54 +0800 Subject: format menus --- xmake/plugins/format/xmake.lua | 63 +++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 32 deletions(-) (limited to 'xmake/plugins/format/xmake.lua') diff --git a/xmake/plugins/format/xmake.lua b/xmake/plugins/format/xmake.lua index 5de1b8120..4adb2b85a 100644 --- a/xmake/plugins/format/xmake.lua +++ b/xmake/plugins/format/xmake.lua @@ -22,35 +22,34 @@ task("format") set_category("plugin") on_run("main") set_menu { - usage = "xmake format [options] [arguments]", - description = "Format the current project.", - options = { - {'s', "style", "kv", nil, "Set the path of .clang-format file, a coding style", - values = {"LLVM", "Google", "Chromium", "Mozilla", "WebKit"}}, - {nil, "create", "k", nil, "Create a .clang-format file from a coding style"}, - {'n', "dry-run", "k", nil, "Do not make any changes, just show the files that would be formatted."}, - {'e', "error", "k", nil, "If set, changes formatting warnings to errors."}, - {'j', "jobs", "kv", tostring(os.default_njob()), - "Set the number of parallel format jobs."}, - {'a', "all", "k", nil, "Format all targets."}, - {'g', "group", "kv", nil, "Format all targets of the given group. It support path pattern matching.", - "e.g.", - " xmake format -g test", - " xmake format -g test_*", - " xmake format --group=benchmark/*"}, - {'f', "files", "kv", nil, "Build the given source files.", - "e.g.", - " - xmake format --files=src/main.c", - " - xmake format --files='src/*.c' [target]", - " - xmake format --files='src/**.c|excluded_file.c'", - " - xmake format --files='src/main.c" .. path.envsep() .. "src/test.c'" }, - {}, - {nil, "targets", "vs", nil, "The target names. It will format all default targets if this parameter is not specified.", - "e.g.", - " xmake format target1 target2 ..." - , values = function (complete, opt) return import("private.utils.complete_helper.targets")(complete, opt) end } - } - } - - - + usage = "xmake format [options] [arguments]", + description = "Format the current project.", + options = { + {'s', "style", "kv", nil, "Set the path of .clang-format file, a coding style", + values = {"LLVM", "Google", "Chromium", "Mozilla", "WebKit"}}, + {nil, "create", "k", nil, "Create a .clang-format file from a coding style"}, + {'n', "dry-run", "k", nil, "Do not make any changes, just show the files that would be formatted."}, + {'e', "error", "k", nil, "If set, changes formatting warnings to errors."}, + {'j', "jobs", "kv", tostring(os.default_njob()), + "Set the number of parallel format jobs."}, + {'a', "all", "k", nil, "Format all targets."}, + {'g', "group", "kv", nil, "Format all targets of the given group. It support path pattern matching.", + "e.g.", + " xmake format -g test", + " xmake format -g test_*", + " xmake format --group=benchmark/*"}, + {'f', "files", "kv", nil, "Build the given source files.", + "e.g.", + " - xmake format --files=src/main.c", + " - xmake format --files='src/*.c' [target]", + " - xmake format --files='src/**.c|excluded_file.c'", + " - xmake format --files='src/main.c" .. path.envsep() .. "src/test.c'"}, + {}, + {nil, "targets", "vs", nil, "The target names. It will format all default targets if this parameter is not specified.", + "e.g.", + " xmake format target1 target2 ...", + values = function (complete, opt) + return import("private.utils.complete_helper.targets")(complete, opt) + end}, + } + } -- cgit v1.3.1 From 52d8bf18d71728d8d6a863bc16cad5a35afc4a8a Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 18 Jun 2026 22:57:25 +0800 Subject: fix typo --- xmake/actions/build/xmake.lua | 2 +- xmake/actions/clean/xmake.lua | 2 +- xmake/actions/install/xmake.lua | 2 +- xmake/actions/run/xmake.lua | 2 +- xmake/actions/test/xmake.lua | 4 ++-- xmake/actions/uninstall/xmake.lua | 2 +- xmake/plugins/format/xmake.lua | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) (limited to 'xmake/plugins/format/xmake.lua') diff --git a/xmake/actions/build/xmake.lua b/xmake/actions/build/xmake.lua index 0f7953268..c1b90d6f8 100644 --- a/xmake/actions/build/xmake.lua +++ b/xmake/actions/build/xmake.lua @@ -31,7 +31,7 @@ task("build") {'r', "rebuild", "k", nil, "Rebuild the target."}, {'a', "all", "k", nil, "Build all targets."}, {nil, "shallow", "k", nil, "Only re-build the given targets without dependencies."}, - {'g', "group", "kv", nil, "Build all targets of the given group. It support path pattern matching.", + {'g', "group", "kv", nil, "Build all targets of the given group. It supports path pattern matching.", "e.g.", " xmake -g test", " xmake -g test_*", diff --git a/xmake/actions/clean/xmake.lua b/xmake/actions/clean/xmake.lua index d236f2300..d20bec3dd 100644 --- a/xmake/actions/clean/xmake.lua +++ b/xmake/actions/clean/xmake.lua @@ -27,7 +27,7 @@ task("clean") shortname = 'c', options = { {'a', "all", "k", nil, "Clean all auto-generated files by xmake."}, - {'g', "group", "kv", nil, "Clean all targets of the given group. It support path pattern matching.", + {'g', "group", "kv", nil, "Clean all targets of the given group. It supports path pattern matching.", "e.g.", " xmake clean -g test", " xmake clean -g test_*", diff --git a/xmake/actions/install/xmake.lua b/xmake/actions/install/xmake.lua index ed8c5132c..e894e2787 100644 --- a/xmake/actions/install/xmake.lua +++ b/xmake/actions/install/xmake.lua @@ -34,7 +34,7 @@ task("install") {nil, "bindir", "kv", nil, "Set install binaries directory in INSTALLDIR/DIR. (default: ${installdir}/bin)"}, {nil, "libdir", "kv", nil, "Set install libraries directory in INSTALLDIR/DIR. (default: ${installdir}/lib)"}, {nil, "includedir", "kv", nil, "Set install includes directory in INSTALLDIR/DIR. (default: ${installdir}/include)"}, - {'g', "group", "kv", nil, "Install all targets of the given group. It support path pattern matching.", + {'g', "group", "kv", nil, "Install all targets of the given group. It supports path pattern matching.", "e.g.", " xmake install -g test", " xmake install -g test_*", diff --git a/xmake/actions/run/xmake.lua b/xmake/actions/run/xmake.lua index 3bc5c2cbd..5e4cbc8ad 100644 --- a/xmake/actions/run/xmake.lua +++ b/xmake/actions/run/xmake.lua @@ -28,7 +28,7 @@ task("run") options = { {'d', "debug", "k", nil, "Run and debug the given target."}, {'a', "all", "k", nil, "Run all targets."}, - {'g', "group", "kv", nil, "Run all targets of the given group. It support path pattern matching.", + {'g', "group", "kv", nil, "Run all targets of the given group. It supports path pattern matching.", "e.g.", " xmake run -g test", " xmake run -g test_*", diff --git a/xmake/actions/test/xmake.lua b/xmake/actions/test/xmake.lua index 9e113119a..9b13cfe58 100644 --- a/xmake/actions/test/xmake.lua +++ b/xmake/actions/test/xmake.lua @@ -25,7 +25,7 @@ task("test") usage = "xmake test [options] [tests]", description = "Run the project tests.", options = { - {'g', "group", "kv", nil, "Run all tests of the given group. It support path pattern matching.", + {'g', "group", "kv", nil, "Run all tests of the given group. It supports path pattern matching.", "e.g.", " xmake test -g test", " xmake test -g test_*", @@ -38,7 +38,7 @@ task("test") "Set the number of parallel compilation jobs."}, {'r', "rebuild", "k", nil, "Rebuild the target."}, {}, - {nil, "tests", "vs", nil, "The test names. It support pattern matching.", + {nil, "tests", "vs", nil, "The test names. It supports pattern matching.", "e.g.", " xmake test foo", " xmake test */foo", diff --git a/xmake/actions/uninstall/xmake.lua b/xmake/actions/uninstall/xmake.lua index aac569c6d..2e43c55ed 100644 --- a/xmake/actions/uninstall/xmake.lua +++ b/xmake/actions/uninstall/xmake.lua @@ -34,7 +34,7 @@ task("uninstall") {nil, "bindir", "kv", nil, "Set install binaries directory in INSTALLDIR/DIR. (default: ${installdir}/bin)"}, {nil, "libdir", "kv", nil, "Set install libraries directory in INSTALLDIR/DIR. (default: ${installdir}/lib)"}, {nil, "includedir", "kv", nil, "Set install includes directory in INSTALLDIR/DIR. (default: ${installdir}/include)"}, - {'g', "group", "kv", nil, "Uninstall all targets of the given group. It support path pattern matching.", + {'g', "group", "kv", nil, "Uninstall all targets of the given group. It supports path pattern matching.", "e.g.", " xmake uninstall -g test", " xmake uninstall -g test_*", diff --git a/xmake/plugins/format/xmake.lua b/xmake/plugins/format/xmake.lua index 4adb2b85a..964fa1d34 100644 --- a/xmake/plugins/format/xmake.lua +++ b/xmake/plugins/format/xmake.lua @@ -33,7 +33,7 @@ task("format") {'j', "jobs", "kv", tostring(os.default_njob()), "Set the number of parallel format jobs."}, {'a', "all", "k", nil, "Format all targets."}, - {'g', "group", "kv", nil, "Format all targets of the given group. It support path pattern matching.", + {'g', "group", "kv", nil, "Format all targets of the given group. It supports path pattern matching.", "e.g.", " xmake format -g test", " xmake format -g test_*", -- cgit v1.3.1