Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and enable codespell
@ 2023-10-11 16:52 Sergey Bronnikov via Tarantool-patches
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 1/4][v2] codehealth: fix typos Sergey Bronnikov via Tarantool-patches
                   ` (4 more replies)
  0 siblings, 5 replies; 26+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2023-10-11 16:52 UTC (permalink / raw)
  To: tarantool-patches, Sergey Kaplun, max.kokryashkin

From: Sergey Bronnikov <sergeyb@tarantool.org>

Sometimes we do mistakes and typos. Reviewers spend a lot of time in
proofreading of comments, commit messages and code itself and reports
typos to authors. The idea is to automate a part of work made by
reviewers and highlight all typos locally or in continuous integration,
before sending patches to review.

Patches fixes typos in our own source code and enables codespell in CI.

Branch: https://github.com/tarantool/luajit/tree/ligurio/gh-xxxx-spellchecking

Changes v2:

- removed patches with checkpatch.pl integration (CMake target and
  Github workflow)
- added codespell integration (CMake target and Github workflow)
- addressed Sergey's comments

Sergey Bronnikov (4):
  codehealth: fix typos
  test: fix codestyle
  cmake: introduce target with codespell
  ci: enable codespell

 .github/workflows/lint.yml                    |  3 +-
 CMakeLists.txt                                |  1 +
 cmake/CodeSpell.cmake                         | 36 +++++++++++++++++++
 src/lj_memprof.c                              |  4 +--
 src/lj_sysprof.c                              |  2 +-
 src/lj_wbuf.h                                 |  2 +-
 src/luajit-gdb.py                             |  6 ++--
 src/luajit_lldb.py                            |  6 ++--
 test/CMakeLists.txt                           |  1 +
 test/LuaJIT-tests/src/ctest.c                 |  2 +-
 test/PUC-Rio-Lua-5.1-tests/api.lua            |  4 +--
 test/PUC-Rio-Lua-5.1-tests/db.lua             |  2 +-
 test/PUC-Rio-Lua-5.1-tests/gc.lua             |  2 +-
 test/PUC-Rio-Lua-5.1-tests/math.lua           |  2 +-
 test/PUC-Rio-Lua-5.1-tests/strings.lua        |  2 +-
 test/tarantool-c-tests/CMakeLists.txt         |  1 -
 test/tarantool-c-tests/test.c                 |  2 +-
 test/tarantool-tests/CMakeLists.txt           |  2 +-
 test/tarantool-tests/fix-emit-rma.test.lua    |  2 +-
 .../gh-4199-gc64-fuse.test.lua                |  2 +-
 ...-6096-external-unwinding-on-arm64.test.lua |  2 +-
 test/tarantool-tests/gh-6163-min-max.test.lua |  2 +-
 .../lj-350-sload-typecheck.test.lua           |  2 +-
 .../lj-356-ir-khash-non-string-obj.test.lua   |  2 +-
 .../lj-357-arm64-hrefk.test.lua               |  2 +-
 .../lj-416-xor-before-jcc.test.lua            |  2 +-
 ...6-arm64-incorrect-check-closed-uv.test.lua |  2 +-
 .../lj-512-profiler-hook-finalizers.test.lua  |  4 +--
 .../lj-603-err-snap-restore.test.lua          |  2 +-
 .../misclib-memprof-lapi.test.lua             |  8 ++---
 test/tarantool-tests/tap.lua                  |  4 +--
 test/tarantool-tests/unit-jit-parse.test.lua  |  2 +-
 test/tarantool-tests/utils/jit/generators.lua |  2 +-
 tools/codespell-ignore-words.txt              |  3 ++
 tools/memprof/parse.lua                       |  4 +--
 tools/memprof/process.lua                     |  4 +--
 36 files changed, 86 insertions(+), 45 deletions(-)
 create mode 100644 cmake/CodeSpell.cmake
 create mode 100644 tools/codespell-ignore-words.txt

-- 
2.34.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Tarantool-patches] [PATCH luajit 1/4][v2] codehealth: fix typos
  2023-10-11 16:52 [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and enable codespell Sergey Bronnikov via Tarantool-patches
@ 2023-10-11 16:52 ` Sergey Bronnikov via Tarantool-patches
  2023-10-12 10:33   ` Maxim Kokryashkin via Tarantool-patches
  2023-10-23  8:50   ` Sergey Kaplun via Tarantool-patches
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 2/4][v2] test: fix codestyle Sergey Bronnikov via Tarantool-patches
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 26+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2023-10-11 16:52 UTC (permalink / raw)
  To: tarantool-patches, Sergey Kaplun, max.kokryashkin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 21178 bytes --]

From: Sergey Bronnikov <sergeyb@tarantool.org>

Fix typos found with codespell in files with our own source code.
---
 src/lj_memprof.c                                          | 4 ++--
 src/lj_sysprof.c                                          | 2 +-
 src/lj_wbuf.h                                             | 2 +-
 src/luajit-gdb.py                                         | 6 +++---
 src/luajit_lldb.py                                        | 6 +++---
 test/LuaJIT-tests/src/ctest.c                             | 2 +-
 test/PUC-Rio-Lua-5.1-tests/api.lua                        | 4 ++--
 test/PUC-Rio-Lua-5.1-tests/db.lua                         | 2 +-
 test/PUC-Rio-Lua-5.1-tests/gc.lua                         | 2 +-
 test/PUC-Rio-Lua-5.1-tests/math.lua                       | 2 +-
 test/PUC-Rio-Lua-5.1-tests/strings.lua                    | 2 +-
 test/tarantool-tests/CMakeLists.txt                       | 2 +-
 test/tarantool-tests/fix-emit-rma.test.lua                | 2 +-
 test/tarantool-tests/gh-4199-gc64-fuse.test.lua           | 2 +-
 .../gh-6096-external-unwinding-on-arm64.test.lua          | 2 +-
 test/tarantool-tests/gh-6163-min-max.test.lua             | 2 +-
 test/tarantool-tests/lj-350-sload-typecheck.test.lua      | 2 +-
 test/tarantool-tests/lj-357-arm64-hrefk.test.lua          | 2 +-
 test/tarantool-tests/lj-416-xor-before-jcc.test.lua       | 2 +-
 .../lj-426-arm64-incorrect-check-closed-uv.test.lua       | 2 +-
 .../lj-512-profiler-hook-finalizers.test.lua              | 4 ++--
 test/tarantool-tests/lj-603-err-snap-restore.test.lua     | 2 +-
 test/tarantool-tests/misclib-memprof-lapi.test.lua        | 8 ++++----
 test/tarantool-tests/tap.lua                              | 4 ++--
 test/tarantool-tests/unit-jit-parse.test.lua              | 2 +-
 test/tarantool-tests/utils/jit/generators.lua             | 2 +-
 tools/memprof/parse.lua                                   | 4 ++--
 tools/memprof/process.lua                                 | 4 ++--
 28 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/src/lj_memprof.c b/src/lj_memprof.c
index a492cf58..c9a8b203 100644
--- a/src/lj_memprof.c
+++ b/src/lj_memprof.c
@@ -260,7 +260,7 @@ int lj_memprof_start(struct lua_State *L, const struct lj_memprof_options *opt)
   lj_assertL(opt->len != 0, "bad memprof writer buffer lenght");
 
   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;
   }
@@ -392,7 +392,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/src/lj_sysprof.c b/src/lj_sysprof.c
index 52d4d2a5..82ed8210 100644
--- a/src/lj_sysprof.c
+++ b/src/lj_sysprof.c
@@ -486,7 +486,7 @@ int lj_sysprof_stop(lua_State *L)
   if (SPS_HALT == sp->state) {
     errno = sp->saved_errno;
     sp->state = SPS_IDLE;
-    /* wbuf was terminated when error occured. */
+    /* wbuf was terminated when error occurred. */
     return PROFILE_ERRIO;
   }
 
diff --git a/src/lj_wbuf.h b/src/lj_wbuf.h
index 9eaa5e51..33ec8463 100644
--- a/src/lj_wbuf.h
+++ b/src/lj_wbuf.h
@@ -75,7 +75,7 @@ void lj_wbuf_addn(struct lj_wbuf *buf, const void *src, size_t n);
 /* Write string to the buffer. */
 void LJ_FASTCALL lj_wbuf_addstring(struct lj_wbuf *buf, const char *s);
 
-/* Immediatly flush the buffer. */
+/* Immediately flush the buffer. */
 void LJ_FASTCALL lj_wbuf_flush(struct lj_wbuf *buf);
 
 /* Check flags. */
diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py
index 5eaf250f..d2070e9b 100644
--- a/src/luajit-gdb.py
+++ b/src/luajit-gdb.py
@@ -314,7 +314,7 @@ def strdata(obj):
     try:
         return str(cast('char *', cast('GCstr *', obj) + 1))[len(PADDING):]
     except UnicodeEncodeError:
-        return "<luajit-gdb: error occured while rendering non-ascii slot>"
+        return "<luajit-gdb: error occurred while rendering non-ascii slot>"
 
 
 def itypemap(o):
@@ -687,7 +687,7 @@ class LJDumpTable(LJBase):
     '''
 lj-tab <GCtab *>
 
-The command receives a GCtab adress and dumps the table contents:
+The command receives a GCtab address and dumps the table contents:
 * Metatable address whether the one is set
 * Array part <asize> slots:
   <aslot ptr>: [<index>]: <tv>
@@ -759,7 +759,7 @@ coroutine guest stack:
     + CP: Protected C frame
     + PP: VM performs a call as a result of executinig pcall or xpcall
 
-If L is ommited the main coroutine is used.
+If L is omitted the main coroutine is used.
     '''
 
     def invoke(self, arg, from_tty):
diff --git a/src/luajit_lldb.py b/src/luajit_lldb.py
index ef0986cc..5ac11b65 100644
--- a/src/luajit_lldb.py
+++ b/src/luajit_lldb.py
@@ -525,7 +525,7 @@ def strdata(obj):
         ptr = cast('char *', obj + 1)
         return ptr.summary
     except UnicodeEncodeError:
-        return "<luajit-lldb: error occured while rendering non-ascii slot>"
+        return "<luajit-lldb: error occurred while rendering non-ascii slot>"
 
 
 def itype(o):
@@ -996,7 +996,7 @@ class LJDumpTable(Command):
     '''
 lj-tab <GCtab *>
 
-The command receives a GCtab adress and dumps the table contents:
+The command receives a GCtab address and dumps the table contents:
 * Metatable address whether the one is set
 * Array part <asize> slots:
   <aslot ptr>: [<index>]: <tv>
@@ -1067,7 +1067,7 @@ coroutine guest stack:
     + CP: Protected C frame
     + PP: VM performs a call as a result of executinig pcall or xpcall
 
-If L is ommited the main coroutine is used.
+If L is omitted the main coroutine is used.
     '''
     def execute(self, debugger, args, result):
         lstate = self.parse(args)
diff --git a/test/LuaJIT-tests/src/ctest.c b/test/LuaJIT-tests/src/ctest.c
index d257567b..e99f2306 100644
--- a/test/LuaJIT-tests/src/ctest.c
+++ b/test/LuaJIT-tests/src/ctest.c
@@ -234,7 +234,7 @@ static int costatus(lua_State *L, lua_State *co) {
       else
 	return CO_SUS;  /* initial state */
     }
-    default:  /* some error occured */
+    default:  /* some error occurred */
       return CO_DEAD;
   }
 }
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/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt
index c15d6037..73fe4b5a 100644
--- a/test/tarantool-tests/CMakeLists.txt
+++ b/test/tarantool-tests/CMakeLists.txt
@@ -134,7 +134,7 @@ else()
 endif()
 
 # LUA_CPATH and LD_LIBRARY_PATH variables and also TESTLIBS list
-# with dependecies are set in scope of BuildTestLib macro.
+# with dependencies are set in scope of BuildTestLib macro.
 add_custom_target(tarantool-tests
   DEPENDS ${LUAJIT_TEST_BINARY} ${TESTLIBS}
 )
diff --git a/test/tarantool-tests/fix-emit-rma.test.lua b/test/tarantool-tests/fix-emit-rma.test.lua
index 42804447..cc97ff4d 100644
--- a/test/tarantool-tests/fix-emit-rma.test.lua
+++ b/test/tarantool-tests/fix-emit-rma.test.lua
@@ -4,7 +4,7 @@ local test = tap.test('fix-emit-rma'):skipcond({
   ['Test requires GC64 mode enabled'] = not require('ffi').abi('gc64'),
 })
 
--- Need to test 2 cases of `emit_rma()` particulary on x64:
+-- Need to test 2 cases of `emit_rma()` particularly on x64:
 --   * `IR_LDEXP` with `fld` instruction for loading constant
 --      number `TValue` by address.
 --   * `IR_OBAR` with the corresponding `test` instruction on
diff --git a/test/tarantool-tests/gh-4199-gc64-fuse.test.lua b/test/tarantool-tests/gh-4199-gc64-fuse.test.lua
index ca050cf0..877f7884 100644
--- a/test/tarantool-tests/gh-4199-gc64-fuse.test.lua
+++ b/test/tarantool-tests/gh-4199-gc64-fuse.test.lua
@@ -44,7 +44,7 @@ for n = 1, 100 do
       for i = 1, 5 do
         -- This constant fusion leads to the test failure.
         a[i] = 0
-        -- This summ is not necessarry but decreases the amount of
+        -- This summ is not necessary but decreases the amount of
         -- iterations.
         a[i] = a[i] + x + y
         -- Use all FPR registers and one value from the memory
diff --git a/test/tarantool-tests/gh-6096-external-unwinding-on-arm64.test.lua b/test/tarantool-tests/gh-6096-external-unwinding-on-arm64.test.lua
index 097e771c..00f58642 100644
--- a/test/tarantool-tests/gh-6096-external-unwinding-on-arm64.test.lua
+++ b/test/tarantool-tests/gh-6096-external-unwinding-on-arm64.test.lua
@@ -1,6 +1,6 @@
 local tap = require('tap')
 
--- Test file to check correctnes of external unwinding
+-- Test file to check correctness of external unwinding
 -- in LuaJIT.
 -- See also https://github.com/LuaJIT/LuaJIT/issues/698,
 -- https://github.com/LuaJIT/LuaJIT/pull/757.
diff --git a/test/tarantool-tests/gh-6163-min-max.test.lua b/test/tarantool-tests/gh-6163-min-max.test.lua
index 4bc6155c..17afd502 100644
--- a/test/tarantool-tests/gh-6163-min-max.test.lua
+++ b/test/tarantool-tests/gh-6163-min-max.test.lua
@@ -45,7 +45,7 @@ local x = 1
 
 jit.opt.start('hotloop=1')
 
--- XXX: Looping over the operations and their arguments breakes the
+-- XXX: Looping over the operations and their arguments breaks the
 -- semantics of some optimization tests below. The cases are
 -- copy-pasted to preserve optimization semantics.
 
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/lj-416-xor-before-jcc.test.lua b/test/tarantool-tests/lj-416-xor-before-jcc.test.lua
index 605bb92a..f71c9ee4 100644
--- a/test/tarantool-tests/lj-416-xor-before-jcc.test.lua
+++ b/test/tarantool-tests/lj-416-xor-before-jcc.test.lua
@@ -41,7 +41,7 @@ local testxor = ffi.load('libtestxor')
 -- pressure and specific registers allocations.
 local handler = setmetatable({}, {
   __newindex = function ()
-    -- 0 and nil are suggested as differnt constant-zero values
+    -- 0 and nil are suggested as different constant-zero values
     -- for the call and occupied different registers.
     testxor.test_xor_func(0, 0, 0, 0, 0, 0, nil, 0)
   end
diff --git a/test/tarantool-tests/lj-426-arm64-incorrect-check-closed-uv.test.lua b/test/tarantool-tests/lj-426-arm64-incorrect-check-closed-uv.test.lua
index a689ed60..ea01ba06 100644
--- a/test/tarantool-tests/lj-426-arm64-incorrect-check-closed-uv.test.lua
+++ b/test/tarantool-tests/lj-426-arm64-incorrect-check-closed-uv.test.lua
@@ -14,7 +14,7 @@ do
   -- The function's prototype is created with the following
   -- constants at chunk parsing. After adding this constant to
   -- the function's prototype it will be marked as gray during
-  -- propogate phase.
+  -- propagate phase.
   local function usets() uv = '' end
   _G.usets = usets
 end
diff --git a/test/tarantool-tests/lj-512-profiler-hook-finalizers.test.lua b/test/tarantool-tests/lj-512-profiler-hook-finalizers.test.lua
index a282a10f..f02bd05f 100644
--- a/test/tarantool-tests/lj-512-profiler-hook-finalizers.test.lua
+++ b/test/tarantool-tests/lj-512-profiler-hook-finalizers.test.lua
@@ -20,9 +20,9 @@ local finish = os.clock()
 
 profile.stop()
 
--- XXX: The bug is occured as stopping of callbacks invocation,
+-- XXX: The bug is occurred as stopping of callbacks invocation,
 -- when a new tick strikes inside `gc_call_finalizer()`.
--- The amount of successfull callbacks isn't stable (2-15).
+-- The amount of successful callbacks isn't stable (2-15).
 -- So, assume that amount of profiling samples should be at least
 -- more than 0.5 intervals of time during sampling.
 test:ok(nsamples >= 0.5 * (finish - start) * 1e3 / INTERVAL,
diff --git a/test/tarantool-tests/lj-603-err-snap-restore.test.lua b/test/tarantool-tests/lj-603-err-snap-restore.test.lua
index 791107ba..96ebf92c 100644
--- a/test/tarantool-tests/lj-603-err-snap-restore.test.lua
+++ b/test/tarantool-tests/lj-603-err-snap-restore.test.lua
@@ -11,7 +11,7 @@ local function do_test()
   local recursive_f
   local function errfunc()
     xpcall(recursive_f, errfunc)
-    -- Since this error is occured on snapshot restoration and can
+    -- Since this error is occurred on snapshot restoration and can
     -- be handled by compiler itself, we shouldn't bother a user
     -- with it.
     handler_is_called = true
diff --git a/test/tarantool-tests/misclib-memprof-lapi.test.lua b/test/tarantool-tests/misclib-memprof-lapi.test.lua
index 3cb5c8be..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(),
@@ -52,13 +52,13 @@ local function generate_output(filename, payload)
   collectgarbage()
 
   local res, err = misc.memprof.start(filename)
-  -- Should start succesfully.
+  -- Should start successfully.
   assert(res, err)
 
   payload()
 
   res, err = misc.memprof.stop()
-  -- Should stop succesfully.
+  -- Should stop successfully.
   assert(res, err)
 end
 
@@ -188,7 +188,7 @@ test:test("output", function(subtest)
   -- Check allocation reports. The second argument is a line
   -- number of the allocation event itself. The third is a line
   -- number of the corresponding function definition. The last
-  -- one is the number of allocations. 1 event - alocation of
+  -- one is the number of allocations. 1 event - allocation of
   -- table by itself + 1 allocation of array part as far it is
   -- bigger than LJ_MAX_COLOSIZE (16).
   subtest:ok(check_alloc_report(alloc, { line = 37, linedefined = 35 }, 2))
diff --git a/test/tarantool-tests/tap.lua b/test/tarantool-tests/tap.lua
index af1d4b20..250eb7d8 100644
--- a/test/tarantool-tests/tap.lua
+++ b/test/tarantool-tests/tap.lua
@@ -1,6 +1,6 @@
 --- tap.lua internal file.
 ---
---- The Test Anything Protocol vesion 13 producer.
+--- The Test Anything Protocol version 13 producer.
 ---
 
 -- Initializer FFI for <iscdata> check.
@@ -79,7 +79,7 @@ local function ok(test, cond, message, extra)
   io.write(tindent, ("line:\t%s\n"):format(trace[#trace].line))
   for frameno, frame in ipairs(trace) do
     io.write(tindent, ("frame #%d\n"):format(frameno))
-    -- XXX: Use "half indent" to dump <frame> fiels.
+    -- XXX: Use "half indent" to dump <frame> fields.
     local findent = indent(0.5) .. tindent
     for key, value in pairs(frame) do
       io.write(findent, ("%s:\t%s\n"):format(key, value))
diff --git a/test/tarantool-tests/unit-jit-parse.test.lua b/test/tarantool-tests/unit-jit-parse.test.lua
index b038fde3..b426c1c6 100644
--- a/test/tarantool-tests/unit-jit-parse.test.lua
+++ b/test/tarantool-tests/unit-jit-parse.test.lua
@@ -39,7 +39,7 @@ local loop_trace = traces[1]
 for irnum = 1, N_TESTS do
   local ir_pattern = expected_irs[irnum]
   local irref = loop_trace:has_ir(ir_pattern)
-  test:ok(irref, 'find IR refernce by pattern: ' .. ir_pattern)
+  test:ok(irref, 'find IR reference by pattern: ' .. ir_pattern)
 end
 
 test:done(true)
diff --git a/test/tarantool-tests/utils/jit/generators.lua b/test/tarantool-tests/utils/jit/generators.lua
index 14e0e3c3..d6c50a1f 100644
--- a/test/tarantool-tests/utils/jit/generators.lua
+++ b/test/tarantool-tests/utils/jit/generators.lua
@@ -17,7 +17,7 @@ end
 local recfuncs = {}
 local last_i = 0
 -- This function generates a table of functions with heavy mcode
--- payload with tab arithmetics to fill the mcode area from the
+-- payload with tab arithmetic to fill the mcode area from the
 -- one trace mcode by some given size. This size is usually big
 -- enough, because we want to check long jump side exits from some
 -- traces.
diff --git a/tools/memprof/parse.lua b/tools/memprof/parse.lua
index d865267b..2c09db90 100644
--- a/tools/memprof/parse.lua
+++ b/tools/memprof/parse.lua
@@ -52,14 +52,14 @@ local function link_to_previous(heap_chunk, e, nsize)
     if not e.primary[heap_chunk[2]] then
       e.primary[heap_chunk[2]] = {
         loc = heap_chunk[3],
-        alloced = 0,
+        allocated = 0,
         freed = 0,
         count = 0,
       }
     end
     -- Save information about delta for memory heap.
     local location_data = e.primary[heap_chunk[2]]
-    location_data.alloced = location_data.alloced + nsize
+    location_data.allocated = location_data.allocated + nsize
     location_data.freed = location_data.freed + heap_chunk[1]
     location_data.count = location_data.count + 1
   end
diff --git a/tools/memprof/process.lua b/tools/memprof/process.lua
index 0bcb965b..9dc202ae 100644
--- a/tools/memprof/process.lua
+++ b/tools/memprof/process.lua
@@ -39,8 +39,8 @@ function M.form_heap_delta(events, symbols)
       for _, heap_chunk in pairs(event.primary) do
         local ev_line = symtab.demangle(symbols, heap_chunk.loc)
 
-        if (heap_chunk.alloced > 0) then
-          dheap[ev_line].dbytes = dheap[ev_line].dbytes + heap_chunk.alloced
+        if (heap_chunk.allocated > 0) then
+          dheap[ev_line].dbytes = dheap[ev_line].dbytes + heap_chunk.allocated
           dheap[ev_line].nalloc = dheap[ev_line].nalloc + heap_chunk.count
         end
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Tarantool-patches] [PATCH luajit 2/4][v2] test: fix codestyle
  2023-10-11 16:52 [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and enable codespell Sergey Bronnikov via Tarantool-patches
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 1/4][v2] codehealth: fix typos Sergey Bronnikov via Tarantool-patches
@ 2023-10-11 16:52 ` Sergey Bronnikov via Tarantool-patches
  2023-10-12 10:34   ` Maxim Kokryashkin via Tarantool-patches
  2023-10-23  8:52   ` Sergey Kaplun via Tarantool-patches
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell Sergey Bronnikov via Tarantool-patches
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 26+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2023-10-11 16:52 UTC (permalink / raw)
  To: tarantool-patches, Sergey Kaplun, max.kokryashkin

From: Sergey Bronnikov <sergeyb@tarantool.org>

This patch fixes warnings found by the checkpatch.pl script.
---
 test/tarantool-c-tests/CMakeLists.txt                        | 1 -
 test/tarantool-c-tests/test.c                                | 2 +-
 test/tarantool-tests/lj-356-ir-khash-non-string-obj.test.lua | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/test/tarantool-c-tests/CMakeLists.txt b/test/tarantool-c-tests/CMakeLists.txt
index 17255345..4b1d8832 100644
--- a/test/tarantool-c-tests/CMakeLists.txt
+++ b/test/tarantool-c-tests/CMakeLists.txt
@@ -66,4 +66,3 @@ add_custom_command(TARGET tarantool-c-tests
     ${C_TEST_FLAGS}
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
-
diff --git a/test/tarantool-c-tests/test.c b/test/tarantool-c-tests/test.c
index 74cba3a3..7907c12a 100644
--- a/test/tarantool-c-tests/test.c
+++ b/test/tarantool-c-tests/test.c
@@ -164,7 +164,7 @@ static void test_diagnostic(void)
 	while ((ent_end = strchr(ent, '\n')) != NULL) {
 		char *next_ent = ent_end + 1;
 		/*
-		 * Limit string with with the zero byte for
+		 * Limit string with the zero byte for
 		 * formatted output. Anyway, don't need this \n
 		 * anymore.
 		 */
diff --git a/test/tarantool-tests/lj-356-ir-khash-non-string-obj.test.lua b/test/tarantool-tests/lj-356-ir-khash-non-string-obj.test.lua
index 5159ac32..ee0f5583 100644
--- a/test/tarantool-tests/lj-356-ir-khash-non-string-obj.test.lua
+++ b/test/tarantool-tests/lj-356-ir-khash-non-string-obj.test.lua
@@ -85,7 +85,7 @@ test:ok(not traceinfo(2), 'the second trace should not be compiled')
 jit.on()
 
 for i = 1, N_ITERATIONS do
-  -- Check that that all lookups are correct and there is no
+  -- Check that all lookups are correct and there is no
   -- value from other cdata stored in the table.
   test:ok(result_tab[i] == MAGIC, 'correct hash lookup from the table')
 end
-- 
2.34.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-11 16:52 [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and enable codespell Sergey Bronnikov via Tarantool-patches
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 1/4][v2] codehealth: fix typos Sergey Bronnikov via Tarantool-patches
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 2/4][v2] test: fix codestyle Sergey Bronnikov via Tarantool-patches
@ 2023-10-11 16:52 ` Sergey Bronnikov via Tarantool-patches
  2023-10-11 19:33   ` Sergey Bronnikov via Tarantool-patches
                     ` (2 more replies)
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 4/4][v2] ci: enable codespell Sergey Bronnikov via Tarantool-patches
  2023-11-16 16:19 ` [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and " Igor Munkin via Tarantool-patches
  4 siblings, 3 replies; 26+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2023-10-11 16:52 UTC (permalink / raw)
  To: tarantool-patches, Sergey Kaplun, max.kokryashkin

From: Sergey Bronnikov <sergeyb@tarantool.org>

The patch introduces a new CMake target: "LuaJIT-codespell", that
spellchecks files specified in a whitelist by codespell [1].

1. https://github.com/codespell-project/codespell
---
 CMakeLists.txt                   |  1 +
 cmake/CodeSpell.cmake            | 36 ++++++++++++++++++++++++++++++++
 test/CMakeLists.txt              |  1 +
 tools/codespell-ignore-words.txt |  3 +++
 4 files changed, 41 insertions(+)
 create mode 100644 cmake/CodeSpell.cmake
 create mode 100644 tools/codespell-ignore-words.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index eebf3d6f..7ef10f2f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,6 +32,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 include(LuaJITUtils)
 include(SetBuildParallelLevel)
 include(SetVersion)
+include(CodeSpell)
 
 # --- Variables to be exported to child scopes ---------------------------------
 
diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake
new file mode 100644
index 00000000..c4d3555d
--- /dev/null
+++ b/cmake/CodeSpell.cmake
@@ -0,0 +1,36 @@
+find_program(CODESPELL codespell)
+
+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_mapi.c)
+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c)
+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c)
+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c)
+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py)
+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py)
+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt)
+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests)
+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-tests)
+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/tools)
+
+set(IGNORE_WORDS ${PROJECT_SOURCE_DIR}/tools/codespell-ignore-words.txt)
+
+add_custom_target(${PROJECT_NAME}-codespell)
+if (CODESPELL)
+  add_custom_command(TARGET ${PROJECT_NAME}-codespell
+    COMMENT "Running codespell"
+    COMMAND
+      ${CODESPELL}
+        --ignore-words ${IGNORE_WORDS}
+        --skip ${IGNORE_WORDS}
+        --ignore-words-list fpr
+        --check-filenames
+        ${CODESPELL_WHITELIST}
+    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+  )
+else ()
+  set(WARN_MSG "`codespell' is not found, "
+               "so ${PROJECT_NAME}-codespell target is dummy")
+  add_custom_command(TARGET ${PROJECT_NAME}-codespell
+    COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${MSG}
+    COMMENT ${MSG}
+  )
+endif (CODESPELL)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 58cba5ba..8afc42df 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -68,6 +68,7 @@ endif()
 add_custom_target(${PROJECT_NAME}-lint DEPENDS
   ${PROJECT_NAME}-luacheck
   ${PROJECT_NAME}-flake8
+  ${PROJECT_NAME}-codespell
 )
 
 set(LUAJIT_TEST_COMMAND "${LUAJIT_TEST_BINARY} -e dofile[[${LUAJIT_TEST_INIT}]]")
diff --git a/tools/codespell-ignore-words.txt b/tools/codespell-ignore-words.txt
new file mode 100644
index 00000000..ceeed47c
--- /dev/null
+++ b/tools/codespell-ignore-words.txt
@@ -0,0 +1,3 @@
+mmaped
+isnt
+FPR
-- 
2.34.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Tarantool-patches] [PATCH luajit 4/4][v2] ci: enable codespell
  2023-10-11 16:52 [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and enable codespell Sergey Bronnikov via Tarantool-patches
                   ` (2 preceding siblings ...)
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell Sergey Bronnikov via Tarantool-patches
@ 2023-10-11 16:52 ` Sergey Bronnikov via Tarantool-patches
  2023-10-12 10:45   ` Maxim Kokryashkin via Tarantool-patches
  2023-10-23  8:53   ` Sergey Kaplun via Tarantool-patches
  2023-11-16 16:19 ` [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and " Igor Munkin via Tarantool-patches
  4 siblings, 2 replies; 26+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2023-10-11 16:52 UTC (permalink / raw)
  To: tarantool-patches, Sergey Kaplun, max.kokryashkin

From: Sergey Bronnikov <sergeyb@tarantool.org>

The patch adds a GitHub Action, that installs codespell, and adds a job,
that runs codespell using CMake target "LuaJIT-codespell".
---
 .github/workflows/lint.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 758ff33e..8147b053 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -29,7 +29,7 @@ concurrency:
 jobs:
   test-luacheck:
     runs-on: [self-hosted, lightweight, Linux, x86_64]
-    name: LuaJIT linters (luacheck, flake8)
+    name: LuaJIT linters (luacheck, flake8, codespell)
     steps:
       - uses: actions/checkout@v3
         with:
@@ -44,6 +44,7 @@ jobs:
           sudo apt -y install cmake ninja-build lua5.1 luarocks
           sudo luarocks install luacheck
           sudo pip3 install flake8==6.1.0
+          sudo pip3 install codespell==2.2.5
           # Set CMAKE_BUILD_PARALLEL_LEVEL environment variable to
           # limit the number of parallel jobs for build/test step.
           echo CMAKE_BUILD_PARALLEL_LEVEL=$(($(nproc) + 1)) | tee -a $GITHUB_ENV
-- 
2.34.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell Sergey Bronnikov via Tarantool-patches
@ 2023-10-11 19:33   ` Sergey Bronnikov via Tarantool-patches
  2023-10-12 10:43   ` Maxim Kokryashkin via Tarantool-patches
  2023-10-23  9:20   ` Sergey Kaplun via Tarantool-patches
  2 siblings, 0 replies; 26+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2023-10-11 19:33 UTC (permalink / raw)
  To: Sergey Bronnikov, tarantool-patches, Sergey Kaplun, max.kokryashkin

Added fixup patch (and force-pushed):

diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake
index c4d3555d..475b9d4b 100644
--- a/cmake/CodeSpell.cmake
+++ b/cmake/CodeSpell.cmake
@@ -21,7 +21,6 @@ if (CODESPELL)
        ${CODESPELL}
          --ignore-words ${IGNORE_WORDS}
          --skip ${IGNORE_WORDS}
-        --ignore-words-list fpr
          --check-filenames
          ${CODESPELL_WHITELIST}
      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
diff --git a/tools/codespell-ignore-words.txt 
b/tools/codespell-ignore-words.txt
index ceeed47c..e1865caf 100644
--- a/tools/codespell-ignore-words.txt
+++ b/tools/codespell-ignore-words.txt
@@ -1,3 +1,3 @@
  mmaped
  isnt
-FPR
+fpr

On 10/11/23 19:52, Sergey Bronnikov wrote:
> From: Sergey Bronnikov <sergeyb@tarantool.org>
>
> The patch introduces a new CMake target: "LuaJIT-codespell", that
> spellchecks files specified in a whitelist by codespell [1].
>
> 1. https://github.com/codespell-project/codespell
> ---
>   CMakeLists.txt                   |  1 +
>   cmake/CodeSpell.cmake            | 36 ++++++++++++++++++++++++++++++++
>   test/CMakeLists.txt              |  1 +
>   tools/codespell-ignore-words.txt |  3 +++
>   4 files changed, 41 insertions(+)
>   create mode 100644 cmake/CodeSpell.cmake
>   create mode 100644 tools/codespell-ignore-words.txt
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index eebf3d6f..7ef10f2f 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -32,6 +32,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
>   include(LuaJITUtils)
>   include(SetBuildParallelLevel)
>   include(SetVersion)
> +include(CodeSpell)
>   
>   # --- Variables to be exported to child scopes ---------------------------------
>   
> diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake
> new file mode 100644
> index 00000000..c4d3555d
> --- /dev/null
> +++ b/cmake/CodeSpell.cmake
> @@ -0,0 +1,36 @@
> +find_program(CODESPELL codespell)
> +
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_mapi.c)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-tests)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/tools)
> +
> +set(IGNORE_WORDS ${PROJECT_SOURCE_DIR}/tools/codespell-ignore-words.txt)
> +
> +add_custom_target(${PROJECT_NAME}-codespell)
> +if (CODESPELL)
> +  add_custom_command(TARGET ${PROJECT_NAME}-codespell
> +    COMMENT "Running codespell"
> +    COMMAND
> +      ${CODESPELL}
> +        --ignore-words ${IGNORE_WORDS}
> +        --skip ${IGNORE_WORDS}
> +        --ignore-words-list fpr
> +        --check-filenames
> +        ${CODESPELL_WHITELIST}
> +    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
> +  )
> +else ()
> +  set(WARN_MSG "`codespell' is not found, "
> +               "so ${PROJECT_NAME}-codespell target is dummy")
> +  add_custom_command(TARGET ${PROJECT_NAME}-codespell
> +    COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${MSG}
> +    COMMENT ${MSG}
> +  )
> +endif (CODESPELL)
> diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
> index 58cba5ba..8afc42df 100644
> --- a/test/CMakeLists.txt
> +++ b/test/CMakeLists.txt
> @@ -68,6 +68,7 @@ endif()
>   add_custom_target(${PROJECT_NAME}-lint DEPENDS
>     ${PROJECT_NAME}-luacheck
>     ${PROJECT_NAME}-flake8
> +  ${PROJECT_NAME}-codespell
>   )
>   
>   set(LUAJIT_TEST_COMMAND "${LUAJIT_TEST_BINARY} -e dofile[[${LUAJIT_TEST_INIT}]]")
> diff --git a/tools/codespell-ignore-words.txt b/tools/codespell-ignore-words.txt
> new file mode 100644
> index 00000000..ceeed47c
> --- /dev/null
> +++ b/tools/codespell-ignore-words.txt
> @@ -0,0 +1,3 @@
> +mmaped
> +isnt
> +FPR

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches]  [PATCH luajit 1/4][v2] codehealth: fix typos
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 1/4][v2] codehealth: fix typos Sergey Bronnikov via Tarantool-patches
@ 2023-10-12 10:33   ` Maxim Kokryashkin via Tarantool-patches
  2023-10-23  8:50   ` Sergey Kaplun via Tarantool-patches
  1 sibling, 0 replies; 26+ messages in thread
From: Maxim Kokryashkin via Tarantool-patches @ 2023-10-12 10:33 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: max.kokryashkin, tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 21819 bytes --]


Hi, Sergey!
Thanks for the patch!
LGTM
--
Best regards,
Maxim Kokryashkin
 
  
>Среда, 11 октября 2023, 19:53 +03:00 от Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>:
> 
>From: Sergey Bronnikov < sergeyb@tarantool.org >
>
>Fix typos found with codespell in files with our own source code.
>---
> src/lj_memprof.c | 4 ++--
> src/lj_sysprof.c | 2 +-
> src/lj_wbuf.h | 2 +-
> src/luajit-gdb.py | 6 +++---
> src/luajit_lldb.py | 6 +++---
> test/LuaJIT-tests/src/ctest.c | 2 +-
> test/PUC-Rio-Lua-5.1-tests/api.lua | 4 ++--
> test/PUC-Rio-Lua-5.1-tests/db.lua | 2 +-
> test/PUC-Rio-Lua-5.1-tests/gc.lua | 2 +-
> test/PUC-Rio-Lua-5.1-tests/math.lua | 2 +-
> test/PUC-Rio-Lua-5.1-tests/strings.lua | 2 +-
> test/tarantool-tests/CMakeLists.txt | 2 +-
> test/tarantool-tests/fix-emit-rma.test.lua | 2 +-
> test/tarantool-tests/gh-4199-gc64-fuse.test.lua | 2 +-
> .../gh-6096-external-unwinding-on-arm64.test.lua | 2 +-
> test/tarantool-tests/gh-6163-min-max.test.lua | 2 +-
> test/tarantool-tests/lj-350-sload-typecheck.test.lua | 2 +-
> test/tarantool-tests/lj-357-arm64-hrefk.test.lua | 2 +-
> test/tarantool-tests/lj-416-xor-before-jcc.test.lua | 2 +-
> .../lj-426-arm64-incorrect-check-closed-uv.test.lua | 2 +-
> .../lj-512-profiler-hook-finalizers.test.lua | 4 ++--
> test/tarantool-tests/lj-603-err-snap-restore.test.lua | 2 +-
> test/tarantool-tests/misclib-memprof-lapi.test.lua | 8 ++++----
> test/tarantool-tests/tap.lua | 4 ++--
> test/tarantool-tests/unit-jit-parse.test.lua | 2 +-
> test/tarantool-tests/utils/jit/generators.lua | 2 +-
> tools/memprof/parse.lua | 4 ++--
> tools/memprof/process.lua | 4 ++--
> 28 files changed, 41 insertions(+), 41 deletions(-)
>
>diff --git a/src/lj_memprof.c b/src/lj_memprof.c
>index a492cf58..c9a8b203 100644
>--- a/src/lj_memprof.c
>+++ b/src/lj_memprof.c
>@@ -260,7 +260,7 @@ int lj_memprof_start(struct lua_State *L, const struct lj_memprof_options *opt)
>   lj_assertL(opt->len != 0, "bad memprof writer buffer lenght");
> 
>   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;
>   }
>@@ -392,7 +392,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/src/lj_sysprof.c b/src/lj_sysprof.c
>index 52d4d2a5..82ed8210 100644
>--- a/src/lj_sysprof.c
>+++ b/src/lj_sysprof.c
>@@ -486,7 +486,7 @@ int lj_sysprof_stop(lua_State *L)
>   if (SPS_HALT == sp->state) {
>     errno = sp->saved_errno;
>     sp->state = SPS_IDLE;
>- /* wbuf was terminated when error occured. */
>+ /* wbuf was terminated when error occurred. */
>     return PROFILE_ERRIO;
>   }
> 
>diff --git a/src/lj_wbuf.h b/src/lj_wbuf.h
>index 9eaa5e51..33ec8463 100644
>--- a/src/lj_wbuf.h
>+++ b/src/lj_wbuf.h
>@@ -75,7 +75,7 @@ void lj_wbuf_addn(struct lj_wbuf *buf, const void *src, size_t n);
> /* Write string to the buffer. */
> void LJ_FASTCALL lj_wbuf_addstring(struct lj_wbuf *buf, const char *s);
> 
>-/* Immediatly flush the buffer. */
>+/* Immediately flush the buffer. */
> void LJ_FASTCALL lj_wbuf_flush(struct lj_wbuf *buf);
> 
> /* Check flags. */
>diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py
>index 5eaf250f..d2070e9b 100644
>--- a/src/luajit-gdb.py
>+++ b/src/luajit-gdb.py
>@@ -314,7 +314,7 @@ def strdata(obj):
>     try:
>         return str(cast('char *', cast('GCstr *', obj) + 1))[len(PADDING):]
>     except UnicodeEncodeError:
>- return "<luajit-gdb: error occured while rendering non-ascii slot>"
>+ return "<luajit-gdb: error occurred while rendering non-ascii slot>"
> 
> 
> def itypemap(o):
>@@ -687,7 +687,7 @@ class LJDumpTable(LJBase):
>     '''
> lj-tab <GCtab *>
> 
>-The command receives a GCtab adress and dumps the table contents:
>+The command receives a GCtab address and dumps the table contents:
> * Metatable address whether the one is set
> * Array part <asize> slots:
>   <aslot ptr>: [<index>]: <tv>
>@@ -759,7 +759,7 @@ coroutine guest stack:
>     + CP: Protected C frame
>     + PP: VM performs a call as a result of executinig pcall or xpcall
> 
>-If L is ommited the main coroutine is used.
>+If L is omitted the main coroutine is used.
>     '''
> 
>     def invoke(self, arg, from_tty):
>diff --git a/src/luajit_lldb.py b/src/luajit_lldb.py
>index ef0986cc..5ac11b65 100644
>--- a/src/luajit_lldb.py
>+++ b/src/luajit_lldb.py
>@@ -525,7 +525,7 @@ def strdata(obj):
>         ptr = cast('char *', obj + 1)
>         return ptr.summary
>     except UnicodeEncodeError:
>- return "<luajit-lldb: error occured while rendering non-ascii slot>"
>+ return "<luajit-lldb: error occurred while rendering non-ascii slot>"
> 
> 
> def itype(o):
>@@ -996,7 +996,7 @@ class LJDumpTable(Command):
>     '''
> lj-tab <GCtab *>
> 
>-The command receives a GCtab adress and dumps the table contents:
>+The command receives a GCtab address and dumps the table contents:
> * Metatable address whether the one is set
> * Array part <asize> slots:
>   <aslot ptr>: [<index>]: <tv>
>@@ -1067,7 +1067,7 @@ coroutine guest stack:
>     + CP: Protected C frame
>     + PP: VM performs a call as a result of executinig pcall or xpcall
> 
>-If L is ommited the main coroutine is used.
>+If L is omitted the main coroutine is used.
>     '''
>     def execute(self, debugger, args, result):
>         lstate = self.parse(args)
>diff --git a/test/LuaJIT-tests/src/ctest.c b/test/LuaJIT-tests/src/ctest.c
>index d257567b..e99f2306 100644
>--- a/test/LuaJIT-tests/src/ctest.c
>+++ b/test/LuaJIT-tests/src/ctest.c
>@@ -234,7 +234,7 @@ static int costatus(lua_State *L, lua_State *co) {
>       else
>  return CO_SUS; /* initial state */
>     }
>- default: /* some error occured */
>+ default: /* some error occurred */
>       return CO_DEAD;
>   }
> }
>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--comentrio sem EOL no final")() == 1)
>diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt
>index c15d6037..73fe4b5a 100644
>--- a/test/tarantool-tests/CMakeLists.txt
>+++ b/test/tarantool-tests/CMakeLists.txt
>@@ -134,7 +134,7 @@ else()
> endif()
> 
> # LUA_CPATH and LD_LIBRARY_PATH variables and also TESTLIBS list
>-# with dependecies are set in scope of BuildTestLib macro.
>+# with dependencies are set in scope of BuildTestLib macro.
> add_custom_target(tarantool-tests
>   DEPENDS ${LUAJIT_TEST_BINARY} ${TESTLIBS}
> )
>diff --git a/test/tarantool-tests/fix-emit-rma.test.lua b/test/tarantool-tests/fix-emit-rma.test.lua
>index 42804447..cc97ff4d 100644
>--- a/test/tarantool-tests/fix-emit-rma.test.lua
>+++ b/test/tarantool-tests/fix-emit-rma.test.lua
>@@ -4,7 +4,7 @@ local test = tap.test('fix-emit-rma'):skipcond({
>   ['Test requires GC64 mode enabled'] = not require('ffi').abi('gc64'),
> })
> 
>--- Need to test 2 cases of `emit_rma()` particulary on x64:
>+-- Need to test 2 cases of `emit_rma()` particularly on x64:
> -- * `IR_LDEXP` with `fld` instruction for loading constant
> -- number `TValue` by address.
> -- * `IR_OBAR` with the corresponding `test` instruction on
>diff --git a/test/tarantool-tests/gh-4199-gc64-fuse.test.lua b/test/tarantool-tests/gh-4199-gc64-fuse.test.lua
>index ca050cf0..877f7884 100644
>--- a/test/tarantool-tests/gh-4199-gc64-fuse.test.lua
>+++ b/test/tarantool-tests/gh-4199-gc64-fuse.test.lua
>@@ -44,7 +44,7 @@ for n = 1, 100 do
>       for i = 1, 5 do
>         -- This constant fusion leads to the test failure.
>         a[i] = 0
>- -- This summ is not necessarry but decreases the amount of
>+ -- This summ is not necessary but decreases the amount of
>         -- iterations.
>         a[i] = a[i] + x + y
>         -- Use all FPR registers and one value from the memory
>diff --git a/test/tarantool-tests/gh-6096-external-unwinding-on-arm64.test.lua b/test/tarantool-tests/gh-6096-external-unwinding-on-arm64.test.lua
>index 097e771c..00f58642 100644
>--- a/test/tarantool-tests/gh-6096-external-unwinding-on-arm64.test.lua
>+++ b/test/tarantool-tests/gh-6096-external-unwinding-on-arm64.test.lua
>@@ -1,6 +1,6 @@
> local tap = require('tap')
> 
>--- Test file to check correctnes of external unwinding
>+-- Test file to check correctness of external unwinding
> -- in LuaJIT.
> -- See also  https://github.com/LuaJIT/LuaJIT/issues/698 ,
> --  https://github.com/LuaJIT/LuaJIT/pull/757 .
>diff --git a/test/tarantool-tests/gh-6163-min-max.test.lua b/test/tarantool-tests/gh-6163-min-max.test.lua
>index 4bc6155c..17afd502 100644
>--- a/test/tarantool-tests/gh-6163-min-max.test.lua
>+++ b/test/tarantool-tests/gh-6163-min-max.test.lua
>@@ -45,7 +45,7 @@ local x = 1
> 
> jit.opt.start('hotloop=1')
> 
>--- XXX: Looping over the operations and their arguments breakes the
>+-- XXX: Looping over the operations and their arguments breaks the
> -- semantics of some optimization tests below. The cases are
> -- copy-pasted to preserve optimization semantics.
> 
>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/lj-416-xor-before-jcc.test.lua b/test/tarantool-tests/lj-416-xor-before-jcc.test.lua
>index 605bb92a..f71c9ee4 100644
>--- a/test/tarantool-tests/lj-416-xor-before-jcc.test.lua
>+++ b/test/tarantool-tests/lj-416-xor-before-jcc.test.lua
>@@ -41,7 +41,7 @@ local testxor = ffi.load('libtestxor')
> -- pressure and specific registers allocations.
> local handler = setmetatable({}, {
>   __newindex = function ()
>- -- 0 and nil are suggested as differnt constant-zero values
>+ -- 0 and nil are suggested as different constant-zero values
>     -- for the call and occupied different registers.
>     testxor.test_xor_func(0, 0, 0, 0, 0, 0, nil, 0)
>   end
>diff --git a/test/tarantool-tests/lj-426-arm64-incorrect-check-closed-uv.test.lua b/test/tarantool-tests/lj-426-arm64-incorrect-check-closed-uv.test.lua
>index a689ed60..ea01ba06 100644
>--- a/test/tarantool-tests/lj-426-arm64-incorrect-check-closed-uv.test.lua
>+++ b/test/tarantool-tests/lj-426-arm64-incorrect-check-closed-uv.test.lua
>@@ -14,7 +14,7 @@ do
>   -- The function's prototype is created with the following
>   -- constants at chunk parsing. After adding this constant to
>   -- the function's prototype it will be marked as gray during
>- -- propogate phase.
>+ -- propagate phase.
>   local function usets() uv = '' end
>   _G.usets = usets
> end
>diff --git a/test/tarantool-tests/lj-512-profiler-hook-finalizers.test.lua b/test/tarantool-tests/lj-512-profiler-hook-finalizers.test.lua
>index a282a10f..f02bd05f 100644
>--- a/test/tarantool-tests/lj-512-profiler-hook-finalizers.test.lua
>+++ b/test/tarantool-tests/lj-512-profiler-hook-finalizers.test.lua
>@@ -20,9 +20,9 @@ local finish = os.clock()
> 
> profile.stop()
> 
>--- XXX: The bug is occured as stopping of callbacks invocation,
>+-- XXX: The bug is occurred as stopping of callbacks invocation,
> -- when a new tick strikes inside `gc_call_finalizer()`.
>--- The amount of successfull callbacks isn't stable (2-15).
>+-- The amount of successful callbacks isn't stable (2-15).
> -- So, assume that amount of profiling samples should be at least
> -- more than 0.5 intervals of time during sampling.
> test:ok(nsamples >= 0.5 * (finish - start) * 1e3 / INTERVAL,
>diff --git a/test/tarantool-tests/lj-603-err-snap-restore.test.lua b/test/tarantool-tests/lj-603-err-snap-restore.test.lua
>index 791107ba..96ebf92c 100644
>--- a/test/tarantool-tests/lj-603-err-snap-restore.test.lua
>+++ b/test/tarantool-tests/lj-603-err-snap-restore.test.lua
>@@ -11,7 +11,7 @@ local function do_test()
>   local recursive_f
>   local function errfunc()
>     xpcall(recursive_f, errfunc)
>- -- Since this error is occured on snapshot restoration and can
>+ -- Since this error is occurred on snapshot restoration and can
>     -- be handled by compiler itself, we shouldn't bother a user
>     -- with it.
>     handler_is_called = true
>diff --git a/test/tarantool-tests/misclib-memprof-lapi.test.lua b/test/tarantool-tests/misclib-memprof-lapi.test.lua
>index 3cb5c8be..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(),
>@@ -52,13 +52,13 @@ local function generate_output(filename, payload)
>   collectgarbage()
> 
>   local res, err = misc.memprof.start(filename)
>- -- Should start succesfully.
>+ -- Should start successfully.
>   assert(res, err)
> 
>   payload()
> 
>   res, err = misc.memprof.stop()
>- -- Should stop succesfully.
>+ -- Should stop successfully.
>   assert(res, err)
> end
> 
>@@ -188,7 +188,7 @@ test:test("output", function(subtest)
>   -- Check allocation reports. The second argument is a line
>   -- number of the allocation event itself. The third is a line
>   -- number of the corresponding function definition. The last
>- -- one is the number of allocations. 1 event - alocation of
>+ -- one is the number of allocations. 1 event - allocation of
>   -- table by itself + 1 allocation of array part as far it is
>   -- bigger than LJ_MAX_COLOSIZE (16).
>   subtest:ok(check_alloc_report(alloc, { line = 37, linedefined = 35 }, 2))
>diff --git a/test/tarantool-tests/tap.lua b/test/tarantool-tests/tap.lua
>index af1d4b20..250eb7d8 100644
>--- a/test/tarantool-tests/tap.lua
>+++ b/test/tarantool-tests/tap.lua
>@@ -1,6 +1,6 @@
> --- tap.lua internal file.
> ---
>---- The Test Anything Protocol vesion 13 producer.
>+--- The Test Anything Protocol version 13 producer.
> ---
> 
> -- Initializer FFI for <iscdata> check.
>@@ -79,7 +79,7 @@ local function ok(test, cond, message, extra)
>   io.write(tindent, ("line:\t%s\n"):format(trace[#trace].line))
>   for frameno, frame in ipairs(trace) do
>     io.write(tindent, ("frame #%d\n"):format(frameno))
>- -- XXX: Use "half indent" to dump <frame> fiels.
>+ -- XXX: Use "half indent" to dump <frame> fields.
>     local findent = indent(0.5) .. tindent
>     for key, value in pairs(frame) do
>       io.write(findent, ("%s:\t%s\n"):format(key, value))
>diff --git a/test/tarantool-tests/unit-jit-parse.test.lua b/test/tarantool-tests/unit-jit-parse.test.lua
>index b038fde3..b426c1c6 100644
>--- a/test/tarantool-tests/unit-jit-parse.test.lua
>+++ b/test/tarantool-tests/unit-jit-parse.test.lua
>@@ -39,7 +39,7 @@ local loop_trace = traces[1]
> for irnum = 1, N_TESTS do
>   local ir_pattern = expected_irs[irnum]
>   local irref = loop_trace:has_ir(ir_pattern)
>- test:ok(irref, 'find IR refernce by pattern: ' .. ir_pattern)
>+ test:ok(irref, 'find IR reference by pattern: ' .. ir_pattern)
> end
> 
> test:done(true)
>diff --git a/test/tarantool-tests/utils/jit/generators.lua b/test/tarantool-tests/utils/jit/generators.lua
>index 14e0e3c3..d6c50a1f 100644
>--- a/test/tarantool-tests/utils/jit/generators.lua
>+++ b/test/tarantool-tests/utils/jit/generators.lua
>@@ -17,7 +17,7 @@ end
> local recfuncs = {}
> local last_i = 0
> -- This function generates a table of functions with heavy mcode
>--- payload with tab arithmetics to fill the mcode area from the
>+-- payload with tab arithmetic to fill the mcode area from the
> -- one trace mcode by some given size. This size is usually big
> -- enough, because we want to check long jump side exits from some
> -- traces.
>diff --git a/tools/memprof/parse.lua b/tools/memprof/parse.lua
>index d865267b..2c09db90 100644
>--- a/tools/memprof/parse.lua
>+++ b/tools/memprof/parse.lua
>@@ -52,14 +52,14 @@ local function link_to_previous(heap_chunk, e, nsize)
>     if not e.primary[heap_chunk[2]] then
>       e.primary[heap_chunk[2]] = {
>         loc = heap_chunk[3],
>- alloced = 0,
>+ allocated = 0,
>         freed = 0,
>         count = 0,
>       }
>     end
>     -- Save information about delta for memory heap.
>     local location_data = e.primary[heap_chunk[2]]
>- location_data.alloced = location_data.alloced + nsize
>+ location_data.allocated = location_data.allocated + nsize
>     location_data.freed = location_data.freed + heap_chunk[1]
>     location_data.count = location_data.count + 1
>   end
>diff --git a/tools/memprof/process.lua b/tools/memprof/process.lua
>index 0bcb965b..9dc202ae 100644
>--- a/tools/memprof/process.lua
>+++ b/tools/memprof/process.lua
>@@ -39,8 +39,8 @@ function M.form_heap_delta(events, symbols)
>       for _, heap_chunk in pairs(event.primary) do
>         local ev_line = symtab.demangle(symbols, heap_chunk.loc)
> 
>- if (heap_chunk.alloced > 0) then
>- dheap[ev_line].dbytes = dheap[ev_line].dbytes + heap_chunk.alloced
>+ if (heap_chunk.allocated > 0) then
>+ dheap[ev_line].dbytes = dheap[ev_line].dbytes + heap_chunk.allocated
>           dheap[ev_line].nalloc = dheap[ev_line].nalloc + heap_chunk.count
>         end
> 
>--
>2.34.1
 

[-- Attachment #2: Type: text/html, Size: 26399 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches]  [PATCH luajit 2/4][v2] test: fix codestyle
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 2/4][v2] test: fix codestyle Sergey Bronnikov via Tarantool-patches
@ 2023-10-12 10:34   ` Maxim Kokryashkin via Tarantool-patches
  2023-10-23  8:52   ` Sergey Kaplun via Tarantool-patches
  1 sibling, 0 replies; 26+ messages in thread
From: Maxim Kokryashkin via Tarantool-patches @ 2023-10-12 10:34 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: max.kokryashkin, tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 2122 bytes --]


Hi, Sergey!
Thanks for the patch!
LGTM
 
--
Best regards,
Maxim Kokryashkin
 
  
>Среда, 11 октября 2023, 19:54 +03:00 от Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>:
> 
>From: Sergey Bronnikov < sergeyb@tarantool.org >
>
>This patch fixes warnings found by the checkpatch.pl script.
>---
> test/tarantool-c-tests/CMakeLists.txt | 1 -
> test/tarantool-c-tests/test.c | 2 +-
> test/tarantool-tests/lj-356-ir-khash-non-string-obj.test.lua | 2 +-
> 3 files changed, 2 insertions(+), 3 deletions(-)
>
>diff --git a/test/tarantool-c-tests/CMakeLists.txt b/test/tarantool-c-tests/CMakeLists.txt
>index 17255345..4b1d8832 100644
>--- a/test/tarantool-c-tests/CMakeLists.txt
>+++ b/test/tarantool-c-tests/CMakeLists.txt
>@@ -66,4 +66,3 @@ add_custom_command(TARGET tarantool-c-tests
>     ${C_TEST_FLAGS}
>   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
> )
>-
>diff --git a/test/tarantool-c-tests/test.c b/test/tarantool-c-tests/test.c
>index 74cba3a3..7907c12a 100644
>--- a/test/tarantool-c-tests/test.c
>+++ b/test/tarantool-c-tests/test.c
>@@ -164,7 +164,7 @@ static void test_diagnostic(void)
>  while ((ent_end = strchr(ent, '\n')) != NULL) {
>  char *next_ent = ent_end + 1;
>  /*
>- * Limit string with with the zero byte for
>+ * Limit string with the zero byte for
>  * formatted output. Anyway, don't need this \n
>  * anymore.
>  */
>diff --git a/test/tarantool-tests/lj-356-ir-khash-non-string-obj.test.lua b/test/tarantool-tests/lj-356-ir-khash-non-string-obj.test.lua
>index 5159ac32..ee0f5583 100644
>--- a/test/tarantool-tests/lj-356-ir-khash-non-string-obj.test.lua
>+++ b/test/tarantool-tests/lj-356-ir-khash-non-string-obj.test.lua
>@@ -85,7 +85,7 @@ test:ok(not traceinfo(2), 'the second trace should not be compiled')
> jit.on()
> 
> for i = 1, N_ITERATIONS do
>- -- Check that that all lookups are correct and there is no
>+ -- Check that all lookups are correct and there is no
>   -- value from other cdata stored in the table.
>   test:ok(result_tab[i] == MAGIC, 'correct hash lookup from the table')
> end
>--
>2.34.1
 

[-- Attachment #2: Type: text/html, Size: 2829 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches]  [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell Sergey Bronnikov via Tarantool-patches
  2023-10-11 19:33   ` Sergey Bronnikov via Tarantool-patches
@ 2023-10-12 10:43   ` Maxim Kokryashkin via Tarantool-patches
  2023-10-12 13:28     ` Sergey Bronnikov via Tarantool-patches
  2023-10-23  9:20   ` Sergey Kaplun via Tarantool-patches
  2 siblings, 1 reply; 26+ messages in thread
From: Maxim Kokryashkin via Tarantool-patches @ 2023-10-12 10:43 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: max.kokryashkin, tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 3920 bytes --]


Hi, Sergey!
Please consider my comments below.
  
>Среда, 11 октября 2023, 19:54 +03:00 от Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>:
> 
>From: Sergey Bronnikov < sergeyb@tarantool.org >
>
>The patch introduces a new CMake target: "LuaJIT-codespell", that
>spellchecks files specified in a whitelist by codespell [1].
Typo: s/a whitelist/the whitelist/
>
>1.  https://github.com/codespell-project/codespell
>---
> CMakeLists.txt | 1 +
> cmake/CodeSpell.cmake | 36 ++++++++++++++++++++++++++++++++
> test/CMakeLists.txt | 1 +
> tools/codespell-ignore-words.txt | 3 +++
> 4 files changed, 41 insertions(+)
> create mode 100644 cmake/CodeSpell.cmake
> create mode 100644 tools/codespell-ignore-words.txt
>
>diff --git a/CMakeLists.txt b/CMakeLists.txt
>index eebf3d6f..7ef10f2f 100644
>--- a/CMakeLists.txt
>+++ b/CMakeLists.txt
>@@ -32,6 +32,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
> include(LuaJITUtils)
> include(SetBuildParallelLevel)
> include(SetVersion)
>+include(CodeSpell)
> 
> # --- Variables to be exported to child scopes ---------------------------------
> 
>diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake
>new file mode 100644
>index 00000000..c4d3555d
>--- /dev/null
>+++ b/cmake/CodeSpell.cmake
>@@ -0,0 +1,36 @@
>+find_program(CODESPELL codespell)
>+
>+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_mapi.c)
>+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c)
>+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c)
>+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c)
>+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py)
>+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py)
>+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt)
>+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests)
>+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-tests)
>+list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/tools)
CMake’s list is variadic, you can add all entries in one go.
>+
>+set(IGNORE_WORDS ${PROJECT_SOURCE_DIR}/tools/codespell-ignore-words.txt)
>+
>+add_custom_target(${PROJECT_NAME}-codespell)
>+if (CODESPELL)
>+ add_custom_command(TARGET ${PROJECT_NAME}-codespell
>+ COMMENT "Running codespell"
>+ COMMAND
>+ ${CODESPELL}
>+ --ignore-words ${IGNORE_WORDS}
>+ --skip ${IGNORE_WORDS}
>+ --ignore-words-list fpr
>+ --check-filenames
>+ ${CODESPELL_WHITELIST}
>+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
>+ )
>+else ()
>+ set(WARN_MSG "`codespell' is not found, "
>+ "so ${PROJECT_NAME}-codespell target is dummy")
>+ add_custom_command(TARGET ${PROJECT_NAME}-codespell
>+ COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${MSG}
>+ COMMENT ${MSG}
Why a `message` call with level set to WARNING is not enough? Is there a concern
about coloring? If so, I believe it’s inconsistent to use approach with cmake_echo_color.
In case of `prove` absence on the machine, the more important message about
skipped regression tests will be less noticeable in comparison with codespell, which is
by far less important.
>+ )
>+endif (CODESPELL)
>diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
>index 58cba5ba..8afc42df 100644
>--- a/test/CMakeLists.txt
>+++ b/test/CMakeLists.txt
>@@ -68,6 +68,7 @@ endif()
> add_custom_target(${PROJECT_NAME}-lint DEPENDS
>   ${PROJECT_NAME}-luacheck
>   ${PROJECT_NAME}-flake8
>+ ${PROJECT_NAME}-codespell
> )
> 
> set(LUAJIT_TEST_COMMAND "${LUAJIT_TEST_BINARY} -e dofile[[${LUAJIT_TEST_INIT}]]")
>diff --git a/tools/codespell-ignore-words.txt b/tools/codespell-ignore-words.txt
>new file mode 100644
>index 00000000..ceeed47c
>--- /dev/null
>+++ b/tools/codespell-ignore-words.txt
>@@ -0,0 +1,3 @@
>+mmaped
>+isnt
>+FPR
>--
>2.34.1
 
--
Best regards,
Maxim Kokryashkin
 

[-- Attachment #2: Type: text/html, Size: 5265 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches]  [PATCH luajit 4/4][v2] ci: enable codespell
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 4/4][v2] ci: enable codespell Sergey Bronnikov via Tarantool-patches
@ 2023-10-12 10:45   ` Maxim Kokryashkin via Tarantool-patches
  2023-10-23  8:53   ` Sergey Kaplun via Tarantool-patches
  1 sibling, 0 replies; 26+ messages in thread
From: Maxim Kokryashkin via Tarantool-patches @ 2023-10-12 10:45 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: max.kokryashkin, tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]


Hi, Sergey!
Thanks for the patch!
LGTM
 
--
Best regards,
Maxim Kokryashkin
 
  
>Среда, 11 октября 2023, 19:55 +03:00 от Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>:
> 
>From: Sergey Bronnikov < sergeyb@tarantool.org >
>
>The patch adds a GitHub Action, that installs codespell, and adds a job,
>that runs codespell using CMake target "LuaJIT-codespell".
>---
> .github/workflows/lint.yml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
>index 758ff33e..8147b053 100644
>--- a/.github/workflows/lint.yml
>+++ b/.github/workflows/lint.yml
>@@ -29,7 +29,7 @@ concurrency:
> jobs:
>   test-luacheck:
>     runs-on: [self-hosted, lightweight, Linux, x86_64]
>- name: LuaJIT linters (luacheck, flake8)
>+ name: LuaJIT linters (luacheck, flake8, codespell)
>     steps:
>       - uses: actions/checkout@v3
>         with:
>@@ -44,6 +44,7 @@ jobs:
>           sudo apt -y install cmake ninja-build lua5.1 luarocks
>           sudo luarocks install luacheck
>           sudo pip3 install flake8==6.1.0
>+ sudo pip3 install codespell==2.2.5
>           # Set CMAKE_BUILD_PARALLEL_LEVEL environment variable to
>           # limit the number of parallel jobs for build/test step.
>           echo CMAKE_BUILD_PARALLEL_LEVEL=$(($(nproc) + 1)) | tee -a $GITHUB_ENV
>--
>2.34.1
 

[-- Attachment #2: Type: text/html, Size: 2452 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-12 10:43   ` Maxim Kokryashkin via Tarantool-patches
@ 2023-10-12 13:28     ` Sergey Bronnikov via Tarantool-patches
  2023-10-12 18:46       ` Maxim Kokryashkin via Tarantool-patches
  0 siblings, 1 reply; 26+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2023-10-12 13:28 UTC (permalink / raw)
  To: Maxim Kokryashkin, Sergey Bronnikov; +Cc: max.kokryashkin, tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 4854 bytes --]

Hi, Max


thanks for review! see my comments

On 10/12/23 13:43, Maxim Kokryashkin via Tarantool-patches wrote:
> Hi, Sergey!
> Please consider my comments below.
>
>     Среда, 11 октября 2023, 19:54 +03:00 от Sergey Bronnikov via
>     Tarantool-patches <tarantool-patches@dev.tarantool.org>:
>     From: Sergey Bronnikov <sergeyb@tarantool.org
>     </compose?To=sergeyb@tarantool.org>>
>
>     The patch introduces a new CMake target: "LuaJIT-codespell", that
>     spellchecks files specified in a whitelist by codespell [1].
>
> Typo: s/a whitelist/the whitelist/

Fixed.


>
>     1. https://github.com/codespell-project/codespell
>     ---
>      CMakeLists.txt | 1 +
>      cmake/CodeSpell.cmake | 36 ++++++++++++++++++++++++++++++++
>      test/CMakeLists.txt | 1 +
>      tools/codespell-ignore-words.txt | 3 +++
>      4 files changed, 41 insertions(+)
>      create mode 100644 cmake/CodeSpell.cmake
>      create mode 100644 tools/codespell-ignore-words.txt
>
>     diff --git a/CMakeLists.txt b/CMakeLists.txt
>     index eebf3d6f..7ef10f2f 100644
>     --- a/CMakeLists.txt
>     +++ b/CMakeLists.txt
>     @@ -32,6 +32,7 @@ set(CMAKE_MODULE_PATH
>     "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
>      include(LuaJITUtils)
>      include(SetBuildParallelLevel)
>      include(SetVersion)
>     +include(CodeSpell)
>
>      # --- Variables to be exported to child scopes
>     ---------------------------------
>
>     diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake
>     new file mode 100644
>     index 00000000..c4d3555d
>     --- /dev/null
>     +++ b/cmake/CodeSpell.cmake
>     @@ -0,0 +1,36 @@
>     +find_program(CODESPELL codespell)
>     +
>     +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_mapi.c)
>     +list(APPEND CODESPELL_WHITELIST
>     ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c)
>     +list(APPEND CODESPELL_WHITELIST
>     ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c)
>     +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c)
>     +list(APPEND CODESPELL_WHITELIST
>     ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py)
>     +list(APPEND CODESPELL_WHITELIST
>     ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py)
>     +list(APPEND CODESPELL_WHITELIST
>     ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt)
>     +list(APPEND CODESPELL_WHITELIST
>     ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests)
>     +list(APPEND CODESPELL_WHITELIST
>     ${PROJECT_SOURCE_DIR}/test/tarantool-tests)
>     +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/tools)
>
> CMake’s list is variadic, you can add all entries in one go.

Sure, I know. This way it looks better and changes in patches will be 
more readable.


>     +
>     +set(IGNORE_WORDS
>     ${PROJECT_SOURCE_DIR}/tools/codespell-ignore-words.txt)
>     +
>     +add_custom_target(${PROJECT_NAME}-codespell)
>     +if (CODESPELL)
>     + add_custom_command(TARGET ${PROJECT_NAME}-codespell
>     + COMMENT "Running codespell"
>     + COMMAND
>     + ${CODESPELL}
>     + --ignore-words ${IGNORE_WORDS}
>     + --skip ${IGNORE_WORDS}
>     + --ignore-words-list fpr
>     + --check-filenames
>     + ${CODESPELL_WHITELIST}
>     + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
>     + )
>     +else ()
>     + set(WARN_MSG "`codespell' is not found, "
>     + "so ${PROJECT_NAME}-codespell target is dummy")
>     + add_custom_command(TARGET ${PROJECT_NAME}-codespell
>     + COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${MSG}
>     + COMMENT ${MSG}
>
> Why a `message` call with level set to WARNING is not enough?

it is a CMake target, you cannot use `message` command there.


> Is there a concern
> about coloring?

for me warning highlighted by red color will be more notable than 
without it.


> If so, I believe it’s inconsistent to use approach with cmake_echo_color.
> In case of `prove` absence on the machine, the more important message 
> about
> skipped regression tests will be less noticeable in comparison with 
> codespell, which is
> by far less important.

>     + )
>     +endif (CODESPELL)
>     diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
>     index 58cba5ba..8afc42df 100644
>     --- a/test/CMakeLists.txt
>     +++ b/test/CMakeLists.txt
>     @@ -68,6 +68,7 @@ endif()
>      add_custom_target(${PROJECT_NAME}-lint DEPENDS
>        ${PROJECT_NAME}-luacheck
>        ${PROJECT_NAME}-flake8
>     + ${PROJECT_NAME}-codespell
>      )
>
>      set(LUAJIT_TEST_COMMAND "${LUAJIT_TEST_BINARY} -e
>     dofile[[${LUAJIT_TEST_INIT}]]")
>     diff --git a/tools/codespell-ignore-words.txt
>     b/tools/codespell-ignore-words.txt
>     new file mode 100644
>     index 00000000..ceeed47c
>     --- /dev/null
>     +++ b/tools/codespell-ignore-words.txt
>     @@ -0,0 +1,3 @@
>     +mmaped
>     +isnt
>     +FPR
>     --
>     2.34.1
>
> --
> Best regards,
> Maxim Kokryashkin

[-- Attachment #2: Type: text/html, Size: 9265 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-12 13:28     ` Sergey Bronnikov via Tarantool-patches
@ 2023-10-12 18:46       ` Maxim Kokryashkin via Tarantool-patches
  2023-10-17 14:50         ` Sergey Bronnikov via Tarantool-patches
  0 siblings, 1 reply; 26+ messages in thread
From: Maxim Kokryashkin via Tarantool-patches @ 2023-10-12 18:46 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: Sergey Bronnikov, max.kokryashkin, tarantool-patches

Sergey, 
On Thu, Oct 12, 2023 at 04:28:36PM +0300, Sergey Bronnikov wrote:
> Hi, Max
> 
> 
> thanks for review! see my comments
> 
<snipped>
 > 
> >     diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake
> >     new file mode 100644
> >     index 00000000..c4d3555d
> >     --- /dev/null
> >     +++ b/cmake/CodeSpell.cmake
> >     @@ -0,0 +1,36 @@
> >     +find_program(CODESPELL codespell)
> >     +
> >     +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_mapi.c)
> >     +list(APPEND CODESPELL_WHITELIST
> >     ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c)
> >     +list(APPEND CODESPELL_WHITELIST
> >     ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c)
> >     +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c)
> >     +list(APPEND CODESPELL_WHITELIST
> >     ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py)
> >     +list(APPEND CODESPELL_WHITELIST
> >     ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py)
> >     +list(APPEND CODESPELL_WHITELIST
> >     ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt)
> >     +list(APPEND CODESPELL_WHITELIST
> >     ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests)
> >     +list(APPEND CODESPELL_WHITELIST
> >     ${PROJECT_SOURCE_DIR}/test/tarantool-tests)
> >     +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/tools)
> > 
> > CMake’s list is variadic, you can add all entries in one go.
> 
> Sure, I know. This way it looks better and changes in patches will be more
> readable.

I don't get how it is more readable. For me it's quite the opposite -- there is
too much repetitions of the same pattern `list(APPEND CODESPELL_WHITELIST ...),
which makes the latter part with paths less readable.
> 
> 
> >     +
> >     +set(IGNORE_WORDS
> >     ${PROJECT_SOURCE_DIR}/tools/codespell-ignore-words.txt)
> >     +
> >     +add_custom_target(${PROJECT_NAME}-codespell)
> >     +if (CODESPELL)
> >     + add_custom_command(TARGET ${PROJECT_NAME}-codespell
> >     + COMMENT "Running codespell"
> >     + COMMAND
> >     + ${CODESPELL}
> >     + --ignore-words ${IGNORE_WORDS}
> >     + --skip ${IGNORE_WORDS}
> >     + --ignore-words-list fpr
> >     + --check-filenames
> >     + ${CODESPELL_WHITELIST}
> >     + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
> >     + )
> >     +else ()
> >     + set(WARN_MSG "`codespell' is not found, "
> >     + "so ${PROJECT_NAME}-codespell target is dummy")
> >     + add_custom_command(TARGET ${PROJECT_NAME}-codespell
> >     + COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${MSG}
> >     + COMMENT ${MSG}
> > 
> > Why a `message` call with level set to WARNING is not enough?
> 
> it is a CMake target, you cannot use `message` command there.
You can just leave the target empty then. `message` can be called from
anywhere.
> 
> 
> > Is there a concern
> > about coloring?
> 
> for me warning highlighted by red color will be more notable than without
> it.
> 
> 
> > If so, I believe it’s inconsistent to use approach with cmake_echo_color.
> > In case of `prove` absence on the machine, the more important message
> > about
> > skipped regression tests will be less noticeable in comparison with
> > codespell, which is
> > by far less important.
> 
> >     + )
> >     +endif (CODESPELL)
> >     diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
> >     index 58cba5ba..8afc42df 100644
> >     --- a/test/CMakeLists.txt
> >     +++ b/test/CMakeLists.txt
> >     @@ -68,6 +68,7 @@ endif()
> >      add_custom_target(${PROJECT_NAME}-lint DEPENDS
> >        ${PROJECT_NAME}-luacheck
> >        ${PROJECT_NAME}-flake8
> >     + ${PROJECT_NAME}-codespell
> >      )
> > 
> >      set(LUAJIT_TEST_COMMAND "${LUAJIT_TEST_BINARY} -e
> >     dofile[[${LUAJIT_TEST_INIT}]]")
> >     diff --git a/tools/codespell-ignore-words.txt
> >     b/tools/codespell-ignore-words.txt
> >     new file mode 100644
> >     index 00000000..ceeed47c
> >     --- /dev/null
> >     +++ b/tools/codespell-ignore-words.txt
> >     @@ -0,0 +1,3 @@
> >     +mmaped
> >     +isnt
> >     +FPR
> >     --
> >     2.34.1
> > 
> > --
> > Best regards,
> > Maxim Kokryashkin

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-12 18:46       ` Maxim Kokryashkin via Tarantool-patches
@ 2023-10-17 14:50         ` Sergey Bronnikov via Tarantool-patches
  0 siblings, 0 replies; 26+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2023-10-17 14:50 UTC (permalink / raw)
  To: Maxim Kokryashkin; +Cc: Sergey Bronnikov, max.kokryashkin, tarantool-patches

Maxim,


On 10/12/23 21:46, Maxim Kokryashkin wrote:
> Sergey,
> On Thu, Oct 12, 2023 at 04:28:36PM +0300, Sergey Bronnikov wrote:
>> Hi, Max
>>
>>
>> thanks for review! see my comments
>>
> <snipped>
>   >
>>>      diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake
>>>      new file mode 100644
>>>      index 00000000..c4d3555d
>>>      --- /dev/null
>>>      +++ b/cmake/CodeSpell.cmake
>>>      @@ -0,0 +1,36 @@
>>>      +find_program(CODESPELL codespell)
>>>      +
>>>      +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_mapi.c)
>>>      +list(APPEND CODESPELL_WHITELIST
>>>      ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c)
>>>      +list(APPEND CODESPELL_WHITELIST
>>>      ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c)
>>>      +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c)
>>>      +list(APPEND CODESPELL_WHITELIST
>>>      ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py)
>>>      +list(APPEND CODESPELL_WHITELIST
>>>      ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py)
>>>      +list(APPEND CODESPELL_WHITELIST
>>>      ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt)
>>>      +list(APPEND CODESPELL_WHITELIST
>>>      ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests)
>>>      +list(APPEND CODESPELL_WHITELIST
>>>      ${PROJECT_SOURCE_DIR}/test/tarantool-tests)
>>>      +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/tools)
>>>
>>> CMake’s list is variadic, you can add all entries in one go.
>> Sure, I know. This way it looks better and changes in patches will be more
>> readable.
> I don't get how it is more readable. For me it's quite the opposite -- there is
> too much repetitions of the same pattern `list(APPEND CODESPELL_WHITELIST ...),
> which makes the latter part with paths less readable.

I don't get why it is a problem. However, I have updated a patch to 
reduce a number of `list` operators.

--- a/cmake/CodeSpell.cmake
+++ b/cmake/CodeSpell.cmake
@@ -1,15 +1,17 @@
  find_program(CODESPELL codespell)

-list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_mapi.c)
-list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c)
-list(APPEND CODESPELL_WHITELIST 
${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c)
-list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c)
-list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py)
-list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py)
-list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt)
-list(APPEND CODESPELL_WHITELIST 
${PROJECT_SOURCE_DIR}/test/tarantool-c-tests)
-list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-tests)
-list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/tools)
+string(JOIN "," CODESPELL_WHITELIST
+  ${PROJECT_SOURCE_DIR}/src/lj_mapi.c
+  ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c
+  ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c
+  ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c
+  ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py
+  ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py
+  ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt
+  ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests
+  ${PROJECT_SOURCE_DIR}/test/tarantool-tests
+  ${PROJECT_SOURCE_DIR}/tools
+)

  set(IGNORE_WORDS ${PROJECT_SOURCE_DIR}/tools/codespell-ignore-words.txt)


>>
>>>      +
>>>      +set(IGNORE_WORDS
>>>      ${PROJECT_SOURCE_DIR}/tools/codespell-ignore-words.txt)
>>>      +
>>>      +add_custom_target(${PROJECT_NAME}-codespell)
>>>      +if (CODESPELL)
>>>      + add_custom_command(TARGET ${PROJECT_NAME}-codespell
>>>      + COMMENT "Running codespell"
>>>      + COMMAND
>>>      + ${CODESPELL}
>>>      + --ignore-words ${IGNORE_WORDS}
>>>      + --skip ${IGNORE_WORDS}
>>>      + --ignore-words-list fpr
>>>      + --check-filenames
>>>      + ${CODESPELL_WHITELIST}
>>>      + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
>>>      + )
>>>      +else ()
>>>      + set(WARN_MSG "`codespell' is not found, "
>>>      + "so ${PROJECT_NAME}-codespell target is dummy")
>>>      + add_custom_command(TARGET ${PROJECT_NAME}-codespell
>>>      + COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${MSG}
>>>      + COMMENT ${MSG}
>>>
>>> Why a `message` call with level set to WARNING is not enough?
>> it is a CMake target, you cannot use `message` command there.
> You can just leave the target empty then. `message` can be called from
> anywhere.

Actually no. When codespell is not found CMake just prints a message 
about successful codespell running:

$ cmake -S . -B build
-- The C compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- [SetVersion] Reading version from VCS: v2.1.0-beta3-405-g52d646ed
-- [SetBuildParallelLevel] CMAKE_BUILD_PARALLEL_LEVEL is 8
-- The ASM compiler identification is GNU
-- Found assembler: /bin/cc
-- Configuring done
-- Generating done
-- Build files have been written to: 
/home/sergeyb/sources/MRG/tarantool/third_party/luajit/build
$ cmake --build build --parallel -t LuaJIT-codespell
Built target LuaJIT-codespell

>>
>>> Is there a concern
>>> about coloring?
>> for me warning highlighted by red color will be more notable than without
>> it.
>>
>>
>>> If so, I believe it’s inconsistent to use approach with cmake_echo_color.
>>> In case of `prove` absence on the machine, the more important message
>>> about
>>> skipped regression tests will be less noticeable in comparison with
>>> codespell, which is
>>> by far less important.

Ok, then we should implement the same approach for targets with prove.

This is out of scope patches with codespell support.

>>>      + )
>>>      +endif (CODESPELL)
>>>      diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
>>>      index 58cba5ba..8afc42df 100644
>>>      --- a/test/CMakeLists.txt
>>>      +++ b/test/CMakeLists.txt
>>>      @@ -68,6 +68,7 @@ endif()
>>>       add_custom_target(${PROJECT_NAME}-lint DEPENDS
>>>         ${PROJECT_NAME}-luacheck
>>>         ${PROJECT_NAME}-flake8
>>>      + ${PROJECT_NAME}-codespell
>>>       )
>>>
>>>       set(LUAJIT_TEST_COMMAND "${LUAJIT_TEST_BINARY} -e
>>>      dofile[[${LUAJIT_TEST_INIT}]]")
>>>      diff --git a/tools/codespell-ignore-words.txt
>>>      b/tools/codespell-ignore-words.txt
>>>      new file mode 100644
>>>      index 00000000..ceeed47c
>>>      --- /dev/null
>>>      +++ b/tools/codespell-ignore-words.txt
>>>      @@ -0,0 +1,3 @@
>>>      +mmaped
>>>      +isnt
>>>      +FPR
>>>      --
>>>      2.34.1
>>>
>>> --
>>> Best regards,
>>> Maxim Kokryashkin

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 1/4][v2] codehealth: fix typos
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 1/4][v2] codehealth: fix typos Sergey Bronnikov via Tarantool-patches
  2023-10-12 10:33   ` Maxim Kokryashkin via Tarantool-patches
@ 2023-10-23  8:50   ` Sergey Kaplun via Tarantool-patches
  1 sibling, 0 replies; 26+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-10-23  8:50 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: max.kokryashkin, tarantool-patches

Hi, Sergey!
Thanks for the patch!
LGTM!

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 2/4][v2] test: fix codestyle
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 2/4][v2] test: fix codestyle Sergey Bronnikov via Tarantool-patches
  2023-10-12 10:34   ` Maxim Kokryashkin via Tarantool-patches
@ 2023-10-23  8:52   ` Sergey Kaplun via Tarantool-patches
  2023-10-23 14:13     ` Sergey Bronnikov via Tarantool-patches
  1 sibling, 1 reply; 26+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-10-23  8:52 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: max.kokryashkin, tarantool-patches

Hi, Sergey!
Thanks for the fixes!
LGTM!

Side note: Should we enable comment line width checking in the luacheck
to avoid regressions?

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 4/4][v2] ci: enable codespell
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 4/4][v2] ci: enable codespell Sergey Bronnikov via Tarantool-patches
  2023-10-12 10:45   ` Maxim Kokryashkin via Tarantool-patches
@ 2023-10-23  8:53   ` Sergey Kaplun via Tarantool-patches
  1 sibling, 0 replies; 26+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-10-23  8:53 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: max.kokryashkin, tarantool-patches

Hi, Sergey!
Thanks for the patch!
LGTM!

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell Sergey Bronnikov via Tarantool-patches
  2023-10-11 19:33   ` Sergey Bronnikov via Tarantool-patches
  2023-10-12 10:43   ` Maxim Kokryashkin via Tarantool-patches
@ 2023-10-23  9:20   ` Sergey Kaplun via Tarantool-patches
  2023-10-23 12:29     ` Sergey Bronnikov via Tarantool-patches
  2 siblings, 1 reply; 26+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-10-23  9:20 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: max.kokryashkin, tarantool-patches

Hi, Sergey!
Thanks for the patch!
Please, consider my comments below.

On 11.10.23, Sergey Bronnikov wrote:
> From: Sergey Bronnikov <sergeyb@tarantool.org>
> 
> The patch introduces a new CMake target: "LuaJIT-codespell", that
> spellchecks files specified in a whitelist by codespell [1].
> 
> 1. https://github.com/codespell-project/codespell
> ---
>  CMakeLists.txt                   |  1 +
>  cmake/CodeSpell.cmake            | 36 ++++++++++++++++++++++++++++++++
>  test/CMakeLists.txt              |  1 +
>  tools/codespell-ignore-words.txt |  3 +++
>  4 files changed, 41 insertions(+)
>  create mode 100644 cmake/CodeSpell.cmake
>  create mode 100644 tools/codespell-ignore-words.txt
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt

<snipped>

> diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake
> new file mode 100644
> index 00000000..c4d3555d
> --- /dev/null
> +++ b/cmake/CodeSpell.cmake
> @@ -0,0 +1,36 @@
> +find_program(CODESPELL codespell)
> +
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_mapi.c)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-tests)
> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/tools)

Also, the following files should be checked:

* src/lib_misc.c
* src/lj_memprof.c
* src/lj_memprof.h
* src/lj_sysprof.h
* src/lj_utils.h
* src/lj_wbuf.h
* src/lmisclib.h
* test/LuaJIT-tests/CMakeLists.txt
* test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
* test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
* test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt
* test/lua-Harness-tests/CMakeLists.txt

> +
> +set(IGNORE_WORDS ${PROJECT_SOURCE_DIR}/tools/codespell-ignore-words.txt)
> +
> +add_custom_target(${PROJECT_NAME}-codespell)
> +if (CODESPELL)
> +  add_custom_command(TARGET ${PROJECT_NAME}-codespell
> +    COMMENT "Running codespell"
> +    COMMAND
> +      ${CODESPELL}
> +        --ignore-words ${IGNORE_WORDS}
> +        --skip ${IGNORE_WORDS}
> +        --ignore-words-list fpr
> +        --check-filenames
> +        ${CODESPELL_WHITELIST}
> +    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
> +  )
> +else ()
> +  set(WARN_MSG "`codespell' is not found, "
> +               "so ${PROJECT_NAME}-codespell target is dummy")

The output is splitted (thanks CMake). I found the only way to join
lines via `string(CONCAT WARN_MSG <str1> <str2>)`.

> +  add_custom_command(TARGET ${PROJECT_NAME}-codespell
> +    COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${MSG}
> +    COMMENT ${MSG}

The ${MSG} is undefined, so this line does nothing and can be deleted.

> +  )
> +endif (CODESPELL)

<snipped>

> diff --git a/tools/codespell-ignore-words.txt b/tools/codespell-ignore-words.txt
> new file mode 100644
> index 00000000..ceeed47c
> --- /dev/null
> +++ b/tools/codespell-ignore-words.txt
> @@ -0,0 +1,3 @@
> +mmaped

Should it be mmapped instead (like map -> mapped)?

> +isnt
> +FPR
> -- 
> 2.34.1
> 

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-23  9:20   ` Sergey Kaplun via Tarantool-patches
@ 2023-10-23 12:29     ` Sergey Bronnikov via Tarantool-patches
  2023-10-23 14:38       ` Sergey Kaplun via Tarantool-patches
  0 siblings, 1 reply; 26+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2023-10-23 12:29 UTC (permalink / raw)
  To: Sergey Kaplun, Sergey Bronnikov; +Cc: tarantool-patches, max.kokryashkin

Hi, Sergey

On 10/23/23 12:20, Sergey Kaplun wrote:
> Hi, Sergey!
> Thanks for the patch!
> Please, consider my comments below.
>
> On 11.10.23, Sergey Bronnikov wrote:
>> From: Sergey Bronnikov <sergeyb@tarantool.org>
>>
>> The patch introduces a new CMake target: "LuaJIT-codespell", that
>> spellchecks files specified in a whitelist by codespell [1].
>>
>> 1. https://github.com/codespell-project/codespell
>> ---
>>   CMakeLists.txt                   |  1 +
>>   cmake/CodeSpell.cmake            | 36 ++++++++++++++++++++++++++++++++
>>   test/CMakeLists.txt              |  1 +
>>   tools/codespell-ignore-words.txt |  3 +++
>>   4 files changed, 41 insertions(+)
>>   create mode 100644 cmake/CodeSpell.cmake
>>   create mode 100644 tools/codespell-ignore-words.txt
>>
>> diff --git a/CMakeLists.txt b/CMakeLists.txt
> <snipped>
>
>> diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake
>> new file mode 100644
>> index 00000000..c4d3555d
>> --- /dev/null
>> +++ b/cmake/CodeSpell.cmake
>> @@ -0,0 +1,36 @@
>> +find_program(CODESPELL codespell)
>> +
>> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_mapi.c)
>> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c)
>> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c)
>> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c)
>> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py)
>> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py)
>> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt)
>> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests)
>> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-tests)
>> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/tools)
> Also, the following files should be checked:
>
> * src/lib_misc.c
> * src/lj_memprof.c
> * src/lj_memprof.h
> * src/lj_sysprof.h
> * src/lj_utils.h
> * src/lj_wbuf.h
> * src/lmisclib.h
> * test/LuaJIT-tests/CMakeLists.txt
> * test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
> * test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
> * test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt
> * test/lua-Harness-tests/CMakeLists.txt


Added:

--- a/cmake/CodeSpell.cmake
+++ b/cmake/CodeSpell.cmake
@@ -1,13 +1,25 @@
  find_program(CODESPELL codespell)

  string(JOIN "," CODESPELL_WHITELIST
+  ${PROJECT_SOURCE_DIR}/src/lib_misc.c
    ${PROJECT_SOURCE_DIR}/src/lj_mapi.c
+  ${PROJECT_SOURCE_DIR}/src/lj_memprof.c
+  ${PROJECT_SOURCE_DIR}/src/lj_memprof.h
    ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c
+  ${PROJECT_SOURCE_DIR}/src/lj_sysprof.h
+  ${PROJECT_SOURCE_DIR}/src/lj_utils.h
    ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c
    ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c
+  ${PROJECT_SOURCE_DIR}/src/lj_wbuf.h
+  ${PROJECT_SOURCE_DIR}/src/lmisclib.h
    ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py
    ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py
    ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt
+  ${PROJECT_SOURCE_DIR}/test/lua-Harness-tests/CMakeLists.txt
+  ${PROJECT_SOURCE_DIR}/test/LuaJIT-tests/CMakeLists.txt
+  ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
+  ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
+ ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt
    ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests
    ${PROJECT_SOURCE_DIR}/test/tarantool-tests
    ${PROJECT_SOURCE_DIR}/tools

>
>> +
>> +set(IGNORE_WORDS ${PROJECT_SOURCE_DIR}/tools/codespell-ignore-words.txt)
>> +
>> +add_custom_target(${PROJECT_NAME}-codespell)
>> +if (CODESPELL)
>> +  add_custom_command(TARGET ${PROJECT_NAME}-codespell
>> +    COMMENT "Running codespell"
>> +    COMMAND
>> +      ${CODESPELL}
>> +        --ignore-words ${IGNORE_WORDS}
>> +        --skip ${IGNORE_WORDS}
>> +        --ignore-words-list fpr
>> +        --check-filenames
>> +        ${CODESPELL_WHITELIST}
>> +    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
>> +  )
>> +else ()
>> +  set(WARN_MSG "`codespell' is not found, "
>> +               "so ${PROJECT_NAME}-codespell target is dummy")
> The output is splitted (thanks CMake). I found the only way to join
> lines via `string(CONCAT WARN_MSG <str1> <str2>)`.

Fixed:

[1] ~/sources/MRG/tarantool/third_party/luajit$ cmake --build build 
--parallel -t LuaJIT-codespell
codespell is not found, so LuaJIT-codespell target is dummy
Built target LuaJIT-codespell


@@ -28,8 +40,9 @@ if (CODESPELL)
      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    )
  else ()
-  set(WARN_MSG "codespell is not found, "
-               "so ${PROJECT_NAME}-codespell target is dummy")
+  set(STR1 "codespell is not found,")
+  set(STR2 "so ${PROJECT_NAME}-codespell target is dummy")
+  string(CONCAT WARN_MSG "${STR1} ${STR2}")
    add_custom_command(TARGET ${PROJECT_NAME}-codespell
      COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${WARN_MSG}
      COMMENT ${MSG}

>
>> +  add_custom_command(TARGET ${PROJECT_NAME}-codespell
>> +    COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${MSG}
>> +    COMMENT ${MSG}
> The ${MSG} is undefined, so this line does nothing and can be deleted.
Fixed.
>
>> +  )
>> +endif (CODESPELL)
> <snipped>
>
>> diff --git a/tools/codespell-ignore-words.txt b/tools/codespell-ignore-words.txt
>> new file mode 100644
>> index 00000000..ceeed47c
>> --- /dev/null
>> +++ b/tools/codespell-ignore-words.txt
>> @@ -0,0 +1,3 @@
>> +mmaped
> Should it be mmapped instead (like map -> mapped)?
removed this work from exclusion list, I don't know why but codespell is 
not warns about it.
>
>> +isnt
>> +FPR
>> -- 
>> 2.34.1
>>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 2/4][v2] test: fix codestyle
  2023-10-23  8:52   ` Sergey Kaplun via Tarantool-patches
@ 2023-10-23 14:13     ` Sergey Bronnikov via Tarantool-patches
  2023-10-23 14:27       ` Sergey Kaplun via Tarantool-patches
  0 siblings, 1 reply; 26+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2023-10-23 14:13 UTC (permalink / raw)
  To: Sergey Kaplun, Sergey Bronnikov; +Cc: tarantool-patches, max.kokryashkin

Hi, Sergey

On 10/23/23 11:52, Sergey Kaplun wrote:
> Hi, Sergey!
> Thanks for the fixes!
> LGTM!
>
> Side note: Should we enable comment line width checking in the luacheck
> to avoid regressions?

Patch fixes duplicate words in comments, not max line width.

see 
https://github.com/tarantool/luajit/commit/f881dbec63a19c3a0a7885979de3beb84c05ad56



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 2/4][v2] test: fix codestyle
  2023-10-23 14:13     ` Sergey Bronnikov via Tarantool-patches
@ 2023-10-23 14:27       ` Sergey Kaplun via Tarantool-patches
  0 siblings, 0 replies; 26+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-10-23 14:27 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: Sergey Bronnikov, tarantool-patches, max.kokryashkin

Hi, Sergey.

On 23.10.23, Sergey Bronnikov wrote:
> Hi, Sergey
> 
> On 10/23/23 11:52, Sergey Kaplun wrote:
> > Hi, Sergey!
> > Thanks for the fixes!
> > LGTM!
> >
> > Side note: Should we enable comment line width checking in the luacheck
> > to avoid regressions?
> 
> Patch fixes duplicate words in comments, not max line width.
> 
> see 
> https://github.com/tarantool/luajit/commit/f881dbec63a19c3a0a7885979de3beb84c05ad56

My bad, thanks for the clarification.

> 
> 

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-23 12:29     ` Sergey Bronnikov via Tarantool-patches
@ 2023-10-23 14:38       ` Sergey Kaplun via Tarantool-patches
  2023-10-31  6:42         ` Sergey Kaplun via Tarantool-patches
  0 siblings, 1 reply; 26+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-10-23 14:38 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: Sergey Bronnikov, tarantool-patches, max.kokryashkin

Hi, Sergey!
Thanks for the fixes!
LGTM, just minor nits below.

On 23.10.23, Sergey Bronnikov wrote:
> Hi, Sergey
> 
> On 10/23/23 12:20, Sergey Kaplun wrote:
> > Hi, Sergey!
> > Thanks for the patch!
> > Please, consider my comments below.
> >
> > On 11.10.23, Sergey Bronnikov wrote:
> >> From: Sergey Bronnikov <sergeyb@tarantool.org>
> >>
> >> The patch introduces a new CMake target: "LuaJIT-codespell", that
> >> spellchecks files specified in a whitelist by codespell [1].
> >>
> >> 1. https://github.com/codespell-project/codespell
> >> ---
> >>   CMakeLists.txt                   |  1 +
> >>   cmake/CodeSpell.cmake            | 36 ++++++++++++++++++++++++++++++++
> >>   test/CMakeLists.txt              |  1 +
> >>   tools/codespell-ignore-words.txt |  3 +++
> >>   4 files changed, 41 insertions(+)
> >>   create mode 100644 cmake/CodeSpell.cmake
> >>   create mode 100644 tools/codespell-ignore-words.txt
> >>
> >> diff --git a/CMakeLists.txt b/CMakeLists.txt
> > <snipped>
> >
> >> diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake
> >> new file mode 100644
> >> index 00000000..c4d3555d
> >> --- /dev/null
> >> +++ b/cmake/CodeSpell.cmake
> >> @@ -0,0 +1,36 @@
> >> +find_program(CODESPELL codespell)
> >> +
> >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_mapi.c)
> >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c)
> >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c)
> >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c)
> >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py)
> >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py)
> >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt)
> >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests)
> >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-tests)
> >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/tools)
> > Also, the following files should be checked:
> >
> > * src/lib_misc.c
> > * src/lj_memprof.c
> > * src/lj_memprof.h
> > * src/lj_sysprof.h
> > * src/lj_utils.h
> > * src/lj_wbuf.h
> > * src/lmisclib.h
> > * test/LuaJIT-tests/CMakeLists.txt
> > * test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
> > * test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
> > * test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt
> > * test/lua-Harness-tests/CMakeLists.txt
> 
> 
> Added:
> 
> --- a/cmake/CodeSpell.cmake
> +++ b/cmake/CodeSpell.cmake
> @@ -1,13 +1,25 @@
>   find_program(CODESPELL codespell)
> 
>   string(JOIN "," CODESPELL_WHITELIST
> +  ${PROJECT_SOURCE_DIR}/src/lib_misc.c
>     ${PROJECT_SOURCE_DIR}/src/lj_mapi.c
> +  ${PROJECT_SOURCE_DIR}/src/lj_memprof.c
> +  ${PROJECT_SOURCE_DIR}/src/lj_memprof.h
>     ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c
> +  ${PROJECT_SOURCE_DIR}/src/lj_sysprof.h
> +  ${PROJECT_SOURCE_DIR}/src/lj_utils.h
>     ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c
>     ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c
> +  ${PROJECT_SOURCE_DIR}/src/lj_wbuf.h
> +  ${PROJECT_SOURCE_DIR}/src/lmisclib.h
>     ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py
>     ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py
>     ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt
> +  ${PROJECT_SOURCE_DIR}/test/lua-Harness-tests/CMakeLists.txt
> +  ${PROJECT_SOURCE_DIR}/test/LuaJIT-tests/CMakeLists.txt
> +  ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
> +  ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
> + ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt
>     ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests
>     ${PROJECT_SOURCE_DIR}/test/tarantool-tests
>     ${PROJECT_SOURCE_DIR}/tools

Side note: within vim's (sort 'l' is greater then 'L', see `man ascii`),
but I'm OK with this order too.

> 
> >
> >> +
> >> +set(IGNORE_WORDS ${PROJECT_SOURCE_DIR}/tools/codespell-ignore-words.txt)
> >> +
> >> +add_custom_target(${PROJECT_NAME}-codespell)
> >> +if (CODESPELL)
> >> +  add_custom_command(TARGET ${PROJECT_NAME}-codespell
> >> +    COMMENT "Running codespell"
> >> +    COMMAND
> >> +      ${CODESPELL}
> >> +        --ignore-words ${IGNORE_WORDS}
> >> +        --skip ${IGNORE_WORDS}
> >> +        --ignore-words-list fpr
> >> +        --check-filenames
> >> +        ${CODESPELL_WHITELIST}
> >> +    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
> >> +  )
> >> +else ()
> >> +  set(WARN_MSG "`codespell' is not found, "
> >> +               "so ${PROJECT_NAME}-codespell target is dummy")
> > The output is splitted (thanks CMake). I found the only way to join
> > lines via `string(CONCAT WARN_MSG <str1> <str2>)`.
> 
> Fixed:
> 
> [1] ~/sources/MRG/tarantool/third_party/luajit$ cmake --build build 
> --parallel -t LuaJIT-codespell
> codespell is not found, so LuaJIT-codespell target is dummy
> Built target LuaJIT-codespell
> 
> 
> @@ -28,8 +40,9 @@ if (CODESPELL)
>       WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
>     )
>   else ()
> -  set(WARN_MSG "codespell is not found, "
> -               "so ${PROJECT_NAME}-codespell target is dummy")
> +  set(STR1 "codespell is not found,")
> +  set(STR2 "so ${PROJECT_NAME}-codespell target is dummy")
> +  string(CONCAT WARN_MSG "${STR1} ${STR2}")

Oh, may be just the following?
| string(CONCAT WARN_MSG
|   "codespell is not found,"
|   "so ${PROJECT_NAME}-codespell target is dummy"
| )

>     add_custom_command(TARGET ${PROJECT_NAME}-codespell
>       COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${WARN_MSG}
>       COMMENT ${MSG}
> 
> >

<snipped>

> >> +++ b/tools/codespell-ignore-words.txt
> >> @@ -0,0 +1,3 @@
> >> +mmaped
> > Should it be mmapped instead (like map -> mapped)?
> removed this work from exclusion list, I don't know why but codespell is 
> not warns about it.

I suppose, that some files aren't covered...

| codespell --ignore-words tools/codespell-ignore-words.txt
| ...
| ./test/tarantool-c-tests/lj-49-bad-lightuserdata.test.c:42: mmaped ==> mapped
| ./test/tarantool-c-tests/lj-49-bad-lightuserdata.test.c:44: mmaped ==> mapped
| ./test/tarantool-c-tests/lj-49-bad-lightuserdata.test.c:45: mmaped ==> mapped
| ./test/tarantool-c-tests/lj-49-bad-lightuserdata.test.c:46: mmaped ==> mapped
| ./test/tarantool-c-tests/lj-49-bad-lightuserdata.test.c:47: mmaped ==> mapped

So, maybe we should use mmapped and also add it to the ignore-words?

> >
> >> +isnt
> >> +FPR
> >> -- 
> >> 2.34.1
> >>

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-23 14:38       ` Sergey Kaplun via Tarantool-patches
@ 2023-10-31  6:42         ` Sergey Kaplun via Tarantool-patches
  2023-10-31 10:50           ` Sergey Bronnikov via Tarantool-patches
  0 siblings, 1 reply; 26+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-10-31  6:42 UTC (permalink / raw)
  To: Sergey Bronnikov, Sergey Bronnikov, tarantool-patches, max.kokryashkin

Hi, Sergey!
One more comment below:

On 23.10.23, Sergey Kaplun via Tarantool-patches wrote:
> Hi, Sergey!
> Thanks for the fixes!
> LGTM, just minor nits below.
> 

<snipped>

> > >> diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake
> > >> new file mode 100644
> > >> index 00000000..c4d3555d
> > >> --- /dev/null
> > >> +++ b/cmake/CodeSpell.cmake
> > >> @@ -0,0 +1,36 @@
> > >> +find_program(CODESPELL codespell)
> > >> +
> > >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_mapi.c)
> > >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c)
> > >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c)
> > >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c)
> > >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py)
> > >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py)
> > >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt)
> > >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests)
> > >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/test/tarantool-tests)
> > >> +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/tools)
> > > Also, the following files should be checked:
> > >
> > > * src/lib_misc.c
> > > * src/lj_memprof.c
> > > * src/lj_memprof.h
> > > * src/lj_sysprof.h
> > > * src/lj_utils.h
> > > * src/lj_wbuf.h
> > > * src/lmisclib.h
> > > * test/LuaJIT-tests/CMakeLists.txt
> > > * test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
> > > * test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
> > > * test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt
> > > * test/lua-Harness-tests/CMakeLists.txt
> > 
> > 
> > Added:
> > 
> > --- a/cmake/CodeSpell.cmake
> > +++ b/cmake/CodeSpell.cmake
> > @@ -1,13 +1,25 @@
> >   find_program(CODESPELL codespell)
> > 
> >   string(JOIN "," CODESPELL_WHITELIST
> > +  ${PROJECT_SOURCE_DIR}/src/lib_misc.c
> >     ${PROJECT_SOURCE_DIR}/src/lj_mapi.c
> > +  ${PROJECT_SOURCE_DIR}/src/lj_memprof.c
> > +  ${PROJECT_SOURCE_DIR}/src/lj_memprof.h
> >     ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c
> > +  ${PROJECT_SOURCE_DIR}/src/lj_sysprof.h
> > +  ${PROJECT_SOURCE_DIR}/src/lj_utils.h
> >     ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c
> >     ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c
> > +  ${PROJECT_SOURCE_DIR}/src/lj_wbuf.h
> > +  ${PROJECT_SOURCE_DIR}/src/lmisclib.h
> >     ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py
> >     ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py
> >     ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt
> > +  ${PROJECT_SOURCE_DIR}/test/lua-Harness-tests/CMakeLists.txt
> > +  ${PROJECT_SOURCE_DIR}/test/LuaJIT-tests/CMakeLists.txt
> > +  ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
> > +  ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
> > + ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt
> >     ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests
> >     ${PROJECT_SOURCE_DIR}/test/tarantool-tests
> >     ${PROJECT_SOURCE_DIR}/tools
> 
> Side note: within vim's (sort 'l' is greater then 'L', see `man ascii`),
> but I'm OK with this order too.

Sorry, I've forgot about <src/lj_symtab.c> <src/lj_symtab.h>.


-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-31  6:42         ` Sergey Kaplun via Tarantool-patches
@ 2023-10-31 10:50           ` Sergey Bronnikov via Tarantool-patches
  2023-10-31 11:31             ` Sergey Kaplun via Tarantool-patches
  2023-10-31 11:53             ` Maxim Kokryashkin via Tarantool-patches
  0 siblings, 2 replies; 26+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2023-10-31 10:50 UTC (permalink / raw)
  To: Sergey Kaplun, Sergey Bronnikov, tarantool-patches, max.kokryashkin

Hello,

On 10/31/23 09:42, Sergey Kaplun wrote:
> Hi, Sergey!
> One more comment below:
>
<snipped>
> --- a/cmake/CodeSpell.cmake
> +++ b/cmake/CodeSpell.cmake
> @@ -1,13 +1,25 @@
>    find_program(CODESPELL codespell)
>
>    string(JOIN "," CODESPELL_WHITELIST
> +  ${PROJECT_SOURCE_DIR}/src/lib_misc.c
>      ${PROJECT_SOURCE_DIR}/src/lj_mapi.c
> +  ${PROJECT_SOURCE_DIR}/src/lj_memprof.c
> +  ${PROJECT_SOURCE_DIR}/src/lj_memprof.h
>      ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c
> +  ${PROJECT_SOURCE_DIR}/src/lj_sysprof.h
> +  ${PROJECT_SOURCE_DIR}/src/lj_utils.h
>      ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c
>      ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c
> +  ${PROJECT_SOURCE_DIR}/src/lj_wbuf.h
> +  ${PROJECT_SOURCE_DIR}/src/lmisclib.h
>      ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py
>      ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py
>      ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt
> +  ${PROJECT_SOURCE_DIR}/test/lua-Harness-tests/CMakeLists.txt
> +  ${PROJECT_SOURCE_DIR}/test/LuaJIT-tests/CMakeLists.txt
> +  ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
> +  ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
> + ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt
>      ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests
>      ${PROJECT_SOURCE_DIR}/test/tarantool-tests
>      ${PROJECT_SOURCE_DIR}/tools
>> Side note: within vim's (sort 'l' is greater then 'L', see `man ascii`),
>> but I'm OK with this order too.
> Sorry, I've forgot about <src/lj_symtab.c> <src/lj_symtab.h>.

Added:

--- a/cmake/CodeSpell.cmake
+++ b/cmake/CodeSpell.cmake
@@ -5,6 +5,8 @@ string(JOIN "," CODESPELL_WHITELIST
    ${PROJECT_SOURCE_DIR}/src/lj_mapi.c
    ${PROJECT_SOURCE_DIR}/src/lj_memprof.c
    ${PROJECT_SOURCE_DIR}/src/lj_memprof.h
+  ${PROJECT_SOURCE_DIR}/src/lj_symtab.c
+  ${PROJECT_SOURCE_DIR}/src/lj_symtab.h
    ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c
    ${PROJECT_SOURCE_DIR}/src/lj_sysprof.h
    ${PROJECT_SOURCE_DIR}/src/lj_utils.h

>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-31 10:50           ` Sergey Bronnikov via Tarantool-patches
@ 2023-10-31 11:31             ` Sergey Kaplun via Tarantool-patches
  2023-10-31 11:53             ` Maxim Kokryashkin via Tarantool-patches
  1 sibling, 0 replies; 26+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-10-31 11:31 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: Sergey Bronnikov, tarantool-patches, max.kokryashkin

Hi, Sergey!
Thanks for the fixes!
LGTM!

-- 
Best regards,
Sergey Kaplun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches]  [PATCH luajit 3/4][v2] cmake: introduce target with codespell
  2023-10-31 10:50           ` Sergey Bronnikov via Tarantool-patches
  2023-10-31 11:31             ` Sergey Kaplun via Tarantool-patches
@ 2023-10-31 11:53             ` Maxim Kokryashkin via Tarantool-patches
  1 sibling, 0 replies; 26+ messages in thread
From: Maxim Kokryashkin via Tarantool-patches @ 2023-10-31 11:53 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: max.kokryashkin, tarantool-patches, Sergey Bronnikov

[-- Attachment #1: Type: text/plain, Size: 2299 bytes --]


Hi, Sergey!
Thanks for the fixes!
LGTM
--
Best regards,
Maxim Kokryashkin
 
  
>Вторник, 31 октября 2023, 13:51 +03:00 от Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>:
> 
>Hello,
>
>On 10/31/23 09:42, Sergey Kaplun wrote:
>> Hi, Sergey!
>> One more comment below:
>>
><snipped>
>> --- a/cmake/CodeSpell.cmake
>> +++ b/cmake/CodeSpell.cmake
>> @@ -1,13 +1,25 @@
>>  find_program(CODESPELL codespell)
>>
>>  string(JOIN "," CODESPELL_WHITELIST
>> +  ${PROJECT_SOURCE_DIR}/src/lib_misc.c
>>    ${PROJECT_SOURCE_DIR}/src/lj_mapi.c
>> +  ${PROJECT_SOURCE_DIR}/src/lj_memprof.c
>> +  ${PROJECT_SOURCE_DIR}/src/lj_memprof.h
>>    ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c
>> +  ${PROJECT_SOURCE_DIR}/src/lj_sysprof.h
>> +  ${PROJECT_SOURCE_DIR}/src/lj_utils.h
>>    ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c
>>    ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c
>> +  ${PROJECT_SOURCE_DIR}/src/lj_wbuf.h
>> +  ${PROJECT_SOURCE_DIR}/src/lmisclib.h
>>    ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py
>>    ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py
>>    ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt
>> +  ${PROJECT_SOURCE_DIR}/test/lua-Harness-tests/CMakeLists.txt
>> +  ${PROJECT_SOURCE_DIR}/test/LuaJIT-tests/CMakeLists.txt
>> +  ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
>> +  ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt
>> + ${PROJECT_SOURCE_DIR}/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt
>>    ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests
>>    ${PROJECT_SOURCE_DIR}/test/tarantool-tests
>>    ${PROJECT_SOURCE_DIR}/tools
>>> Side note: within vim's (sort 'l' is greater then 'L', see `man ascii`),
>>> but I'm OK with this order too.
>> Sorry, I've forgot about <src/lj_symtab.c> <src/lj_symtab.h>.
>
>Added:
>
>--- a/cmake/CodeSpell.cmake
>+++ b/cmake/CodeSpell.cmake
>@@ -5,6 +5,8 @@ string(JOIN "," CODESPELL_WHITELIST
>    ${PROJECT_SOURCE_DIR}/src/lj_mapi.c
>    ${PROJECT_SOURCE_DIR}/src/lj_memprof.c
>    ${PROJECT_SOURCE_DIR}/src/lj_memprof.h
>+  ${PROJECT_SOURCE_DIR}/src/lj_symtab.c
>+  ${PROJECT_SOURCE_DIR}/src/lj_symtab.h
>    ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c
>    ${PROJECT_SOURCE_DIR}/src/lj_sysprof.h
>    ${PROJECT_SOURCE_DIR}/src/lj_utils.h
>
>>
 

[-- Attachment #2: Type: text/html, Size: 3181 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and enable codespell
  2023-10-11 16:52 [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and enable codespell Sergey Bronnikov via Tarantool-patches
                   ` (3 preceding siblings ...)
  2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 4/4][v2] ci: enable codespell Sergey Bronnikov via Tarantool-patches
@ 2023-11-16 16:19 ` Igor Munkin via Tarantool-patches
  4 siblings, 0 replies; 26+ messages in thread
From: Igor Munkin via Tarantool-patches @ 2023-11-16 16:19 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: max.kokryashkin, tarantool-patches

Sergey,

I've made several touches here and there, squashed first two commits
into a single one, and finally checked the patchset into all long-term
branches in tarantool/luajit and bumped a new version in master,
release/2.11 and release/2.10.

On 11.10.23, Sergey Bronnikov via Tarantool-patches wrote:
> From: Sergey Bronnikov <sergeyb@tarantool.org>
> 
> Sometimes we do mistakes and typos. Reviewers spend a lot of time in
> proofreading of comments, commit messages and code itself and reports
> typos to authors. The idea is to automate a part of work made by
> reviewers and highlight all typos locally or in continuous integration,
> before sending patches to review.
> 
> Patches fixes typos in our own source code and enables codespell in CI.
> 
> Branch: https://github.com/tarantool/luajit/tree/ligurio/gh-xxxx-spellchecking
> 
> Changes v2:
> 
> - removed patches with checkpatch.pl integration (CMake target and
>   Github workflow)
> - added codespell integration (CMake target and Github workflow)
> - addressed Sergey's comments
> 
> Sergey Bronnikov (4):
>   codehealth: fix typos
>   test: fix codestyle
>   cmake: introduce target with codespell
>   ci: enable codespell
> 

<snipped>

> 
> -- 
> 2.34.1
> 

-- 
Best regards,
IM

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2023-11-16 16:23 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-11 16:52 [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and enable codespell Sergey Bronnikov via Tarantool-patches
2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 1/4][v2] codehealth: fix typos Sergey Bronnikov via Tarantool-patches
2023-10-12 10:33   ` Maxim Kokryashkin via Tarantool-patches
2023-10-23  8:50   ` Sergey Kaplun via Tarantool-patches
2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 2/4][v2] test: fix codestyle Sergey Bronnikov via Tarantool-patches
2023-10-12 10:34   ` Maxim Kokryashkin via Tarantool-patches
2023-10-23  8:52   ` Sergey Kaplun via Tarantool-patches
2023-10-23 14:13     ` Sergey Bronnikov via Tarantool-patches
2023-10-23 14:27       ` Sergey Kaplun via Tarantool-patches
2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell Sergey Bronnikov via Tarantool-patches
2023-10-11 19:33   ` Sergey Bronnikov via Tarantool-patches
2023-10-12 10:43   ` Maxim Kokryashkin via Tarantool-patches
2023-10-12 13:28     ` Sergey Bronnikov via Tarantool-patches
2023-10-12 18:46       ` Maxim Kokryashkin via Tarantool-patches
2023-10-17 14:50         ` Sergey Bronnikov via Tarantool-patches
2023-10-23  9:20   ` Sergey Kaplun via Tarantool-patches
2023-10-23 12:29     ` Sergey Bronnikov via Tarantool-patches
2023-10-23 14:38       ` Sergey Kaplun via Tarantool-patches
2023-10-31  6:42         ` Sergey Kaplun via Tarantool-patches
2023-10-31 10:50           ` Sergey Bronnikov via Tarantool-patches
2023-10-31 11:31             ` Sergey Kaplun via Tarantool-patches
2023-10-31 11:53             ` Maxim Kokryashkin via Tarantool-patches
2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 4/4][v2] ci: enable codespell Sergey Bronnikov via Tarantool-patches
2023-10-12 10:45   ` Maxim Kokryashkin via Tarantool-patches
2023-10-23  8:53   ` Sergey Kaplun via Tarantool-patches
2023-11-16 16:19 ` [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and " Igor Munkin via Tarantool-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox