From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 803FA7185A; Sun, 14 Feb 2021 22:33:33 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 803FA7185A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1613331213; bh=oXbWkcyL5AJfbk0xRdCk0Vn/S3Jr/UOmmA59WzQeduU=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=vFtk9fQUMBPpA0vgVmD426sXo++KR9HEtw7ZPFtrB8BEJYefluY5BCBo12kXEvdgs x5XymUR+Un+ZU/I6UkUtS7omZXV2xOqLDq12dK9Gg7uL6nBp7xCV9+ZSnmyN2ape4c dorEuOGdlTxbmy/MZL6al27jC4m2F1e7psxRcBYA= Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 86ABE7185A for ; Sun, 14 Feb 2021 22:33:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 86ABE7185A Received: by smtp29.i.mail.ru with esmtpa (envelope-from ) id 1lBN95-0005E2-D4; Sun, 14 Feb 2021 22:33:27 +0300 Date: Sun, 14 Feb 2021 22:32:44 +0300 To: Igor Munkin Message-ID: <20210214193244.GG9361@root> References: <7057011c43d41adab30dbd13621570418064d38d.1612291495.git.imun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7057011c43d41adab30dbd13621570418064d38d.1612291495.git.imun@tarantool.org> X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD981647AC6901E234BEAC4623CA173AF239537CEFAAFD1F814182A05F53808504067DE21430597AC858CE31E8296BCFD865B68F53CF2B36A89DA7BEF4A424F3CA0 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7BA0D57D3459E5640EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063775FF68B4B43662428638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC79402D06D4A716D6347868E81C9D0E2ADC90F1C285956EF5389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C078FCF50C7EAF9C588941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B636DA1BED736F9328CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FCAEB924C2B054B06E75ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4930A3850AC1BE2E7352686C055BC15B7FBC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F5D41B9178041F3E72623479134186CDE6BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A592834CE6A58A21AC6C31CD381A5451ED8570F134B61CB32FD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D345DE7771146E56B08CF62462FBD99ACF3CA7A581657F75B2C5E1ABF265F6579A366DD6CB8579E16F01D7E09C32AA3244C3B9DBC05439853ACF6E656B35E6312357101BF96129E4011FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojcZK6cmu79qTkbD6k9W0Lfg== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB405476344C9B736B2BAEFBD9903455883B14B242DB9418904F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 5/5] test: run luacheck static analysis via CMake X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Igor! Thanks for the patch! Nice to see all LuaJIT-related stuff inside its repo! LGTM, except few questions below. On 02.02.21, Igor Munkin wrote: > This patch introduces a separate target to run luacheck against all Lua > chunks within LuaJIT repository except those explicitly ignored in > .luacheckrc. There is also a single additional change over the 'luajit' > std defaults: to suppress all false positives related to Typo: defaults are standards already. 'std' or 'defatults' is redundant here. > namespace introduced in 5a61e1ab54b5c66bfebd836db1ac47996611e065 ('misc: > add C and Lua API for platform metrics'), this name is added to > list. > > All Lua sources originally inherited from LuaJIT vanilla repository are > ignored, to leave them coherent with the upstream. > > The new target is a dependency for the root target. > Nit: Looks like you should mention tarantool/tarantool#5631 here. Or squash it with the previous patch. See rationale here [1]. Feel free to ignore. > Part of tarantool/tarantool#4862 > Part of tarantool/tarantool#5470 > > Signed-off-by: Igor Munkin > --- > .gitignore | 1 + > .luacheckrc | 11 +++++++++++ > test/CMakeLists.txt | 31 +++++++++++++++++++++++++++++++ > 3 files changed, 43 insertions(+) > create mode 100644 .luacheckrc > > diff --git a/.gitignore b/.gitignore > index 35d2580..7902547 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -17,6 +17,7 @@ Makefile > diff --git a/.luacheckrc b/.luacheckrc > new file mode 100644 > index 0000000..0a5d001 > --- /dev/null > +++ b/.luacheckrc > @@ -0,0 +1,11 @@ > diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt > index f05dd90..c89efc2 100644 > --- a/test/CMakeLists.txt > +++ b/test/CMakeLists.txt > @@ -3,6 +3,36 @@ > # See the rationale in the root CMakeLists.txt. > cmake_minimum_required(VERSION 3.1 FATAL_ERROR) Side note: Why this version? > > +find_program(LUACHECK luacheck) > +if(LUACHECK) > + set(LUACHECK_RC ${PROJECT_SOURCE_DIR}/.luacheckrc) > + set(LUACHECK_OK ${CMAKE_CURRENT_BINARY_DIR}/luacheck.ok) > + file(GLOB_RECURSE LUACHECK_DEPS ${PROJECT_SOURCE_DIR}/*.lua) > + add_custom_command( > + COMMENT "Running luacheck static analysis" > + OUTPUT ${LUACHECK_OK} > + DEPENDS ${LUACHECK} ${LUACHECK_RC} ${LUACHECK_DEPS} Why are `${LUACHECK}` and `${LUACHECK_RC}` are mentioned? > + COMMAND > + ${LUACHECK} ${PROJECT_SOURCE_DIR} > + --codes > + --config ${LUACHECK_RC} > + && touch ${LUACHECK_OK} > + # XXX: Filenames in .luacheckrc are considered relative to > + # the working directory, hence luacheck should be run in the > + # project root directory. > + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} > + ) > -- > 2.25.0 > [1]: https://lists.tarantool.org/tarantool-patches/20210214191626.GF9361@root/T/#md50dbe78c52523ca739f2751d96c61edcf2e7a36 -- Best regards, Sergey Kaplun