mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
build(lint): set some linters as non-fatal #19018
luacheck and clint are the most important, and they are bundled. The others are nice-to-have, and not always available (and not bundled), so make them optional. This allows the "lint" target to function as a convenient and low-hassle handle for contributors. We still get the full power of lint in CI. TODO: bundle uncrustify (and then set it as required for "lint")?
This commit is contained in:
parent
ff6b8f5435
commit
605631ac29
@ -625,11 +625,11 @@ if(STYLUA_PRG)
|
|||||||
else()
|
else()
|
||||||
add_custom_command(OUTPUT lintlua-cmd APPEND COMMAND ${CMAKE_COMMAND} -E echo "STYLUA_PRG not found")
|
add_custom_command(OUTPUT lintlua-cmd APPEND COMMAND ${CMAKE_COMMAND} -E echo "STYLUA_PRG not found")
|
||||||
endif()
|
endif()
|
||||||
def_cmd_target(lintpy ${FLAKE8_PRG} FLAKE8_PRG true)
|
def_cmd_target(lintpy ${FLAKE8_PRG} FLAKE8_PRG false)
|
||||||
if(FLAKE8_PRG)
|
if(FLAKE8_PRG)
|
||||||
add_custom_command(OUTPUT lintpy-cmd APPEND COMMAND ${FLAKE8_PRG} contrib/ scripts/ src/ test/)
|
add_custom_command(OUTPUT lintpy-cmd APPEND COMMAND ${FLAKE8_PRG} contrib/ scripts/ src/ test/)
|
||||||
endif()
|
endif()
|
||||||
def_cmd_target(lintsh ${SHELLCHECK_PRG} SHELLCHECK_PRG true)
|
def_cmd_target(lintsh ${SHELLCHECK_PRG} SHELLCHECK_PRG false)
|
||||||
if(SHELLCHECK_PRG)
|
if(SHELLCHECK_PRG)
|
||||||
add_custom_command(OUTPUT lintsh-cmd APPEND COMMAND ${SHELLCHECK_PRG} scripts/vim-patch.sh)
|
add_custom_command(OUTPUT lintsh-cmd APPEND COMMAND ${SHELLCHECK_PRG} scripts/vim-patch.sh)
|
||||||
endif()
|
endif()
|
||||||
|
@ -803,7 +803,7 @@ foreach(sfile ${LINT_NVIM_SOURCES})
|
|||||||
endforeach()
|
endforeach()
|
||||||
add_custom_target(lintc DEPENDS ${LINT_TARGETS})
|
add_custom_target(lintc DEPENDS ${LINT_TARGETS})
|
||||||
|
|
||||||
def_cmd_target(lintuncrustify ${UNCRUSTIFY_PRG} UNCRUSTIFY_PRG false) # Non-fatal so that "lintc" target can depend on it.
|
def_cmd_target(lintuncrustify ${UNCRUSTIFY_PRG} UNCRUSTIFY_PRG false)
|
||||||
if(UNCRUSTIFY_PRG)
|
if(UNCRUSTIFY_PRG)
|
||||||
add_custom_command(OUTPUT lintuncrustify-cmd APPEND
|
add_custom_command(OUTPUT lintuncrustify-cmd APPEND
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
Loading…
Reference in New Issue
Block a user