build: exclude tui/terminfo_defs.h from lintc-clint (#21822)

clint takes around 5-10 seconds to lint tui/terminfo_defs.h. For CI this
is negligible, but it's annoying for local development as touching
terminfo_defs.h will skyrocket lint times. Furthermore, we have no
reason to touch or modify terminfo_defs.h as it's a generated file, so
linting it shouldn't be necessary. This should speed up "make lint" by
the same amount, so around 5-10 seconds.
This commit is contained in:
dundargoc 2023-01-15 19:30:17 +01:00 committed by GitHub
parent c752c85363
commit 69c71c4ab4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -79,12 +79,13 @@ function(add_glob_target)
file(TO_CMAKE_PATH "${f}" f) file(TO_CMAKE_PATH "${f}" f)
list(APPEND globfiles ${f}) list(APPEND globfiles ${f})
endforeach() endforeach()
foreach(exclude_pattern ${ARG_EXCLUDE})
list(FILTER globfiles EXCLUDE REGEX ${exclude_pattern})
endforeach()
list(APPEND ARG_FILES ${globfiles}) list(APPEND ARG_FILES ${globfiles})
endforeach() endforeach()
foreach(exclude_pattern ${ARG_EXCLUDE})
list(FILTER ARG_FILES EXCLUDE REGEX ${exclude_pattern})
endforeach()
if(NOT ARG_TOUCH_STRATEGY) if(NOT ARG_TOUCH_STRATEGY)
set(ARG_TOUCH_STRATEGY PER_FILE) set(ARG_TOUCH_STRATEGY PER_FILE)
endif() endif()

View File

@ -977,7 +977,9 @@ add_glob_target(
TARGET lintc-clint TARGET lintc-clint
COMMAND ${PROJECT_SOURCE_DIR}/src/clint.py COMMAND ${PROJECT_SOURCE_DIR}/src/clint.py
FLAGS --output=${LINT_OUTPUT_FORMAT} FLAGS --output=${LINT_OUTPUT_FORMAT}
FILES ${LINT_NVIM_SOURCES}) FILES ${LINT_NVIM_SOURCES}
EXCLUDE
tui/terminfo_defs.h)
add_custom_target(uncrustify-version add_custom_target(uncrustify-version
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}