[Tarantool-patches] [PATCH 10/10] build: Enable 'make luacheck' target.

Sergey Bronnikov sergeyb at tarantool.org
Tue May 12 15:28:13 MSK 2020


Closes #4681
---
 CMakeLists.txt | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d80b6806..67c31c7d3 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


-- 
sergeyb@


More information about the Tarantool-patches mailing list