mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
Merge #6789 from ZyX-I/lua-path
lua: Add paths from &runtimepath to package.path and package.cpath
This commit is contained in:
22
cmake/RunLuacheck.cmake
Normal file
22
cmake/RunLuacheck.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
set(LUACHECK_ARGS -q "${LUAFILES_DIR}")
|
||||
if(DEFINED IGNORE_PATTERN)
|
||||
list(APPEND LUACHECK_ARGS --exclude-files "${LUAFILES_DIR}/${IGNORE_PATTERN}")
|
||||
endif()
|
||||
if(DEFINED CHECK_PATTERN)
|
||||
list(APPEND LUACHECK_ARGS --include-files "${LUAFILES_DIR}/${CHECK_PATTERN}")
|
||||
endif()
|
||||
if(DEFINED READ_GLOBALS)
|
||||
list(APPEND LUACHECK_ARGS --read-globals "${READ_GLOBALS}")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND "${LUACHECK_PRG}" ${LUACHECK_ARGS}
|
||||
WORKING_DIRECTORY "${LUAFILES_DIR}"
|
||||
ERROR_VARIABLE err
|
||||
RESULT_VARIABLE res
|
||||
)
|
||||
|
||||
if(NOT res EQUAL 0)
|
||||
message(STATUS "Output to stderr:\n${err}")
|
||||
message(FATAL_ERROR "Linting tests failed with error: ${res}.")
|
||||
endif()
|
||||
@@ -1,13 +0,0 @@
|
||||
set(IGNORE_FILES "${TEST_DIR}/*/preload.lua")
|
||||
|
||||
execute_process(
|
||||
COMMAND ${LUACHECK_PRG} -q ${TEST_DIR} --exclude-files ${IGNORE_FILES}
|
||||
WORKING_DIRECTORY ${TEST_DIR}
|
||||
ERROR_VARIABLE err
|
||||
RESULT_VARIABLE res
|
||||
${EXTRA_ARGS})
|
||||
|
||||
if(NOT res EQUAL 0)
|
||||
message(STATUS "Output to stderr:\n${err}")
|
||||
message(FATAL_ERROR "Linting tests failed with error: ${res}.")
|
||||
endif()
|
||||
Reference in New Issue
Block a user