mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
build: move lint target to cmake #19169
This will ensure less verbose output and faster linting.
This commit is contained in:
parent
2b1abe3c9d
commit
9b4d0137b8
@ -653,6 +653,15 @@ add_glob_targets(
|
||||
TOUCH_STRATEGY SINGLE
|
||||
)
|
||||
|
||||
add_custom_target(lintcommit
|
||||
COMMAND ${PROJECT_BINARY_DIR}/bin/nvim -u NONE -es -c [[lua require('scripts.lintcommit').main({trace=false})]]
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
VERBATIM)
|
||||
add_dependencies(lintcommit nvim)
|
||||
|
||||
add_custom_target(lint)
|
||||
add_dependencies(lint check-single-includes lintc lintlua lintpy lintsh lintcommit lintuncrustify)
|
||||
|
||||
install_helper(
|
||||
FILES ${CMAKE_SOURCE_DIR}/src/man/nvim.1
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
@ -775,3 +784,4 @@ add_custom_target(uninstall
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_subdirectory(cmake.packaging)
|
||||
endif()
|
||||
|
||||
|
13
Makefile
13
Makefile
@ -137,16 +137,9 @@ helphtml: | nvim build/runtime/doc/tags
|
||||
functionaltest functionaltest-lua unittest benchmark: | nvim
|
||||
$(BUILD_TOOL) -C build $@
|
||||
|
||||
lintlua lintsh lintpy lintuncrustify lintc lintcfull check-single-includes generated-sources: | build/.ran-cmake
|
||||
lintlua lintsh lintpy lintuncrustify lintc lintcfull check-single-includes generated-sources lintcommit lint: | build/.ran-cmake
|
||||
$(CMAKE_PRG) --build build --target $@
|
||||
|
||||
commitlint: | nvim
|
||||
$(NVIM_PRG) -u NONE -es +"lua require('scripts.lintcommit').main({trace=false})"
|
||||
|
||||
_opt_commitlint:
|
||||
@test -x build/bin/nvim && { $(MAKE) commitlint; exit $$?; } \
|
||||
|| echo "SKIP: commitlint (build/bin/nvim not found)"
|
||||
|
||||
test: functionaltest unittest
|
||||
|
||||
clean:
|
||||
@ -171,8 +164,6 @@ appimage:
|
||||
appimage-%:
|
||||
bash scripts/genappimage.sh $*
|
||||
|
||||
lint: check-single-includes lintc lintlua lintpy lintsh _opt_commitlint lintuncrustify
|
||||
|
||||
# Generic pattern rules, allowing for `make build/bin/nvim` etc.
|
||||
# Does not work with "Unix Makefiles".
|
||||
ifeq ($(CMAKE_GENERATOR),Ninja)
|
||||
@ -183,4 +174,4 @@ $(DEPS_BUILD_DIR)/%: phony_force
|
||||
$(BUILD_TOOL) -C $(DEPS_BUILD_DIR) $(patsubst $(DEPS_BUILD_DIR)/%,%,$@)
|
||||
endif
|
||||
|
||||
.PHONY: test lintlua lintpy lintsh functionaltest unittest lint lintc clean distclean nvim libnvim cmake deps install appimage checkprefix commitlint
|
||||
.PHONY: test lintlua lintpy lintsh functionaltest unittest lint lintc clean distclean nvim libnvim cmake deps install appimage checkprefix lintcommit
|
||||
|
Loading…
Reference in New Issue
Block a user