summaryrefslogtreecommitdiff
path: root/xmake/plugins/format/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-02-02 00:58:03 +0800
committerruki <[email protected]>2023-02-02 00:58:03 +0800
commit1a14178101b25cddbdee751f382b7bd9a5b15088 (patch)
treef4641c1000e938901f2e9094a7d7411f8ff247ea /xmake/plugins/format/xmake.lua
parentb128cb98313b95b65f1d5bd2028831861ca80e13 (diff)
fix xmake format
Diffstat (limited to 'xmake/plugins/format/xmake.lua')
-rw-r--r--xmake/plugins/format/xmake.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/xmake/plugins/format/xmake.lua b/xmake/plugins/format/xmake.lua
index d3a00039f..ed2bf3d65 100644
--- a/xmake/plugins/format/xmake.lua
+++ b/xmake/plugins/format/xmake.lua
@@ -25,10 +25,13 @@ task("format")
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"..
- "(LLVM, Google, Chromium, Mozilla, WebKit) or key value string" },
- {nil, "create", "k", nil, "Create a .clang-format file from a coding style" },
- {'f', "files", "v", nil, "Set file path or glob pattern"}
+ {'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"},
+ {'f', "files", "v", nil, "Set files path with pattern",
+ "e.g.",
+ " - xmake format -f src/main.c",
+ " - xmake format -f 'src/*.c" .. path.envsep() .. "src/**.cpp'"}
}
}