From b790634db1c1bf14a678a873cfaff6aa13727237 Mon Sep 17 00:00:00 2001 From: Ketho Date: Sun, 13 Nov 2022 21:30:12 +0100 Subject: [PATCH] Fix warnings for require paths --- Lua/Emmy/Emmy.lua | 2 +- Lua/Emmy/EmmyLiterals.lua | 2 +- Lua/Tests/Emmy.lua | 4 ++-- Lua/ToTypeScript/CVar.lua | 4 ++-- Lua/ToTypeScript/GlobalString.lua | 4 ++-- Lua/ToTypeScript/LuaEnum.lua | 2 +- Lua/Util/wowtoolsparser.lua | 2 +- Lua/WikiParser/WikiParser.lua | 12 ++++++------ Lua/WikiParser/WikiText/FunctionArgument.lua | 4 ++-- Lua/WikiParser/WikiText/NonBlizzardDocumented.lua | 2 +- Lua/WikiParser/WikiText/WikiText.lua | 2 +- Lua/WikiParser/XmlParser.lua | 6 +++--- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Lua/Emmy/Emmy.lua b/Lua/Emmy/Emmy.lua index 9db063fe..f396ba66 100644 --- a/Lua/Emmy/Emmy.lua +++ b/Lua/Emmy/Emmy.lua @@ -1,4 +1,4 @@ -local Util = require("Lua/Util/Util") +local Util = require("Lua.Util.Util") local Emmy = {} diff --git a/Lua/Emmy/EmmyLiterals.lua b/Lua/Emmy/EmmyLiterals.lua index f5dbe58b..fa8f0ed9 100644 --- a/Lua/Emmy/EmmyLiterals.lua +++ b/Lua/Emmy/EmmyLiterals.lua @@ -1,4 +1,4 @@ -local Util = require("Lua/Util/Util") +local Util = require("Lua.Util.Util") local EmmyLiterals = {} diff --git a/Lua/Tests/Emmy.lua b/Lua/Tests/Emmy.lua index 71da3a4d..44a5ba0a 100644 --- a/Lua/Tests/Emmy.lua +++ b/Lua/Tests/Emmy.lua @@ -1,5 +1,5 @@ -local Util = require("Lua/Util/Util") -local Emmy = require("Lua/Emmy/Emmy") +local Util = require("Lua.Util.Util") +local Emmy = require("Lua.Emmy.Emmy") local Tests = {} diff --git a/Lua/ToTypeScript/CVar.lua b/Lua/ToTypeScript/CVar.lua index 12ea7bb7..cb5584b6 100644 --- a/Lua/ToTypeScript/CVar.lua +++ b/Lua/ToTypeScript/CVar.lua @@ -1,6 +1,6 @@ -local Util = require("Lua/Util/Util") +local Util = require("Lua.Util.Util") -- cache should already be created at this point -local data = require("Lua/Data/cache/CVars") +local data = require("Lua.Data.cache.CVars") local pre = [[ interface CVarInterface { diff --git a/Lua/ToTypeScript/GlobalString.lua b/Lua/ToTypeScript/GlobalString.lua index 0ec24527..d10596a0 100644 --- a/Lua/ToTypeScript/GlobalString.lua +++ b/Lua/ToTypeScript/GlobalString.lua @@ -1,7 +1,7 @@ local lfs = require "lfs" -local Util = require("Lua/Util/Util") -local parser = require("Lua/Util/wowtoolsparser") +local Util = require("Lua.Util.Util") +local parser = require("Lua.Util.wowtoolsparser") Util:MakeDir("src/data/globalstring") diff --git a/Lua/ToTypeScript/LuaEnum.lua b/Lua/ToTypeScript/LuaEnum.lua index d8a5c665..670bfd2f 100644 --- a/Lua/ToTypeScript/LuaEnum.lua +++ b/Lua/ToTypeScript/LuaEnum.lua @@ -1,4 +1,4 @@ -local Util = require("Lua/Util/Util") +local Util = require("Lua.Util.Util") local PATH = "Lua/Data/cache/LuaEnum.lua" local URL = "https://raw.githubusercontent.com/Ketho/BlizzardInterfaceResources/mainline/Resources/LuaEnum.lua" diff --git a/Lua/Util/wowtoolsparser.lua b/Lua/Util/wowtoolsparser.lua index b43dcb14..7f60253d 100644 --- a/Lua/Util/wowtoolsparser.lua +++ b/Lua/Util/wowtoolsparser.lua @@ -3,7 +3,7 @@ local lfs = require "lfs" local https = require "ssl.https" local cjson = require "cjson" local cjsonutil = require "cjson.util" -local csv = require("Lua/Util/csv/csv") +local csv = require("Lua.Util.csv.csv") local parser = {} diff --git a/Lua/WikiParser/WikiParser.lua b/Lua/WikiParser/WikiParser.lua index 3e0d821d..ea3bb5ae 100644 --- a/Lua/WikiParser/WikiParser.lua +++ b/Lua/WikiParser/WikiParser.lua @@ -1,18 +1,18 @@ -local Util = require("Lua/Util/Util") -local Emmy = require("Lua/Emmy/Emmy") +local Util = require("Lua.Util.Util") +local Emmy = require("Lua.Emmy.Emmy") -- this place is a mess -local wowpedia_arguments = require("Lua/WikiParser/WikiText/FunctionArgument") -local nonBlizzDocumented = require("Lua/WikiParser/WikiText/NonBlizzardDocumented")[1] +local wowpedia_arguments = require("Lua.WikiParser.WikiText.FunctionArgument") +local nonBlizzDocumented = require("Lua.WikiParser.WikiText.NonBlizzardDocumented")[1] -local parserData = require("Lua/WikiParser/XmlParser") +local parserData = require("Lua.WikiParser.XmlParser") local validated, nonvalidated, emmyLua if type(parserData) == "table" then validated, nonvalidated, emmyLua, emmyLuaMulti = unpack(parserData) else return end -local converter = require("Lua/WikiParser/WikiText/WowpediaConverter") +local converter = require("Lua.WikiParser.WikiText.WowpediaConverter") local convertedApi = converter:ConvertApi(validated) local fileIndex = 0 diff --git a/Lua/WikiParser/WikiText/FunctionArgument.lua b/Lua/WikiParser/WikiText/FunctionArgument.lua index f428e2fc..5e362eea 100644 --- a/Lua/WikiParser/WikiText/FunctionArgument.lua +++ b/Lua/WikiParser/WikiText/FunctionArgument.lua @@ -1,5 +1,5 @@ -local nonBlizzDocumented = require("Lua/WikiParser/WikiText/NonBlizzardDocumented")[1] -local WikiText = require("Lua/WikiParser/WikiText/WikiText") +local nonBlizzDocumented = require("Lua.WikiParser.WikiText.NonBlizzardDocumented")[1] +local WikiText = require("Lua.WikiParser.WikiText.WikiText") -- this has to be done manually because symbols get turned into HTML char codes when downloaded -- local file = io.open("Lua/DataInput/World_of_Warcraft_API.txt", "r") diff --git a/Lua/WikiParser/WikiText/NonBlizzardDocumented.lua b/Lua/WikiParser/WikiText/NonBlizzardDocumented.lua index ac02575b..18e3c73d 100644 --- a/Lua/WikiParser/WikiText/NonBlizzardDocumented.lua +++ b/Lua/WikiParser/WikiText/NonBlizzardDocumented.lua @@ -1,4 +1,4 @@ -local Util = require("Lua/Util/Util") +local Util = require("Lua.Util.Util") local globalApi = Util:DownloadAndRun( string.format("Lua/Data/cache/GlobalAPI_%s.lua", BRANCH), diff --git a/Lua/WikiParser/WikiText/WikiText.lua b/Lua/WikiParser/WikiText/WikiText.lua index b9fac905..0b486570 100644 --- a/Lua/WikiParser/WikiText/WikiText.lua +++ b/Lua/WikiParser/WikiText/WikiText.lua @@ -1,6 +1,6 @@ local xml2lua = require "xml2lua" local handler = require "xmlhandler.tree" -local Util = require("Lua/Util/Util") +local Util = require("Lua.Util.Util") --Util:MakeDir("cache_lua") local INPUT = "Lua/Data/cache/World_of_Warcraft_API.xml" diff --git a/Lua/WikiParser/XmlParser.lua b/Lua/WikiParser/XmlParser.lua index 01cb7c7c..4bc828a3 100644 --- a/Lua/WikiParser/XmlParser.lua +++ b/Lua/WikiParser/XmlParser.lua @@ -1,11 +1,11 @@ local xml2lua = require "xml2lua" local handler = require "xmlhandler.tree" -local Util = require("Lua/Util/Util") +local Util = require("Lua.Util.Util") local PATH = "Lua/Data/cache/Wowpedia_API.xml" local function GetUndocumentedApi() - local nonBlizzDocumented = unpack(require("Lua/WikiParser/WikiText/NonBlizzardDocumented")) + local nonBlizzDocumented = unpack(require("Lua.WikiParser.WikiText.NonBlizzardDocumented")) local t = {} for k in pairs(nonBlizzDocumented) do table.insert(t, "API "..k) @@ -26,7 +26,7 @@ SaveWowpediaExport(PATH, undoc) -- todo: refactor; still need to write these files for later local function WriteApiFiles() local output = "Lua/Data/output/NonBlizzardDocumented.txt" - local nonBlizzDocumented, blizzDocumented = unpack(require("Lua/WikiParser/WikiText/NonBlizzardDocumented")) + local nonBlizzDocumented, blizzDocumented = unpack(require("Lua.WikiParser.WikiText.NonBlizzardDocumented")) local file1 = io.open(output, "w") for _, name in pairs(Util:SortTable(nonBlizzDocumented)) do file1:write("API "..name.."\n")