Mercurial > prosody-hg
comparison core/configmanager.lua @ 13391:5c783cf58ae7
configmanager: Fix linter issues
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 08 Dec 2023 15:37:13 +0000 |
| parents | 905a6009f60d |
| children | ac60c21015c7 |
comparison
equal
deleted
inserted
replaced
| 13390:905a6009f60d | 13391:5c783cf58ae7 |
|---|---|
| 144 end; | 144 end; |
| 145 values = function (self) | 145 values = function (self) |
| 146 return it.values(self:value()); | 146 return it.values(self:value()); |
| 147 end; | 147 end; |
| 148 }, { | 148 }, { |
| 149 __index = function (t, k) | 149 __index = function (t, k) --luacheck: ignore 212/t |
| 150 error("Unknown config option operation: '"..k.."'", 2); | 150 error("Unknown config option operation: '"..k.."'", 2); |
| 151 end; | 151 end; |
| 152 }); | 152 }); |
| 153 | 153 |
| 154 __call = function (self, v2) | 154 __call = function (self, v2) |
| 192 end | 192 end |
| 193 return val; | 193 return val; |
| 194 end | 194 end |
| 195 | 195 |
| 196 if g_val ~= nil then | 196 if g_val ~= nil then |
| 197 t_insert(warnings, ("%s:%d: direct usage of the Lua API is deprecated - replace `%s` with `Lua.%s`"):format(config_file, get_line_number(config_file), k, k)); | 197 t_insert( |
| 198 warnings, | |
| 199 ("%s:%d: direct usage of the Lua API is deprecated - replace `%s` with `Lua.%s`"):format( | |
| 200 config_file, | |
| 201 get_line_number(config_file), | |
| 202 k, | |
| 203 k | |
| 204 ) | |
| 205 ); | |
| 198 end | 206 end |
| 199 | 207 |
| 200 return g_val; | 208 return g_val; |
| 201 end, | 209 end, |
| 202 __newindex = function (_, k, v) | 210 __newindex = function (_, k, v) |
