mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
ci: Use error suppression in place of ignored files list. #3185
Fixes #3174
This commit is contained in:
parent
2bce7c9bae
commit
57eaefbb23
4
Makefile
4
Makefile
@ -7,6 +7,8 @@ filter-true = $(strip $(filter-out 1 on ON true TRUE,$1))
|
||||
CMAKE_BUILD_TYPE ?= Debug
|
||||
|
||||
CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)
|
||||
DOC_DOWNLOAD_URL_BASE := https://raw.githubusercontent.com/neovim/doc/gh-pages
|
||||
CLINT_ERRORS_FILE_PATH := /reports/clint/errors.json
|
||||
|
||||
BUILD_TYPE ?= $(shell (type ninja > /dev/null 2>&1 && echo "Ninja") || \
|
||||
echo "Unix Makefiles")
|
||||
@ -105,7 +107,7 @@ install: | nvim
|
||||
lint:
|
||||
cmake -DLINT_PRG=./clint.py \
|
||||
-DLINT_DIR=src \
|
||||
-DLINT_IGNORE_FILE=clint-ignored-files.txt \
|
||||
-DLINT_SUPPRESS_URL="$(DOC_DOWNLOAD_URL_BASE)$(CLINT_ERRORS_FILE_PATH)" \
|
||||
-P cmake/RunLint.cmake
|
||||
|
||||
.PHONY: test functionaltest unittest lint clean distclean nvim libnvim cmake deps install
|
||||
|
@ -1,124 +0,0 @@
|
||||
src/nvim/ascii.h
|
||||
src/nvim/assert.h
|
||||
src/nvim/buffer.c
|
||||
src/nvim/buffer.h
|
||||
src/nvim/buffer_defs.h
|
||||
src/nvim/charset.c
|
||||
src/nvim/charset.h
|
||||
src/nvim/diff.c
|
||||
src/nvim/diff.h
|
||||
src/nvim/digraph.c
|
||||
src/nvim/digraph.h
|
||||
src/nvim/edit.c
|
||||
src/nvim/edit.h
|
||||
src/nvim/eval.c
|
||||
src/nvim/eval.h
|
||||
src/nvim/eval_defs.h
|
||||
src/nvim/ex_cmds.c
|
||||
src/nvim/ex_cmds.h
|
||||
src/nvim/ex_cmds.lua
|
||||
src/nvim/ex_cmds2.c
|
||||
src/nvim/ex_cmds2.h
|
||||
src/nvim/ex_cmds_defs.h
|
||||
src/nvim/ex_docmd.c
|
||||
src/nvim/ex_docmd.h
|
||||
src/nvim/ex_eval.c
|
||||
src/nvim/ex_eval.h
|
||||
src/nvim/ex_getln.c
|
||||
src/nvim/ex_getln.h
|
||||
src/nvim/farsi.c
|
||||
src/nvim/farsi.h
|
||||
src/nvim/file_search.c
|
||||
src/nvim/file_search.h
|
||||
src/nvim/fileio.c
|
||||
src/nvim/fileio.h
|
||||
src/nvim/fold.c
|
||||
src/nvim/fold.h
|
||||
src/nvim/func_attr.h
|
||||
src/nvim/garray.c
|
||||
src/nvim/garray.h
|
||||
src/nvim/getchar.c
|
||||
src/nvim/getchar.h
|
||||
src/nvim/globals.h
|
||||
src/nvim/hardcopy.c
|
||||
src/nvim/hardcopy.h
|
||||
src/nvim/iconv.h
|
||||
src/nvim/if_cscope.c
|
||||
src/nvim/if_cscope.h
|
||||
src/nvim/if_cscope_defs.h
|
||||
src/nvim/indent_c.c
|
||||
src/nvim/indent_c.h
|
||||
src/nvim/keymap.c
|
||||
src/nvim/keymap.h
|
||||
src/nvim/lib/khash.h
|
||||
src/nvim/lib/klist.h
|
||||
src/nvim/lib/kvec.h
|
||||
src/nvim/lib/queue.h
|
||||
src/nvim/macros.h
|
||||
src/nvim/main.c
|
||||
src/nvim/main.h
|
||||
src/nvim/mark.c
|
||||
src/nvim/mark.h
|
||||
src/nvim/mark_defs.h
|
||||
src/nvim/mbyte.c
|
||||
src/nvim/mbyte.h
|
||||
src/nvim/memline.c
|
||||
src/nvim/memline.h
|
||||
src/nvim/memline_defs.h
|
||||
src/nvim/memory.c
|
||||
src/nvim/memory.h
|
||||
src/nvim/menu.c
|
||||
src/nvim/menu.h
|
||||
src/nvim/message.c
|
||||
src/nvim/message.h
|
||||
src/nvim/misc1.c
|
||||
src/nvim/misc1.h
|
||||
src/nvim/misc2.c
|
||||
src/nvim/misc2.h
|
||||
src/nvim/move.c
|
||||
src/nvim/move.h
|
||||
src/nvim/normal.c
|
||||
src/nvim/normal.h
|
||||
src/nvim/ops.c
|
||||
src/nvim/ops.h
|
||||
src/nvim/option.c
|
||||
src/nvim/option.h
|
||||
src/nvim/option_defs.h
|
||||
src/nvim/os_unix.c
|
||||
src/nvim/os_unix.h
|
||||
src/nvim/path.c
|
||||
src/nvim/path.h
|
||||
src/nvim/po/sjiscorr.c
|
||||
src/nvim/popupmnu.c
|
||||
src/nvim/popupmnu.h
|
||||
src/nvim/pos.h
|
||||
src/nvim/quickfix.c
|
||||
src/nvim/quickfix.h
|
||||
src/nvim/regexp.c
|
||||
src/nvim/regexp.h
|
||||
src/nvim/regexp_defs.h
|
||||
src/nvim/regexp_nfa.c
|
||||
src/nvim/screen.c
|
||||
src/nvim/screen.h
|
||||
src/nvim/search.c
|
||||
src/nvim/search.h
|
||||
src/nvim/sign_defs.h
|
||||
src/nvim/spell.c
|
||||
src/nvim/spell.h
|
||||
src/nvim/strings.c
|
||||
src/nvim/strings.h
|
||||
src/nvim/syntax.c
|
||||
src/nvim/syntax.h
|
||||
src/nvim/syntax_defs.h
|
||||
src/nvim/tag.c
|
||||
src/nvim/tag.h
|
||||
src/nvim/ui.c
|
||||
src/nvim/ui.h
|
||||
src/nvim/undo.c
|
||||
src/nvim/undo.h
|
||||
src/nvim/undo_defs.h
|
||||
src/nvim/version.c
|
||||
src/nvim/version.h
|
||||
src/nvim/vim.h
|
||||
src/nvim/window.c
|
||||
src/nvim/window.h
|
@ -1,18 +1,27 @@
|
||||
get_filename_component(LINT_DIR ${LINT_DIR} ABSOLUTE)
|
||||
get_filename_component(LINT_PREFIX ${LINT_DIR} PATH)
|
||||
set(LINT_SUPPRESS_FILE "${LINT_PREFIX}/errors.json")
|
||||
|
||||
file(GLOB_RECURSE LINT_FILES ${LINT_DIR}/*.c ${LINT_DIR}/*.h)
|
||||
|
||||
if(LINT_IGNORE_FILE)
|
||||
file(READ ${LINT_IGNORE_FILE} LINT_IGNORED_FILES)
|
||||
string(REPLACE "\n" ";" LINT_IGNORED_FILES ${LINT_IGNORED_FILES})
|
||||
foreach(ignore_file ${LINT_IGNORED_FILES})
|
||||
list(REMOVE_ITEM LINT_FILES "${LINT_PREFIX}/${ignore_file}")
|
||||
endforeach()
|
||||
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_FILES}
|
||||
RESULT_VARIABLE res)
|
||||
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}.")
|
||||
|
Loading…
Reference in New Issue
Block a user