chore: enable more modules and fix types
ci/woodpecker/pr/docker-build Pipeline was successful Details
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/build-and-run Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details

This commit is contained in:
Aire-One 2023-11-12 20:08:51 +01:00
parent 2126752e87
commit fd3ba675e7
5 changed files with 52 additions and 26 deletions

View File

@ -820,4 +820,8 @@ describe("Scrap documentation", function()
token = "function",
}
}))
-- TODO : should parse correctly types from
-- <td><span class="types"><span class="type">pattern</span>, <a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4" target="_blank">string</a> or <span class="type">gradient</span></span></td>
end)

View File

@ -34,33 +34,33 @@ local property: Property = {
"theme.lua",
-- Utility libraries
"gears.debug",
"gears.filesystem",
"gears.geometry",
"gears.math",
"gears.object",
"gears.protected_call",
"gears.sort",
"gears.string",
"gears.table",
"gears.wallpaper",
-- "gears.debug",
-- "gears.filesystem",
-- "gears.geometry",
-- "gears.math",
-- "gears.object",
-- "gears.protected_call",
-- "gears.sort",
-- "gears.string",
-- "gears.table",
-- "gears.wallpaper",
-- Theme related libraries
"beautiful",
-- "beautiful",
"gears.color",
"gears.shape",
-- "gears.shape",
-- Classes
"awful.widget.common",
"gears.cache",
"gears.matrix",
"menubar.icon_theme",
"menubar.index_theme",
"signals",
"wibox.drawable",
"wibox.hierarchy",
"wibox.widget.base",
"xproperties",
-- "awful.widget.common",
-- "gears.cache",
-- "gears.matrix",
-- "menubar.icon_theme",
-- "menubar.index_theme",
-- "signals",
-- "wibox.drawable",
-- "wibox.hierarchy",
-- "wibox.widget.base",
-- "xproperties",
-- Documentation
"Authors",

View File

@ -18,7 +18,11 @@ local function parse_parameter_types(parameter_type: string): { string }
end
local types = {}
for t in stringx.split(parameter_type, " or "):iter() do
for t in stringx.split(parameter_type)
:filter(
function(s: string): boolean
return s ~= "or" and s ~= ","
end):iter() do
table.insert(types, t)
end
return types

View File

@ -27,14 +27,28 @@ local type New_Node_By_Name = { string : New_Node }
-- EVERYTHING IN HERE IS TEMPORARY AND SHOULD BE REMOVED!
local node_fixer <const>: { string : New_Node_By_Name } = {
-- ["gears.color"] = {
-- ["to_rgba_string"] = {
-- parameters = {
-- { token = "variable", name = "color", types = { "string" } },
-- { token = "variable", name = "fallback", types = { "string" } },
-- },
-- },
-- ["change_opacity"] = {
-- parameters = {
-- { token = "variable", name = "input", types = { "string" } },
-- { token = "variable", name = "opacity", types = { "number" } },
-- },
-- },
-- },
["gears.surface"] = {
["apply_shape_bounding"] = {
apply_shape_bounding = {
parameters = {
{ token = "variable", name = "draw", types = { "any" } },
{ token = "variable", name = "shape", types = { "Gears_Shape_Function" } },
{ token = "variable", name = "...", types = { "any" } },
}
}
},
},
},
}

View File

@ -26,6 +26,10 @@ local type_map <const>: { string : string } = {
-- fixes we shouldn't have to do (We need to PR Awesome to fix the doc)
font = "string", -- doesn't exist
func = "function", -- doesn't exist
["gears.color"] = "any", -- shouldn't be here
gradient = "string", -- doesn't exist
pattern = "string", -- doesn't exist
raw_curface = "Cairo_Surface", -- typo
shap = "Gears_Shape_Function", -- typo
tale = "table", -- typo