[Tarantool-patches] [PATCH v5 00/10] Add static analysis with luacheck

sergeyb at tarantool.org sergeyb at tarantool.org
Tue May 12 12:49:51 MSK 2020


From: Sergey Bronnikov <sergeyb at tarantool.org>

Changelog v5:

- updated list of excluded files. Now files below are covered by
luacheck:
  - test/engine/box.lua
  - test/engine/conflict.lua
  - test/replication/master_quorum.lua
  - test/replication/on_replace.lua
  - test/replication/replica.lua
  - test/replication/replica_on_schema_init.lua
  - test/swim/box.lua
  - test/vinyl/stress.lua
  - test/vinyl/vinyl.lua
- rebased to master and fixed warnings in a newly added Lua
code:
  - test/app-tap/popen.test.lua
  - test/box-tap/extended_error.test.lua
  - test/box-tap/gh-4785-syslog.test.lua
- enabled 'make luacheck'
- fixed or supressed warnings in a new files

Sergey Bronnikov (10):
  Add initial luacheck config
  gitlab-ci: enable static analysis with luacheck
  Fix luacheck warnings in extra/dist/tarantoolctl.in
  Fix luacheck warnings in src/lua/
  Fix luacheck warnings in src/lua/
  Fix luacheck warnings in src/box/lua/
  Fix luacheck warnings in src/box/lua/
  Fix luacheck warnings in test/
  Add luacheck supressions for luajit tests
  build: Enable 'make luacheck'  target.

GH issue: https://github.com/tarantool/tarantool/issues/4681
GitHub branch: https://github.com/tarantool/tarantool/tree/ligurio/gh-4681-fix-luacheck-warnings

 .gitlab-ci.yml                                |  11 +
 .luacheckrc                                   |  83 +++
 .travis.mk                                    |  17 +
 CMakeLists.txt                                |  11 +
 extra/dist/tarantoolctl.in                    |  33 +-
 src/box/lua/console.lua                       |   6 +-
 src/box/lua/feedback_daemon.lua               |   2 +-
 src/box/lua/key_def.lua                       |   2 +-
 src/box/lua/load_cfg.lua                      |  31 +-
 src/box/lua/net_box.lua                       |  53 +-
 src/box/lua/schema.lua                        |  50 +-
 src/box/lua/tuple.lua                         |   8 +-
 src/box/lua/upgrade.lua                       |  19 +-
 src/lua/argparse.lua                          |   6 +-
 src/lua/buffer.lua                            |   4 +-
 src/lua/clock.lua                             |   2 +-
 src/lua/crypto.lua                            |   4 +-
 src/lua/csv.lua                               |   5 +-
 src/lua/digest.lua                            |   2 +-
 src/lua/env.lua                               |   2 +-
 src/lua/fiber.lua                             |   4 +-
 src/lua/fio.lua                               |  37 +-
 src/lua/help.lua                              |   7 +-
 src/lua/httpc.lua                             |   3 -
 src/lua/init.lua                              |   7 +-
 src/lua/msgpackffi.lua                        |  22 +-
 src/lua/socket.lua                            |  65 ++-
 src/lua/string.lua                            |   1 -
 src/lua/swim.lua                              |  10 +-
 src/lua/tap.lua                               |  74 ++-
 src/lua/trigger.lua                           |   3 -
 test/app-tap/cfg.test.lua                     |   2 +-
 test/app-tap/clock.test.lua                   |   4 +-
 test/app-tap/console.test.lua                 |  16 +-
 test/app-tap/console_lua.test.lua             |  22 +-
 test/app-tap/csv.test.lua                     |  56 +-
 test/app-tap/debug.test.lua                   |  10 +-
 test/app-tap/errno.test.lua                   |  24 +-
 test/app-tap/fail_main.test.lua               |   6 +-
 .../gh-4761-json-per-call-options.test.lua    |  11 +-
 test/app-tap/http_client.test.lua             | 297 +++++------
 test/app-tap/iconv.test.lua                   |   6 +-
 test/app-tap/init_script.test.lua             |  14 +-
 test/app-tap/inspector.test.lua               |   5 +-
 test/app-tap/json.test.lua                    |   1 -
 test/app-tap/logger.test.lua                  |  21 +-
 test/app-tap/minimal.test.lua                 |   4 +-
 test/app-tap/module_api.test.lua              |  12 +-
 test/app-tap/msgpackffi.test.lua              |   3 +-
 test/app-tap/pcall.test.lua                   |   6 +-
 test/app-tap/popen.test.lua                   |  35 +-
 test/app-tap/snapshot.test.lua                |  17 +-
 test/app-tap/string.test.lua                  | 502 +++++++++---------
 test/app-tap/tap.test.lua                     |  26 +-
 test/app-tap/tarantoolctl.test.lua            |  82 ++-
 test/app-tap/trigger.test.lua                 |  48 +-
 test/app-tap/yaml.test.lua                    |  16 +-
 test/box-py/box.lua                           |   2 +-
 test/box-tap/auth.test.lua                    |  36 +-
 test/box-tap/cfg.test.lua                     |  34 +-
 test/box-tap/cfgup.test.lua                   |   2 +-
 test/box-tap/extended_error.test.lua          |  11 +-
 test/box-tap/feedback_daemon.test.lua         |   4 +-
 test/box-tap/gc.test.lua                      |   6 +-
 test/box-tap/gh-4785-syslog.test.lua          |   4 +-
 test/box-tap/key_def.test.lua                 | 132 ++---
 test/box-tap/merger.test.lua                  | 112 ++--
 test/box-tap/on_schema_init.test.lua          |   4 +-
 test/box-tap/schema_mt.test.lua               |  18 +-
 test/box-tap/session.storage.test.lua         |  10 +-
 test/box-tap/session.test.lua                 |  59 +-
 test/box-tap/trigger_atexit.test.lua          |  10 +-
 test/box-tap/trigger_yield.test.lua           |  10 +-
 test/box/box.lua                              |   2 +-
 test/box/hash_multipart.result                |   2 +-
 test/box/hash_multipart.test.lua              |   2 +-
 test/box/lua/bitset.lua                       |   7 +-
 test/box/lua/cfg_bad_vinyl_dir.lua            |   2 +-
 test/box/lua/cfg_rtree.lua                    |   2 +-
 test/box/lua/cfg_test1.lua                    |   2 +-
 test/box/lua/cfg_test2.lua                    |   2 +-
 test/box/lua/cfg_test3.lua                    |   2 +-
 test/box/lua/cfg_test4.lua                    |   2 +-
 test/box/lua/cfg_test5.lua                    |   4 +-
 test/box/lua/cfg_test6.lua                    |   2 +-
 test/box/lua/fifo.lua                         |   2 +-
 test/box/lua/identifier.lua                   |   9 +-
 test/box/lua/index_random_test.lua            |   2 +-
 test/box/lua/require_init.lua                 |   3 -
 test/box/lua/test_init.lua                    |  10 +-
 test/box/lua/utils.lua                        |  13 +-
 test/box/on_schema_init.lua                   |   2 +-
 test/box/proxy.lua                            |   2 +-
 test/box/tiny.lua                             |   2 +-
 test/box/tree_pk.result                       |   4 +-
 test/box/tree_pk.test.lua                     |   4 +-
 test/engine/box.lua                           |   8 +-
 test/engine/conflict.lua                      |   6 +-
 test/engine/tree_min_max_count.result         |   2 +-
 test/engine/tree_min_max_count.test.lua       |   2 +-
 test/engine_long/suite.lua                    |   4 +-
 test/long_run-py/lua/finalizers.lua           |   8 +-
 test/long_run-py/suite.lua                    |   6 +-
 test/replication-py/master.lua                |   2 +-
 test/replication-py/panic.lua                 |   2 +-
 test/replication-py/replica.lua               |   4 -
 test/replication/lua/fast_replica.lua         |   3 +-
 test/replication/lua/rlimit.lua               |   2 +-
 test/replication/master.lua                   |   2 +-
 test/replication/master_quorum.lua            |   4 +-
 test/replication/on_replace.lua               |   6 +-
 test/replication/replica.lua                  |   4 +-
 test/replication/replica_on_schema_init.lua   |   4 +-
 test/replication/replicaset_ro_mostly.result  |   2 +-
 .../replication/replicaset_ro_mostly.test.lua |   2 +-
 test/sql-tap/alter.test.lua                   |   4 +-
 test/sql-tap/analyze3.test.lua                |   6 +-
 test/sql-tap/analyze5.test.lua                |   2 +-
 test/sql-tap/analyze9.test.lua                |  30 +-
 test/sql-tap/between.test.lua                 |   4 +-
 test/sql-tap/date.test.lua                    |   3 +-
 test/sql-tap/delete1.test.lua                 |   2 +-
 test/sql-tap/e_delete.test.lua                |   2 +-
 test/sql-tap/e_expr.test.lua                  |  22 +-
 test/sql-tap/func.test.lua                    |   2 +-
 test/sql-tap/func3.test.lua                   |  24 +-
 test/sql-tap/gh-2723-concurrency.test.lua     |   8 +-
 .../gh-3083-ephemeral-unref-tuples.test.lua   |   2 +-
 .../gh-3307-xfer-optimization-issue.test.lua  |  16 +-
 .../gh-3332-tuple-format-leak.test.lua        |   2 +-
 .../gh-4077-iproto-execute-no-bind.test.lua   |   7 +-
 .../gh2127-indentifier-max-length.test.lua    |  10 +-
 test/sql-tap/identifier-characters.test.lua   |   2 +-
 test/sql-tap/index1.test.lua                  |   3 +-
 test/sql-tap/index7.test.lua                  |   2 +-
 test/sql-tap/join3.test.lua                   |   2 +-
 test/sql-tap/lua-tables.test.lua              |   2 +-
 test/sql-tap/lua/sqltester.lua                |  28 +-
 test/sql-tap/misc1.test.lua                   |  10 +-
 test/sql-tap/misc5.test.lua                   |   2 +-
 test/sql-tap/select1.test.lua                 |  10 +-
 test/sql-tap/select2.test.lua                 |   8 +-
 test/sql-tap/select4.test.lua                 |   1 -
 test/sql-tap/select5.test.lua                 |   1 -
 test/sql-tap/select9.test.lua                 |  12 +-
 test/sql-tap/selectA.test.lua                 |   8 +-
 test/sql-tap/selectB.test.lua                 |  14 +-
 test/sql-tap/selectG.test.lua                 |   1 -
 test/sql-tap/sort.test.lua                    |   2 +-
 test/sql-tap/sql-errors.test.lua              |   2 +-
 test/sql-tap/table.test.lua                   |   3 +-
 test/sql-tap/tkt-38cb5df375.test.lua          |   1 -
 test/sql-tap/tkt-91e2e8ba6f.test.lua          |   3 -
 test/sql-tap/tkt-9a8b09f8e6.test.lua          |   3 -
 test/sql-tap/tkt-bd484a090c.test.lua          |   3 +-
 test/sql-tap/tkt-fa7bf5ec.test.lua            |   6 +-
 test/sql-tap/tkt2192.test.lua                 |   3 +-
 test/sql-tap/tkt3493.test.lua                 |   3 -
 test/sql-tap/trigger2.test.lua                |   4 +-
 test/sql-tap/triggerA.test.lua                |   1 -
 test/sql-tap/where2.test.lua                  |   9 +-
 test/sql-tap/where3.test.lua                  |   2 +-
 test/sql-tap/where4.test.lua                  |   4 +-
 test/sql-tap/where5.test.lua                  |   2 +-
 test/sql-tap/where6.test.lua                  |   2 +-
 test/sql-tap/where7.test.lua                  |  16 +-
 test/sql-tap/whereA.test.lua                  |   2 +-
 test/sql-tap/whereB.test.lua                  |   2 +-
 test/sql-tap/whereC.test.lua                  |   5 +-
 test/sql-tap/whereD.test.lua                  |   4 +-
 test/sql-tap/whereF.test.lua                  |   4 +-
 test/sql-tap/whereG.test.lua                  |   4 +-
 test/sql-tap/whereI.test.lua                  |   4 +-
 test/sql-tap/whereK.test.lua                  |   4 +-
 test/sql-tap/with1.test.lua                   |  14 +-
 test/sql-tap/with2.test.lua                   |  18 +-
 test/sql/lua/sql_tokenizer.lua                |   2 +-
 test/sql/savepoints.result                    |   6 +-
 test/sql/savepoints.test.lua                  |   6 +-
 test/sql/triggers.result                      |   2 +-
 test/sql/triggers.test.lua                    |   2 +-
 test/swim/box.lua                             |   4 +-
 test/vinyl/large.lua                          |   3 +-
 test/vinyl/stress.lua                         |  22 +-
 test/vinyl/txn_proxy.lua                      |   6 +-
 test/vinyl/upgrade/fill.lua                   |   8 +-
 test/vinyl/vinyl.lua                          |  17 -
 test/wal_off/rtree_benchmark.result           |   2 +-
 test/wal_off/rtree_benchmark.test.lua         |   2 +-
 test/xlog-py/box.lua                          |   2 +-
 test/xlog/panic.lua                           |   2 +-
 test/xlog/reader.result                       |   2 +-
 test/xlog/reader.test.lua                     |   2 +-
 test/xlog/snap_io_rate.test.lua               |   2 +-
 test/xlog/transaction.result                  |   2 +-
 test/xlog/transaction.test.lua                |   2 +-
 .../2.1.3/gh-4771-upgrade-sequence/fill.lua   |  12 +-
 test/xlog/xlog.lua                            |   2 +-
 198 files changed, 1459 insertions(+), 1474 deletions(-)
 create mode 100644 .luacheckrc

-- 
2.23.0



More information about the Tarantool-patches mailing list