From dedf2caa2d69e323e05b7bc1a6a1198adbe40d0d Mon Sep 17 00:00:00 2001 From: A2va <49582555+A2va@users.noreply.github.com> Date: Sat, 3 Dec 2022 14:09:34 +0100 Subject: Header files fix Rename argument --- xmake/plugins/format/main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xmake/plugins/format/main.lua') diff --git a/xmake/plugins/format/main.lua b/xmake/plugins/format/main.lua index add8a7663..228e46517 100644 --- a/xmake/plugins/format/main.lua +++ b/xmake/plugins/format/main.lua @@ -72,7 +72,7 @@ function main() table.insert(argv, "-i") -- set file to format - if option.get("file") then + if option.get("files") then -- list of files/path to format local files = option.get("file"):split(" ") for _, f in ipairs(files) do @@ -86,11 +86,11 @@ function main() for targetname, target in pairs(project.targets()) do -- source files for _, source in ipairs(target:sourcefiles()) do - table.insert(argv, path.join(projectdir,source)) + table.insert(argv, path.join(projectdir, source)) end -- header files - for _, header in ipairs(target:sourcefiles()) do - table.insert(argv, path.join(projectdir,header)) + for _, header in ipairs(target:headerfiles()) do + table.insert(argv, path.join(projectdir, header)) end end end -- cgit v1.3.1