mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
build: use stylua with add_glob_target
stylua version 0.19.0 has added the flag `--respect-ignores` which
unbreaks stylua when used with add_glob_target.
See eecddd2416
for more context.
This commit is contained in:
parent
448907f65d
commit
2a57613b9b
@ -1,7 +1,7 @@
|
|||||||
|
/build
|
||||||
|
/runtime/lua/coxpcall.lua
|
||||||
|
/runtime/lua/vim/_meta
|
||||||
|
/runtime/lua/vim/re.lua
|
||||||
/scripts
|
/scripts
|
||||||
/src
|
/src
|
||||||
/test
|
/test
|
||||||
/build
|
|
||||||
/runtime/lua/vim/re.lua
|
|
||||||
/runtime/lua/vim/_meta/options.lua
|
|
||||||
/runtime/lua/coxpcall.lua
|
|
||||||
|
@ -225,11 +225,16 @@ add_glob_target(
|
|||||||
TOUCH_STRATEGY SINGLE)
|
TOUCH_STRATEGY SINGLE)
|
||||||
add_dependencies(lintlua-luacheck lua-dev-deps)
|
add_dependencies(lintlua-luacheck lua-dev-deps)
|
||||||
|
|
||||||
# Don't use add_glob_target as .styluaignore won't be respected.
|
add_glob_target(
|
||||||
# https://github.com/JohnnyMorganz/StyLua/issues/751
|
TARGET lintlua-stylua
|
||||||
add_custom_target(lintlua-stylua
|
COMMAND ${STYLUA_PRG}
|
||||||
COMMAND ${STYLUA_PRG} --color=always --check .
|
FLAGS --color=always --check --respect-ignores
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
|
GLOB_DIRS runtime/
|
||||||
|
GLOB_PAT *.lua
|
||||||
|
EXCLUDE
|
||||||
|
/runtime/lua/vim/_meta
|
||||||
|
TOUCH_STRATEGY SINGLE)
|
||||||
|
|
||||||
add_custom_target(lintlua)
|
add_custom_target(lintlua)
|
||||||
add_dependencies(lintlua lintlua-luacheck lintlua-stylua)
|
add_dependencies(lintlua lintlua-luacheck lintlua-stylua)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user