Commit 5c1597ca authored by Björn Linse's avatar Björn Linse

cmake: allow linting a specific file

For instance to only lint "edit.c"
make lint LINT_FILE="src/nvim/edit.c"
parent 8160e875
......@@ -2,7 +2,11 @@ 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(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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment