From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (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 C9FE7469710 for ; Fri, 29 May 2020 18:11:51 +0300 (MSK) From: sergeyb@tarantool.org Date: Fri, 29 May 2020 18:08:56 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v6 02/25] build: enable 'make luacheck' target List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org, imun@tarantool.org Cc: o.piskunov@tarantool.org, alexander.turenko@tarantool.org From: Sergey Bronnikov Part of #4681 Reviewed-by: Igor Munkin --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d80b6806..13ff7ed84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ find_program(CAT cat) find_program(GIT git) find_program(LD ld) find_program(CTAGS ctags) +find_program(LUACHECK luacheck ENV PATH) # Define PACKAGE macro in tarantool/config.h set(PACKAGE "Tarantool" CACHE STRING "Package name.") @@ -151,6 +152,16 @@ add_custom_target(tags COMMAND ${CTAGS} -R ${tagsExclude} -f tags WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) add_custom_target(ctags DEPENDS tags) +# +# Enable 'make luacheck' target. +# + +add_custom_target(luacheck) +add_custom_command(TARGET luacheck + COMMAND ${LUACHECK} --codes --config "${PROJECT_SOURCE_DIR}/.luacheckrc" "${PROJECT_SOURCE_DIR}" + COMMENT "Perform static analysis of Lua code" +) + # # Get version # -- 2.23.0