mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
build: add formatting targets for c and lua files (#19488)
The targets will only format files that have been changed in current branch compared to the master branch. This includes unstaged, staged and committed files. Add following make and cmake targets: formatc - format changed c files formatlua - format changed lua files format - run formatc and formatlua Remove scripts/uncrustify.sh as this deprecates it.
This commit is contained in:
@@ -778,9 +778,16 @@ add_glob_targets(
|
||||
FLAGS -c "${PROJECT_SOURCE_DIR}/src/uncrustify.cfg" -q --check
|
||||
FILES ${LINT_NVIM_SOURCES}
|
||||
)
|
||||
|
||||
add_dependencies(lintuncrustify uncrustify-version)
|
||||
|
||||
add_custom_target(formatc
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-D FORMAT_PRG=${UNCRUSTIFY_PRG}
|
||||
-D LANG=c
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/Format.cmake
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
|
||||
add_dependencies(formatc uncrustify-version)
|
||||
|
||||
add_custom_target(
|
||||
lintcfull
|
||||
COMMAND
|
||||
|
Reference in New Issue
Block a user