Tarantool development patches archive
 help / color / mirror / Atom feed
From: sergeyb@tarantool.org
To: tarantool-patches@dev.tarantool.org, imun@tarantool.org,
	v.shpilevoy@tarantool.org
Cc: o.piskunov@tarantool.org
Subject: [Tarantool-patches] [PATCH v4 0/10] Add static analysis with luacheck
Date: Tue, 21 Apr 2020 17:00:17 +0300	[thread overview]
Message-ID: <cover.1587476678.git.sergeyb@tarantool.org> (raw)

From: Sergey Bronnikov <sergeyb@tarantool.org>

Changelog v4:

- applied and squashed patches authored by Igor Munkin and Vladislav Shpilevoy
- supressed W212 warnings regarding 'self' arguments
- splitted luacheckrc for several patches and squashed them to appropriate
patches with fixes
- removed supressions for files disabled for checking
- fixed more (~1200) warnings
- luacheckrc size reduced from 190 to 70 lines

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

Sergey Bronnikov (7):
  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/box/lua/
  Fix luacheck warnings in test/
  Disabled test/luajit-tap in luacheckrc

Vladislav Shpilevoy (2):
  schema: fix index promotion to functional index
  schema: fix internal symbols dangling in _G

 .gitlab-ci.yml                                |   9 ++
 .luacheckrc                                   |  74 ++++++++++++
 .travis.mk                                    |  15 ++-
 extra/dist/tarantoolctl.in                    |  29 ++---
 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                      |  25 ++--
 src/box/lua/net_box.lua                       |  26 ++--
 src/box/lua/schema.lua                        |  41 ++++---
 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                               |  25 ++--
 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                 |  15 +--
 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                   |   6 +-
 test/app-tap/fail_main.test.lua               |   6 +-
 .../gh-4761-json-per-call-options.test.lua    |  11 +-
 test/app-tap/http_client.test.lua             |  54 ++++-----
 test/app-tap/iconv.test.lua                   |   6 +-
 test/app-tap/init_script.test.lua             |  14 +--
 test/app-tap/inspector.test.lua               |   6 +-
 test/app-tap/json.test.lua                    |   1 -
 test/app-tap/logger.test.lua                  |  23 ++--
 test/app-tap/minimal.test.lua                 |   4 +-
 test/app-tap/module_api.test.lua              |  11 +-
 test/app-tap/msgpackffi.test.lua              |   3 +-
 test/app-tap/pcall.test.lua                   |   6 +-
 test/app-tap/snapshot.test.lua                |  17 ++-
 test/app-tap/string.test.lua                  |  54 ++++-----
 test/app-tap/tap.test.lua                     |  26 ++--
 test/app-tap/tarantoolctl.test.lua            |  76 ++++++------
 test/app-tap/trigger.test.lua                 |  20 ++--
 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/feedback_daemon.test.lua         |   4 +-
 test/box-tap/gc.test.lua                      |   6 +-
 test/box-tap/key_def.test.lua                 |  58 ++++-----
 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/func_index.result                 |  36 ++++++
 test/engine/func_index.test.lua               |  14 +++
 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/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/vinyl/large.lua                          |   3 +-
 test/vinyl/txn_proxy.lua                      |   6 +-
 test/vinyl/upgrade/fill.lua                   |   8 +-
 test/vinyl/vinyl.lua                          |   2 +-
 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 +-
 188 files changed, 1001 insertions(+), 961 deletions(-)
 create mode 100644 .luacheckrc

-- 
2.23.0

             reply	other threads:[~2020-04-21 14:01 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 14:00 sergeyb [this message]
2020-04-21 14:00 ` [Tarantool-patches] [PATCH v4 1/10] Add initial luacheck config sergeyb
2020-04-21 14:00 ` [Tarantool-patches] [PATCH v4 2/10] gitlab-ci: enable static analysis with luacheck sergeyb
2020-04-21 20:04   ` Alexander Tikhonov
2020-04-22  8:09     ` Sergey Bronnikov
2020-04-22  8:11     ` Kirill Yukhin
2020-04-21 14:00 ` [Tarantool-patches] [PATCH v4 3/10] Fix luacheck warnings in extra/dist/tarantoolctl.in sergeyb
2020-04-23 11:40   ` Igor Munkin
2020-04-24  8:02     ` Sergey Bronnikov
2020-04-21 14:00 ` [Tarantool-patches] [PATCH v4 4/10] Fix luacheck warnings in src/lua/ sergeyb
2020-04-23 14:13   ` Igor Munkin
2020-04-24  9:12     ` Sergey Bronnikov
2020-04-21 14:00 ` [Tarantool-patches] [PATCH v4 5/10] Fix luacheck warnings in src/box/lua/ sergeyb
2020-04-23 22:54   ` Igor Munkin
2020-05-07 10:32     ` Sergey Bronnikov
2020-05-07 14:34       ` Sergey Bronnikov
2020-05-07 10:52     ` Sergey Bronnikov
2020-04-21 14:00 ` [Tarantool-patches] [PATCH v4 6/10] Fix luacheck warnings in test/ sergeyb
2020-04-27 14:38   ` Igor Munkin
2020-05-06 16:16     ` Sergey Bronnikov
2020-04-21 14:00 ` [Tarantool-patches] [PATCH v4 7/10] schema: fix index promotion to functional index sergeyb
2020-04-23 23:24   ` Igor Munkin
2020-04-23 23:29     ` Igor Munkin
2020-04-28 23:19       ` Vladislav Shpilevoy
2020-04-21 14:00 ` [Tarantool-patches] [PATCH v4 8/10] schema: fix internal symbols dangling in _G sergeyb
2020-04-21 14:13   ` Oleg Babin
2020-04-21 14:45     ` Sergey Bronnikov
2020-04-21 19:52   ` Igor Munkin
2020-04-23 23:27     ` Igor Munkin
2020-04-28 23:19       ` Vladislav Shpilevoy
2020-04-21 14:00 ` [Tarantool-patches] [PATCH v4 9/10] Disabled test/luajit-tap in luacheckrc sergeyb
2020-04-24 10:16   ` Igor Munkin
2020-04-29 14:25     ` Sergey Bronnikov
2020-04-21 14:00 ` [Tarantool-patches] [PATCH v4 10/10] luajit: Fix warnings spotted by luacheck sergeyb
2020-04-21 19:33   ` Igor Munkin
2020-04-22 10:14     ` Sergey Bronnikov
2020-04-23  6:24   ` Sergey Bronnikov
2020-04-23 10:03     ` Igor Munkin
2020-04-23 10:30       ` Sergey Bronnikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1587476678.git.sergeyb@tarantool.org \
    --to=sergeyb@tarantool.org \
    --cc=imun@tarantool.org \
    --cc=o.piskunov@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v4 0/10] Add static analysis with luacheck' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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