יחידה:ParamValidator: הבדלים בין גרסאות בדף
ignore לפרמטרים מספריים |
לפי דרישת בורה. |
||
| שורה 135: | שורה 135: | ||
local undec = { [true] = { [true] = empty_undeclared_numeric, [false] = undeclared_numeric }, [false] = { [true] = empty_undeclared, [false] = undeclared } } | local undec = { [true] = { [true] = empty_undeclared_numeric, [false] = undeclared_numeric }, [false] = { [true] = empty_undeclared, [false] = undeclared } } | ||
local dep = { [true] = empty_deprecated, [false] = deprecated } | local dep = { [true] = empty_deprecated, [false] = deprecated } | ||
local skip_empty_numeric = options['skip-empty-numeric'] or 0 | |||
-- DO THE WORK: if paramete does not appear in TD, add it to undeclared or empty-undeclared. | -- DO THE WORK: if paramete does not appear in TD, add it to undeclared or empty-undeclared. | ||
| שורה 144: | שורה 144: | ||
if not td_p[p_name] then -- fill undeclared or undeclared_empty, depends on noval | if not td_p[p_name] then -- fill undeclared or undeclared_empty, depends on noval | ||
local numeric = tonumber( p_name ) ~= nil | local numeric = tonumber( p_name ) ~= nil | ||
table.insert( undec[numeric][noval], p_name ) | local skip = numeric and noval and tonumber( p_name ) <= skip_empty_numeric -- special request of bora | ||
if not skip then | |||
table.insert( undec[numeric][noval], p_name ) | |||
end | |||
elseif td_p[p_name].deprecated then | elseif td_p[p_name].deprecated then | ||
table.insert( dep[noval], p_name ) | table.insert( dep[noval], p_name ) | ||