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 017427030B; Fri, 19 Feb 2021 22:14:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 017427030B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1613762065; bh=mVq8LN2Tujq69OZ7Y2v16AwPMrvQl+LZfnK1Y02nwvY=; 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=fmPapjOpvoE9bX0M52vQLLWPAKNwHizzQkDeLVMJyJQGypIQs4NdpzA0yWtquPV/F J9mpNoUXMTRRPistl0d/eiVoZSOREtnMdcXioN2owsBA0S7nqj6dvRKlGjaO+vBWMv 6orwN2TdQXgHVY5tKDM/mny9H0zJ65cxxtiVsjvs= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 D2F7D7030B for ; Fri, 19 Feb 2021 22:14:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D2F7D7030B Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1lDBEM-0002v0-OQ; Fri, 19 Feb 2021 22:14:23 +0300 Date: Fri, 19 Feb 2021 22:14:19 +0300 To: Sergey Kaplun Message-ID: <20210219191419.GP5448@tarantool.org> References: <7057011c43d41adab30dbd13621570418064d38d.1612291495.git.imun@tarantool.org> <20210214193244.GG9361@root> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210214193244.GG9361@root> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD975C3EC174F5669221340953D8FEAAFCA26BB79E5C093AA91182A05F5380850404DBCC1092C1FA8E2BFF1DBB313709CFA52092D921621A2D2A9B2EF0D3430735C X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7466896EF24E80F12EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063727C65896DA7AF7D78638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC6E46C3FEA7AD79AB48EC4131978E8D288C17B156F729AB20389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C000E2D00546020E658941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B601F8F2FECC0250C8CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FCB9CEE4F2B4A90F8475ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4930A3850AC1BE2E7355705F49E3A860CEDC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F05F538519369F3743B503F486389A921A5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A53927E819B103927823713DB3C9EF1A371FD5A1C38682F4D3D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346840168BCAD8054EE3162BFBB3145CCF54299987D9FC76CD355BB56F301A42D5131CECB651004F701D7E09C32AA3244CEB56E88B2D2E87526497E0977DA6738E3FD9C8CA1B0515E0927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojPfquRGj7311hefCHUq1/Og== X-Mailru-Sender: 689FA8AB762F73936BC43F508A0638225F6852AA124E0A7D61D3DB0946406212A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, Thanks for your review! On 14.02.21, Sergey Kaplun wrote: > Hi, Igor! > > Thanks for the patch! > Nice to see all LuaJIT-related stuff inside its repo! > > LGTM, except few questions below. Added your tag: | Reviewed-by: Sergey Kaplun > > 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. No. std is the attribute of .luacheckrc. The value of this attribute is 'luajit'. The defaults of the chosen std requires an additional change. > > > 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. Answered here[1]. Ignoring. > > > 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/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? Answered here[2]. > > > > > +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? To prevent target from running when strictly required luacheck or .luacheckrc is missing. > > > + 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 [1]: https://lists.tarantool.org/tarantool-patches/cover.1612291495.git.imun@tarantool.org/T/#m817b6d754030b10f5b90f7602906496da10ee59f [2]: https://lists.tarantool.org/tarantool-patches/cover.1612291495.git.imun@tarantool.org/T/#m17cec88647c4defe2afee689dcba8d03b8b660d7 -- Best regards, IM