[Tarantool-patches] [PATCH v5 01/10] Add initial luacheck config
Sergey Bronnikov
sergeyb at tarantool.org
Tue Nov 10 17:30:54 MSK 2020
Hi,
On 14:20 Fri 29 May , Igor Munkin wrote:
> > > > > + "build/**/*.lua",
> > > > > + "src/box/lua/serpent.lua", -- third-party source code
> > > > > + "test/app/*.lua",
> > > > > + "test/app-tap/lua/serializer_test.lua",
> > > >
> > > > Why did you exclude the file above?
> > >
> > > Actually I don't remember a reason, right now it is useless,
> > > so removed it from a list.
> >
> > the reason is:
> > "test/app-tap/lua/serializer_test.lua:261:18: (E011) expected expression near 'М'"
> > and I don't know how to fix it. So added exclusion back.
>
> OK, it looks like luacheck doesn't allow non-ascii symbols in unquoted
> strings. After applying the following patch luacheck reports only
> warnings.
>
> ================================================================================
>
> diff --git a/test/app-tap/lua/serializer_test.lua b/test/app-tap/lua/serializer_test.lua
> index 2a668f898..8aabc2617 100644
> --- a/test/app-tap/lua/serializer_test.lua
> +++ b/test/app-tap/lua/serializer_test.lua
> @@ -258,7 +258,7 @@ local function test_table(test, s, is_array, is_map)
> test:ok(is_map(s.encode({k1 = 'v1', k2 = 'v2', k3 = 'v3'})), "map is map")
>
> -- utf-8 pairs
> - rt(test, s, {Метапеременная = { 'Метазначение' }})
> + rt(test, s, {['Mетапеременная'] = { 'Метазначение' }})
> rt(test, s, {test = { 'Результат' }})
>
> local arr = setmetatable({1, 2, 3, k1 = 'v1', k2 = 'v2', 4, 5},
>
> ================================================================================
>
> I guess you can file an issue to luacheck repo queue regarding this
> issue.
Did it - https://github.com/mpeterv/luacheck/issues/207
More information about the Tarantool-patches
mailing list