[Tarantool-patches] [PATCH 2/5][v3] codehealth: fix typos
Sergey Bronnikov
sergeyb at tarantool.org
Wed Aug 9 17:41:12 MSK 2023
Hi, Sergey!
thanks for review
On 8/9/23 15:58, Sergey Kaplun wrote:
> Hi, Sergey!
> Thanks for the patch!
> It's LGTM, but I found more spellcheck errors in the code in:
>
> * <src/*> files, that are maintained by us
> | ./src/lj_memprof.c:261: resourses ==> resources
> | ./src/lj_memprof.c:390: resourses ==> resources
>
> * <test/LuaJIT-tests/> since they are not probably be updated ever in
> future:
> | ./test/LuaJIT-tests/README.md:46: alot ==> a lot, allot
>
> * <test/PUC-Rio-Lua-5.1-tests/> since they are not be updated ever in
> future:
> | ./test/PUC-Rio-Lua-5.1-tests/api.lua:20: allignment ==> alignment
> | ./test/PUC-Rio-Lua-5.1-tests/api.lua:336: acess ==> access
> | ./test/PUC-Rio-Lua-5.1-tests/db.lua:564: acessing ==> accessing
> | ./test/PUC-Rio-Lua-5.1-tests/gc.lua:311: ressurect ==> resurrect
> | ./test/PUC-Rio-Lua-5.1-tests/locals.lua:118: fiels ==> feels, fields, files, phials
> | ./test/PUC-Rio-Lua-5.1-tests/math.lua:168: convertions ==> conversions
> | ./test/PUC-Rio-Lua-5.1-tests/strings.lua:159: formated ==> formatted
>
> * <test/lua-Harness-tests/*> -- this is debatable, since this part isn't
> maintained by us (we still may apply patches from the upstream).
> | ./test/lua-Harness-tests/231-metatable.t:398: heigth ==> height
> | ./test/lua-Harness-tests/232-object.t:119: insuficient ==> insufficient
> | ./test/lua-Harness-tests/232-object.t:133: insuficient ==> insufficient
> | ./test/lua-Harness-tests/232-object.t:93: classe ==> class, classes
> | ./test/lua-Harness-tests/241-standalone.t:241: runned ==> ran, run, ruined
> | ./test/lua-Harness-tests/242-luac.t:275: endianess ==> endianness
>
> * <test/tarantool-tests/*>:
> | ./test/tarantool-tests/lj-350-sload-typecheck.test.lua:2: asembling ==> assembling
> | ./test/tarantool-tests/lj-357-arm64-hrefk.test.lua:20: invarinat ==> invariant
> | ./test/tarantool-tests/misclib-memprof-lapi.test.lua:2: indepentent ==> independent
>
> <snipped>
>
All fixes applied except typos for lua-Harness. I sent a patch with
fixes to maintainer of lua-Harness François Perrad.
See the patch below.
diff --git a/src/lj_memprof.c b/src/lj_memprof.c
index c600c4f0..2e33d88d 100644
--- a/src/lj_memprof.c
+++ b/src/lj_memprof.c
@@ -258,7 +258,7 @@ int lj_memprof_start(struct lua_State *L, const
struct lj_memprof_options *opt)
lua_assert(opt->len != 0);
if (mp->state != MPS_IDLE) {
- /* Clean up resourses. Ignore possible errors. */
+ /* Clean up resources. Ignore possible errors. */
opt->on_stop(opt->ctx, opt->buf);
return PROFILE_ERRRUN;
}
@@ -387,7 +387,7 @@ void lj_memprof_add_trace(const struct GCtrace *tr)
int lj_memprof_start(struct lua_State *L, const struct
lj_memprof_options *opt)
{
UNUSED(L);
- /* Clean up resourses. Ignore possible errors. */
+ /* Clean up resources. Ignore possible errors. */
opt->on_stop(opt->ctx, opt->buf);
return PROFILE_ERRUSE;
}
diff --git a/test/PUC-Rio-Lua-5.1-tests/api.lua
b/test/PUC-Rio-Lua-5.1-tests/api.lua
index c955ebf9..7ec2f1ba 100644
--- a/test/PUC-Rio-Lua-5.1-tests/api.lua
+++ b/test/PUC-Rio-Lua-5.1-tests/api.lua
@@ -17,7 +17,7 @@ function pack(...) return arg end
print('testing C API')
--- testing allignment
+-- testing alignment
a = T.d2s(12458954321123)
assert(string.len(a) == 8) -- sizeof(double)
assert(T.s2d(a) == 12458954321123)
@@ -333,7 +333,7 @@ F = function (x)
if A ~= nil then
assert(type(A) == "userdata")
assert(T.udataval(A) == B)
- debug.getmetatable(A) -- just acess it
+ debug.getmetatable(A) -- just access it
end
A = x -- ressucita userdata
B = udval
diff --git a/test/PUC-Rio-Lua-5.1-tests/db.lua
b/test/PUC-Rio-Lua-5.1-tests/db.lua
index b148c2dd..0d4692e1 100644
--- a/test/PUC-Rio-Lua-5.1-tests/db.lua
+++ b/test/PUC-Rio-Lua-5.1-tests/db.lua
@@ -561,7 +561,7 @@ t[1] = "'error'"
checktraceback(co, t)
--- test acessing line numbers of a coroutine from a resume inside
+-- test accessing line numbers of a coroutine from a resume inside
-- a C function (this is a known bug in Lua 5.0)
local function g(x)
diff --git a/test/PUC-Rio-Lua-5.1-tests/gc.lua
b/test/PUC-Rio-Lua-5.1-tests/gc.lua
index 10e1f2dd..a1c6e7c7 100644
--- a/test/PUC-Rio-Lua-5.1-tests/gc.lua
+++ b/test/PUC-Rio-Lua-5.1-tests/gc.lua
@@ -308,7 +308,7 @@ do
assert(getmetatable(o) == tt)
-- create new objects during GC
local a = 'xuxu'..(10+3)..'joao', {}
- ___Glob = o -- ressurect object!
+ ___Glob = o -- resurrect object!
newproxy(o) -- creates a new one with same metatable
print(">>> closing state " .. "<<<\n")
end
diff --git a/test/PUC-Rio-Lua-5.1-tests/math.lua
b/test/PUC-Rio-Lua-5.1-tests/math.lua
index f66ce196..63efc5dd 100644
--- a/test/PUC-Rio-Lua-5.1-tests/math.lua
+++ b/test/PUC-Rio-Lua-5.1-tests/math.lua
@@ -165,7 +165,7 @@ stat(a)
a = nil
--- testing implicit convertions
+-- testing implicit conversions
local a,b = '10', '20'
assert(a*b == 200 and a+b == 30 and a-b == -10 and a/b == 0.5 and -b
== -20)
diff --git a/test/PUC-Rio-Lua-5.1-tests/strings.lua
b/test/PUC-Rio-Lua-5.1-tests/strings.lua
index 3cc1c1b2..0818e390 100644
--- a/test/PUC-Rio-Lua-5.1-tests/strings.lua
+++ b/test/PUC-Rio-Lua-5.1-tests/strings.lua
@@ -156,7 +156,7 @@ assert(string.format('"-%20s.20s"', string.rep("%",
2000)) ==
string.format("%q", "-"..string.rep("%", 2000)..".20s"))
--- longest number that can be formated
+-- longest number that can be formatted
assert(string.len(string.format('%99.99f', -1e308)) >= 100)
assert(loadstring("return 1\n--comentário sem EOL no final")() == 1)
diff --git a/test/tarantool-tests/lj-350-sload-typecheck.test.lua
b/test/tarantool-tests/lj-350-sload-typecheck.test.lua
index 33380170..c6876473 100644
--- a/test/tarantool-tests/lj-350-sload-typecheck.test.lua
+++ b/test/tarantool-tests/lj-350-sload-typecheck.test.lua
@@ -1,5 +1,5 @@
local tap = require('tap')
--- Test file to demonstrate the incorrect GC64 JIT asembling
+-- Test file to demonstrate the incorrect GC64 JIT assembling
-- `IR_SLOAD`.
-- See also https://github.com/LuaJIT/LuaJIT/pull/350.
local test = tap.test('lj-350-sload-typecheck'):skipcond({
diff --git a/test/tarantool-tests/lj-357-arm64-hrefk.test.lua
b/test/tarantool-tests/lj-357-arm64-hrefk.test.lua
index 8db8bbfc..23e06d8c 100644
--- a/test/tarantool-tests/lj-357-arm64-hrefk.test.lua
+++ b/test/tarantool-tests/lj-357-arm64-hrefk.test.lua
@@ -17,7 +17,7 @@ local t = {hrefk = 0}
-- chooses the same register as a base register for offset and
-- destination in LDR instruction.
-- We need 1028 iterations = 1024 iteration for 10 table rehashing
--- (create side traces for invarinat and variant loop part) +
+-- (create side traces for invariant and variant loop part) +
-- 3 for trace initialize + 1 to run the bad trace.
local START = 1028
local STOP = 1
diff --git a/test/tarantool-tests/misclib-memprof-lapi.test.lua
b/test/tarantool-tests/misclib-memprof-lapi.test.lua
index 20cfef21..8132cf08 100644
--- a/test/tarantool-tests/misclib-memprof-lapi.test.lua
+++ b/test/tarantool-tests/misclib-memprof-lapi.test.lua
@@ -1,5 +1,5 @@
-- XXX: This comment is a reminder to reimplement memprof tests
--- assertions to make them more indepentent to the changes made.
+-- assertions to make them more independent to the changes made.
local tap = require("tap")
local test = tap.test("misc-memprof-lapi"):skipcond({
['Test requires JIT enabled'] = not jit.status(),
More information about the Tarantool-patches
mailing list