aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-03-31 12:02:59 +0300
committerZyX <kp-pav@yandex.ru>2017-03-31 16:04:18 +0300
commitc61858a9978504c645f09de60daf4f9786c2220e (patch)
tree1086c01fb178801836ddfb0a63b15f410070da30 /cmake
parent24fd125893203c667789cb574b289fc1c9eaf6bc (diff)
downloadrneovim-c61858a9978504c645f09de60daf4f9786c2220e.tar.gz
rneovim-c61858a9978504c645f09de60daf4f9786c2220e.tar.bz2
rneovim-c61858a9978504c645f09de60daf4f9786c2220e.zip
cmake: Replace RunLint.cmake with code in src/nvim/CMakeLists.txt
This also removes LINT_FILE environment variable, other then that functionality is kept. It is expected that developers needing partial linting will use `make lint`, touching interesting file before (if not done already by writing to them).
Diffstat (limited to 'cmake')
-rw-r--r--cmake/RunLint.cmake32
1 files changed, 0 insertions, 32 deletions
diff --git a/cmake/RunLint.cmake b/cmake/RunLint.cmake
deleted file mode 100644
index 306e938232..0000000000
--- a/cmake/RunLint.cmake
+++ /dev/null
@@ -1,32 +0,0 @@
-get_filename_component(LINT_DIR ${LINT_DIR} ABSOLUTE)
-get_filename_component(LINT_PREFIX ${LINT_DIR} PATH)
-set(LINT_SUPPRESS_FILE "${LINT_PREFIX}/errors.json")
-
-if(DEFINED ENV{LINT_FILE})
- file(GLOB_RECURSE LINT_FILES "$ENV{LINT_FILE}")
-else()
- file(GLOB_RECURSE LINT_FILES ${LINT_DIR}/*.c ${LINT_DIR}/*.h)
-endif()
-
-set(LINT_ARGS)
-
-if(LINT_SUPPRESS_URL)
- file(DOWNLOAD ${LINT_SUPPRESS_URL} ${LINT_SUPPRESS_FILE})
- list(APPEND LINT_ARGS "--suppress-errors=${LINT_SUPPRESS_FILE}")
-endif()
-
-foreach(lint_file ${LINT_FILES})
- file(RELATIVE_PATH lint_file "${LINT_PREFIX}" "${lint_file}")
- list(APPEND LINT_ARGS "${lint_file}")
-endforeach()
-
-execute_process(
- COMMAND ${LINT_PRG} ${LINT_ARGS}
- RESULT_VARIABLE res
- WORKING_DIRECTORY "${LINT_PREFIX}")
-
-file(REMOVE ${LINT_SUPPRESS_FILE})
-
-if(NOT res EQUAL 0)
- message(FATAL_ERROR "Linting failed: ${res}.")
-endif()