[Tarantool-patches] [PATCH luajit] test: remove inline suppressions of _TARANTOOL

Sergey Kaplun skaplun at tarantool.org
Mon Jun 10 12:41:05 MSK 2024


Hi, Sergey!
Thanks for the patch!
LGTM, after fixing my comment below.

On 06.06.24, Sergey Bronnikov wrote:
> From: Sergey Bronnikov <sergeyb at tarantool.org>
> 
> The patch defines _TARANTOOL as a global in luacheck configuration
> file and removes inline suppressions in test files.
> ---
> Branch: https://github.com/tarantool/luajit/tree/ligurio/fix-_TARANTOOL
> 

<snipped>

>  12 files changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/.luacheckrc b/.luacheckrc
> index a32012ca..62ceeaa2 100644
> --- a/.luacheckrc
> +++ b/.luacheckrc
> @@ -1,7 +1,7 @@
>  -- Use the default LuaJIT globals.
>  std = 'luajit'
>  -- This fork also introduces a new global for misc API namespace.
> -read_globals = { 'misc' }
> +read_globals = { 'misc', '_TARANTOOL' }

Can we use it only for <tarantool-tests> directory to avoid it appearing
in the Lua sources inside the repository?

===================================================================
diff --git a/.luacheckrc b/.luacheckrc
index a32012ca..7b5634a5 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -3,6 +3,10 @@ std = 'luajit'
 -- This fork also introduces a new global for misc API namespace.
 read_globals = { 'misc' }
 
+-- The `_TARANTOOL` global is often used for skip condition
+-- checks.
+files['test/tarantool-tests/'] = {read_globals = {'_TARANTOOL'}}
+
 -- These files are inherited from the vanilla LuaJIT or different
 -- test suites and need to be coherent with the upstream.
 exclude_files = {
===================================================================


>  
>  -- These files are inherited from the vanilla LuaJIT or different
>  -- test suites and need to be coherent with the upstream.

<snipped>

> -- 
> 2.34.1
> 

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list