From 6d57bb89c1ee376b60198f4a4b75430905844138 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 9 Jun 2022 17:09:24 +0200 Subject: build: add a cmake target for all used linters #18543 * build: move the logic for linters to cmake Cmake is our source of truth. We should have as much of our build process there as possible so everyone can make use of it. * build: remove redundant check for ninja generator The minimum cmake version as of writing this is 3.10, which has ninja support. --- src/nvim/CMakeLists.txt | 4 ++-- src/nvim/diff.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/nvim') diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index da74b4dc9d..c902ff6c50 100755 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -800,10 +800,10 @@ foreach(sfile ${LINT_NVIM_SOURCES}) list(APPEND LINT_TARGETS ${touch_file}) list(APPEND LINT_NVIM_REL_SOURCES ${rsfile}) endforeach() -add_custom_target(clint DEPENDS ${LINT_TARGETS}) +add_custom_target(lintc DEPENDS ${LINT_TARGETS}) add_custom_target( - clint-full + lintcfull COMMAND ${LINT_PRG} --suppress-errors=${LINT_SUPPRESS_FILE} ${LINT_NVIM_REL_SOURCES} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 8c98c1ef23..1625632842 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -2307,6 +2307,7 @@ bool diff_find_change(win_T *wp, linenr_T lnum, int *startp, int *endp) if ((dp == NULL) || (diff_check_sanity(curtab, dp) == FAIL)) { xfree(line_org); + return false; } -- cgit