[Tarantool-patches] [PATCH v5 01/10] Add initial luacheck config
Igor Munkin
imun at tarantool.org
Fri May 29 14:20:40 MSK 2020
Sergey,
On 28.05.20, Sergey Bronnikov wrote:
> On 18:31 Thu 28 May , Sergey Bronnikov wrote:
>
> <snipped>
>
> > > > + "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.
>
> <snipped>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list