<HTML><BODY><div>Hi Sergey, thank you for the patch. As I understood from the comments there are no actual issues blocked in the exclusions for which the new issue should be created and commented into the code, if so, then LGTM.<br><br> <blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Среда, 8 апреля 2020, 18:43 +03:00 от Sergey Bronnikov <estetus@gmail.com>:<br> <div id=""><div class="js-helper js-readmsg-msg"><style type="text/css"></style><div><div id="style_15863606150498943602_BODY">From: Sergey Bronnikov <<a href="/compose?To=sergeyb@tarantool.org">sergeyb@tarantool.org</a>><br><br>From the beginning we haven't use static analysis for Lua source code and<br>therefore now we have about 32k warnings and errors produced by luacheck. Sure<br>these issues are not real bugs but fixing them will make source code better and<br>clear. Aim to fix all of them at once looks insane and perhaps it is not worth<br>it.<br><br>Summary of static analysis:<br><br>There were no errors found by luacheck in production source code (src/),<br>many warnings were fixed in previous commits and non-interested warnings were<br>supressed using luacheck config.<br><br>Lua source code in test/ directory contains both errors and warnings and there<br>are a lot of them. Some of these warnings were fixed by previous commits and<br>most part of warnings and errors supressed in luacheck config. Regarding<br>errors: all found errors belongs to a single error class - "Syntax error"<br>(E011). All of them have a single root cause - at the of testscases we write<br>conditions without assignments and it is confuses luacheck. Usually such<br>conditions used together with asserts, but in our tests we uses reference outputs<br>instead of asserts.<br><br>How-to check:<br><br>$ tarantoolctl rocks install luacheck<br>$ .rocks/bin/luacheck --codes --config .luacheckrc .<br><br>Closes #4681<br>---<br> .luacheckrc | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++<br> 1 file changed, 162 insertions(+)<br> create mode 100644 .luacheckrc<br><br>diff --git a/.luacheckrc b/.luacheckrc<br>new file mode 100644<br>index 000000000..2550f9f1a<br>--- /dev/null<br>+++ b/.luacheckrc<br>@@ -0,0 +1,162 @@<br>+include_files = {<br>+ "**/*.lua",<br>+ "extra/dist/tarantoolctl.in",<br>+}<br>+<br>+exclude_files = {<br>+ "third_party/**/*.lua",<br>+ "test-run/**/*.lua",<br>+ "test/wal_off/*.lua", -- E011<br>+ "test/xlog/*.lua", -- E011<br>+ "test/vinyl/*.lua", -- E011<br>+ "test/sql/*.lua", -- E011<br>+ "test/replication/*.lua", -- E011<br>+ "test/engine/*.lua", -- E011<br>+ "test/swim/*.lua", -- E011<br>+ "test/box/*.lua", -- E011<br>+ "test/app/*.lua", -- E011<br>+ "test/app-tap/*.lua", -- E011<br>+ "test/app-tap/lua/serializer_test.lua", -- E011<br>+ "build/**/*.lua",<br>+ ".rocks/**/*.lua",<br>+ ".git/**/*.lua",<br>+}<br>+<br>+files["**/*.lua"] = {ignore = {"212", "122"}}<br>+files["extra/dist/tarantoolctl.in"] = {ignore = {"431", "411", "122", "542"}}<br>+files["src/lua/help.lua"] = {globals = {"help", "tutorial"}, ignore = {"113", "211"}}<br>+files["src/lua/swim.lua"] = {ignore = {"431"}}<br>+files["src/lua/fio.lua"] = {ignore = {"231"}}<br>+files["src/lua/init.lua"] = {ignore = {"122", "121"}}<br>+files["src/lua/fiber.lua"] = {ignore = {"331", "311"}}<br>+files["src/box/lua/serpent.lua"] = {globals = {"_ENV"}, ignore = {"431", "421", "631", "432", "542", "412", "422"}}<br>+files["src/box/lua/load_cfg.lua"] = {ignore = {"431", "143", "311", "542"}}<br>+files["src/box/lua/net_box.lua"] = {ignore = {"431", "211", "421", "432", "311", "231", "411", "412"}}<br>+files["src/box/lua/schema.lua"] = {globals = {"update_format", "iid", "role_check_grant_revoke_of_sys_priv"}, ignore = {"431", "122", "211", "421", "213", "432", "311", "542", "412"}}<br>+files["src/box/lua/key_def.lua"] = {ignore = {"431"}}<br>+files["src/box/lua/feedback_daemon.lua"] = {ignore = {"122", "211"}}<br>+files["src/box/lua/tuple.lua"] = {ignore = {"122", "211", "421", "412"}}<br>+files["src/box/lua/upgrade.lua"] = {ignore = {"122", "211", "421", "213"}}<br>+files["src/box/lua/console.lua"] = {globals = {"help"}, ignore = {"211", "143"}}<br>+files["test/**/*.lua"] = {ignore = {"631", "611", "614", "613", "612", "621", "112", "211", "432"}}<br>+files["test/app/*.lua"] = {ignore = {"111", "113"}}<br>+files["test/app/lua/fiber.lua"] = {ignore = {"111"}}<br>+files["test/app-tap/*.lua"] = {ignore = {"111", "113"}}<br>+files["test/app-tap/tarantoolctl.test.lua"] = {ignore = {"511"}}<br>+files["test/app-tap/lua/require_mod.lua"] = {ignore = {"113", "111"}}<br>+files["test/box/admin.test.lua"] = {ignore = {"213"}}<br>+files["test/box/lua/*.lua"] = {ignore = {"111"}}<br>+files["test/box/*.lua"] = {ignore = {"111", "113"}}<br>+files["test/box/lua/utils.lua"] = {ignore = {"421", "113", "213", "412"}}<br>+files["test/box/lua/bitset.lua"] = {ignore = {"113", "213"}}<br>+files["test/box/lua/fifo.lua"] = {ignore = {"113", "213"}}<br>+files["test/box/lua/identifier.lua"] = {ignore = {"113"}}<br>+files["test/box/lua/require_mod.lua"] = {ignore = {"113"}}<br>+files["test/box/lua/require_init.lua"] = {ignore = {"412", "143"}}<br>+files["test/box/lua/test_init.lua"] = {ignore = {"113", "412", "143"}}<br>+files["test/box/lua/index_random_test.lua"] = {ignore = {"213"}}<br>+files["test/box-tap/*.lua"] = {ignore = {"111"}}<br>+files["test/box-tap/auth.test.lua"] = {ignore = {"311", "411", "113"}}<br>+files["test/box-tap/cfg.test.lua"] = {ignore = {"311", "411", "113"}}<br>+files["test/box-tap/cfgup.test.lua"] = {ignore = {"113"}}<br>+files["test/box-tap/feedback_daemon.test.lua"] = {ignore = {"411"}}<br>+files["test/box-tap/gc.test.lua"] = {ignore = {"421"}}<br>+files["test/box-tap/on_schema_init.test.lua"] = {ignore = {"113"}}<br>+files["test/box-tap/schema_mt.test.lua"] = {ignore = {"113", "122"}}<br>+files["test/box-tap/key_def.test.lua"] = {ignore = {"411", "431"}}<br>+files["test/box-tap/merger.test.lua"] = {ignore = {"411", "431", "412", "213"}}<br>+files["test/box-tap/session.storage.test.lua"] = {ignore = {"113"}}<br>+files["test/box-tap/session.test.lua"] = {ignore = {"411", "113", "412", "143"}}<br>+files["test/box-tap/trigger_atexit.test.lua"] = {ignore = {"113"}}<br>+files["test/box-tap/trigger_yield.test.lua"] = {ignore = {"213", "113"}}<br>+files["test/luajit-tap/fix_string_find_recording.test.lua"] = {ignore = {"111", "113", "231"}}<br>+files["test/luajit-tap/gh-4476-fix-string-find-recording.test.lua"] = {ignore = {"231"}}<br>+files["test/luajit-tap/fold_bug_LuaJIT_505.test.lua"] = {ignore = {"111", "113"}}<br>+files["test/luajit-tap/gh.test.lua"] = {ignore = {"111", "113"}}<br>+files["test/luajit-tap/table_chain_bug_LuaJIT_494.test.lua"] = {ignore = {"111", "113"}}<br>+files["test/luajit-tap/unsink_64_kptr.test.lua"] = {ignore = {"111", "113", "551", "542"}}<br>+files["test/luajit-tap/or-232-unsink-64-kptr.test.lua"] = {ignore = {"542"}}<br>+files["test/luajit-tap/lj-494-table-chain-infinite-loop.test.lua"] = {ignore = {"111", "113", "213"}}<br>+files["test/engine/*.lua"] = {ignore = {"111", "113"}}<br>+files["test/engine_long/suite.lua"] = {ignore = {"421", "111", "213"}}<br>+files["test/engine_long/delete_replace_update.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/engine_long/delete_insert.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/long_run-py/suite.lua"] = {ignore = {"421", "111", "113", "213"}}<br>+files["test/long_run-py/lua/finalizers.lua"] = {ignore = {"241", "511", "111", "113"}}<br>+files["test/replication/*.lua"] = {ignore = {"113", "111"}}<br>+files["test/replication/lua/fast_replica.lua"] = {ignore = {"113", "213"}}<br>+files["test/replication/lua/rlimit.lua"] = {ignore = {"113"}}<br>+files["test/replication-py/replica.lua"] = {ignore = {"111"}}<br>+files["test/replication/lua/fast_replica.lua"] = {ignore = {"113", "111", "213"}}<br>+files["test/replication/lua/rlimit.lua"] = {ignore = {"113", "111"}}<br>+files["test/sql/*.lua"] = {ignore = {"113", "111"}}<br>+files["test/sql/triggers.test.lua"] = {ignore = {"631", "113", "111"}}<br>+files["test/sql/tokenizer.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/sql/transitive-transactions.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/sql/savepoints.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/sql/persistency.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/sql-tap/*.lua"] = {ignore = {"113", "111"}}<br>+files["test/sql-tap/lua_sql.test.lua"] = {ignore = {"412"}}<br>+files["test/sql-tap/subquery.test.lua"] = {ignore = {"412", "143"}}<br>+files["test/sql-tap/alias.test.lua"] = {ignore = {"412", "143"}}<br>+files["test/sql-tap/analyze9.test.lua"] = {ignore = {"213", "411"}}<br>+files["test/sql-tap/between.test.lua"] = {ignore = {"421", "213"}}<br>+files["test/sql-tap/check.test.lua"] = {ignore = {"412", "143"}}<br>+files["test/sql-tap/date.test.lua"] = {ignore = {"511"}}<br>+files["test/sql-tap/e_expr.test.lua"] = {ignore = {"512", "431", "213", "411"}}<br>+files["test/sql-tap/func.test.lua"] = {ignore = {"412", "143"}}<br>+files["test/sql-tap/func5.test.lua"] = {ignore = {"412", "143"}}<br>+files["test/sql-tap/misc1.test.lua"] = {ignore = {"411"}}<br>+files["test/sql-tap/select1.test.lua"] = {ignore = {"511", "213"}}<br>+files["test/sql-tap/select2.test.lua"] = {ignore = {"421"}}<br>+files["test/sql-tap/select4.test.lua"] = {ignore = {"421"}}<br>+files["test/sql-tap/select5.test.lua"] = {ignore = {"421"}}<br>+files["test/sql-tap/selectA.test.lua"] = {ignore = {"542"}}<br>+files["test/sql-tap/selectB.test.lua"] = {ignore = {"213", "542"}}<br>+files["test/sql-tap/selectG.test.lua"] = {ignore = {"421"}}<br>+files["test/sql-tap/table.test.lua"] = {ignore = {"511"}}<br>+files["test/sql-tap/tkt-bd484a090c.test.lua"] = {ignore = {"511"}}<br>+files["test/sql-tap/tkt-38cb5df375.test.lua"] = {ignore = {"421"}}<br>+files["test/sql-tap/tkt-91e2e8ba6f.test.lua"] = {ignore = {"542"}}<br>+files["test/sql-tap/tkt-9a8b09f8e6.test.lua"] = {ignore = {"542"}}<br>+files["test/sql-tap/tkt2192.test.lua"] = {ignore = {"511"}}<br>+files["test/sql-tap/tkt3493.test.lua"] = {ignore = {"542"}}<br>+files["test/sql-tap/triggerA.test.lua"] = {ignore = {"311"}}<br>+files["test/sql-tap/trigger2.test.lua"] = {ignore = {"213"}}<br>+files["test/sql-tap/trigger9.test.lua"] = {ignore = {"143", "412"}}<br>+files["test/sql-tap/update.test.lua"] = {ignore = {"611"}}<br>+files["test/sql-tap/whereB.test.lua"] = {ignore = {"611"}}<br>+files["test/sql-tap/with1.test.lua"] = {ignore = {"542"}}<br>+files["test/sql-tap/with2.test.lua"] = {ignore = {"213", "412"}}<br>+files["test/sql-tap/lua_sql.test.lua"] = {ignore = {"143"}}<br>+files["test/sql-tap/lua/sqltester.lua"] = {ignore = {"111", "113", "431", "213"}}<br>+files["test/sql-tap/gh-2723-concurrency.test.lua"] = {ignore = {"213"}}<br>+files["test/sql-tap/gh-3307-xfer-optimization-issue.test.lua"] = {ignore = {"412", "213"}}<br>+files["test/sql-tap/gh-3083-ephemeral-unref-tuples.test.lua"] = {ignore = {"213"}}<br>+files["test/sql-tap/gh-3332-tuple-format-leak.test.lua"] = {ignore = {"213"}}<br>+files["test/sql-tap/gh2127-indentifier-max-length.test.lua"] = {ignore = {"213"}}<br>+files["test/sql-tap/misc5.test.lua"] = {ignore = {"213"}}<br>+files["test/wal_off/rtree_benchmark.test.lua"] = {ignore = {"213", "113", "111"}}<br>+files["test/wal_off/func_max.test.lua"] = {ignore = {"511", "113", "111"}}<br>+files["test/vinyl/upgrade/fill.lua"] = {ignore = {"111", "113"}}<br>+files["test/vinyl/write_iterator_rand.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/vinyl/savepoint.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/vinyl/replica_quota.test.lua"] = {ignore = {"113", "111", "213"}}<br>+files["test/vinyl/stress.test.lua"] = {ignore = {"431", "213"}}<br>+files["test/vinyl/hermitage.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/vinyl/dump_stress.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/vinyl/constraint.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/vinyl/large.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/vinyl/options.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/xlog/upgrade/2.1.3/gh-4771-upgrade-sequence/fill.lua"] = {ignore = {"111", "113"}}<br>+files["test/xlog/transaction.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/xlog/snap_io_rate.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/xlog/reader.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/xlog/panic_on_broken_lsn.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/xlog/gh1433.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/xlog/header.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/xlog/errinj.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/xlog/force_recovery.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/xlog/big_tx.test.lua"] = {ignore = {"113", "111"}}<br>+files["test/xlog/checkpoint_threshold.test.lua"] = {ignore = {"113", "111", "213"}}<br>+files["test/swim/box.lua"] = {ignore = {"113", "111"}}<br>--<br>2.23.0<br> </div></div></div></div></blockquote> <div> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Alexander Tikhonov</div></div></div><div> </div></div></BODY></HTML>