diff options
| author | JassJam <[email protected]> | 2026-02-28 16:50:26 +0000 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-14 00:10:58 +0800 |
| commit | 4b56123d797578f1abec0c3d507282d9e5bc8f3b (patch) | |
| tree | b3c78a033302d717e06e9bb2c64407956ce4eaab | |
| parent | 78d6ffb3674247d917f22779cf2e684c73470bfd (diff) | |
refactor: dont declare local function for private function
| -rw-r--r-- | xmake/rules/csharp/buildcmd.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/csharp/modules/itemgroups.lua | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/xmake/rules/csharp/buildcmd.lua b/xmake/rules/csharp/buildcmd.lua index b8f85360a..614cc5a25 100644 --- a/xmake/rules/csharp/buildcmd.lua +++ b/xmake/rules/csharp/buildcmd.lua @@ -20,7 +20,7 @@ import("modules.csharp_common", {rootdir = os.scriptdir(), alias = "csharp_common"}) -local function _get_output_mtime(target, targetfile, targetdirabs) +function _get_output_mtime(target, targetfile, targetdirabs) local mtime = targetfile and os.mtime(targetfile) or nil if mtime then return mtime diff --git a/xmake/rules/csharp/modules/itemgroups.lua b/xmake/rules/csharp/modules/itemgroups.lua index 6d105fd45..6a7506bba 100644 --- a/xmake/rules/csharp/modules/itemgroups.lua +++ b/xmake/rules/csharp/modules/itemgroups.lua @@ -18,7 +18,7 @@ -- @file itemsgroups.lua -- -local function _normalize_relative(fromdir, targetpath) +function _normalize_relative(fromdir, targetpath) local relpath = path.relative(targetpath, fromdir) or targetpath if os.host() == "windows" then relpath = relpath:gsub("\\", "/") @@ -26,7 +26,7 @@ local function _normalize_relative(fromdir, targetpath) return relpath end -local function _collect_cs_sourcefiles(context) +function _collect_cs_sourcefiles(context) local csfiles = {} for _, sourcefile in ipairs(context.target:sourcefiles()) do if path.extension(sourcefile):lower() == ".cs" then @@ -38,7 +38,7 @@ local function _collect_cs_sourcefiles(context) return table.unique(csfiles) end -local function _collect_project_references(context) +function _collect_project_references(context) if context.opt.skip_deps then return {} end @@ -56,7 +56,7 @@ local function _collect_project_references(context) return table.unique(references) end -local function _get_nuget_info(pkg) +function _get_nuget_info(pkg) local requirestr = pkg:requirestr() or "" local splitinfo = requirestr:trim():split("%s+") if #splitinfo == 0 then @@ -90,7 +90,7 @@ local function _get_nuget_info(pkg) return pkgname, version end -local function _collect_nuget_references(context) +function _collect_nuget_references(context) local versions = {} for _, pkg in ipairs(context.target:orderpkgs()) do local namespace = pkg:namespace() |
