diff options
| author | ruki <[email protected]> | 2022-11-13 08:39:15 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-13 08:39:15 +0800 |
| commit | 16eaeb0888fbcf269464d8d6670c965c64379074 (patch) | |
| tree | 797ebe44ae579caf58670b6dd95019b433ae70c9 /xmake/plugins/format/main.lua | |
| parent | a9f83eadd54b817fea8e5ff523b8b66b351f5133 (diff) | |
Update main.lua
Diffstat (limited to 'xmake/plugins/format/main.lua')
| -rw-r--r-- | xmake/plugins/format/main.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/plugins/format/main.lua b/xmake/plugins/format/main.lua index 2a63a93a8..17ce73066 100644 --- a/xmake/plugins/format/main.lua +++ b/xmake/plugins/format/main.lua @@ -56,12 +56,12 @@ function main() -- create style file local argv = {} local projectdir = project.directory() - if option.get("create-style") then - table.insert(argv, "--style=" .. option.get("create-style")) + if option.get("create") then + table.insert(argv, "--style=" .. (option.get("style") or "Google")) table.insert(argv, "--dump-config") os.execv(clang_format.program, argv, {stdout = path.join(projectdir, ".clang-format"), curdir = projectdir}) return - end + end -- set style file if option.get("style") then @@ -70,7 +70,7 @@ function main() -- inplace flag table.insert(argv, "-i") - + -- set file to format if option.get("file") then table.insert(argv, option.get("file")) |
