fix(build): also check os_win sources with uncrustify in CI

This commit is contained in:
bfredl
2025-08-14 10:36:08 +02:00
parent 38986188ba
commit c26f989b2f
4 changed files with 11 additions and 8 deletions

View File

@@ -416,6 +416,8 @@ endforeach()
list(SORT NVIM_SOURCES) list(SORT NVIM_SOURCES)
list(SORT NVIM_HEADERS) list(SORT NVIM_HEADERS)
list(APPEND UNCRUSTIFY_NVIM_SOURCES ${NVIM_SOURCES} ${NVIM_HEADERS})
foreach(sfile ${NVIM_SOURCES}) foreach(sfile ${NVIM_SOURCES})
get_filename_component(f ${sfile} NAME) get_filename_component(f ${sfile} NAME)
if(WIN32 AND ${f} MATCHES "^(pty_proc_unix.c)$") if(WIN32 AND ${f} MATCHES "^(pty_proc_unix.c)$")
@@ -901,13 +903,13 @@ add_glob_target(
TARGET lintc-uncrustify TARGET lintc-uncrustify
COMMAND ${UNCRUSTIFY_PRG} COMMAND ${UNCRUSTIFY_PRG}
FLAGS -c ${UNCRUSTIFY_CONFIG} -q --check FLAGS -c ${UNCRUSTIFY_CONFIG} -q --check
FILES ${NVIM_SOURCES} ${NVIM_HEADERS}) FILES ${UNCRUSTIFY_NVIM_SOURCES})
add_glob_target( add_glob_target(
TARGET formatc TARGET formatc
COMMAND ${UNCRUSTIFY_PRG} COMMAND ${UNCRUSTIFY_PRG}
FLAGS -c ${UNCRUSTIFY_CONFIG} --replace --no-backup FLAGS -c ${UNCRUSTIFY_CONFIG} --replace --no-backup
FILES ${NVIM_SOURCES} ${NVIM_HEADERS}) FILES ${UNCRUSTIFY_NVIM_SOURCES})
# TODO(bfredl): there is a bug in "uncrustify --update-config-with-doc" which breaks # TODO(bfredl): there is a bug in "uncrustify --update-config-with-doc" which breaks
# our config (backslash escape in strings). Once fixed these two lines should be deleted # our config (backslash escape in strings). Once fixed these two lines should be deleted

View File

@@ -57,7 +57,8 @@ void os_replace_stdout_and_stderr_to_conout(void)
} }
/// Resets Windows console icon if we got an original one on startup. /// Resets Windows console icon if we got an original one on startup.
void os_icon_reset(void) { void os_icon_reset(void)
{
if (hWnd == NULL) { if (hWnd == NULL) {
return; return;
} }

View File

@@ -143,8 +143,8 @@ finished:
return conpty_object; return conpty_object;
} }
bool os_conpty_spawn(conpty_t *conpty_object, HANDLE *proc_handle, wchar_t *name, bool os_conpty_spawn(conpty_t *conpty_object, HANDLE *proc_handle, wchar_t *name, wchar_t *cmd_line,
wchar_t *cmd_line, wchar_t *cwd, wchar_t *env) wchar_t *cwd, wchar_t *env)
{ {
PROCESS_INFORMATION pi = { 0 }; PROCESS_INFORMATION pi = { 0 };
if (!CreateProcessW(name, if (!CreateProcessW(name,