Merge pull request #35329 from bfredl/uncrustify_all

fix(build): also check os_win sources with uncrustify in CI
This commit is contained in:
bfredl
2025-08-15 11:06:42 +02:00
committed by GitHub
4 changed files with 11 additions and 8 deletions

View File

@@ -416,6 +416,8 @@ endforeach()
list(SORT NVIM_SOURCES)
list(SORT NVIM_HEADERS)
list(APPEND UNCRUSTIFY_NVIM_SOURCES ${NVIM_SOURCES} ${NVIM_HEADERS})
foreach(sfile ${NVIM_SOURCES})
get_filename_component(f ${sfile} NAME)
if(WIN32 AND ${f} MATCHES "^(pty_proc_unix.c)$")
@@ -901,13 +903,13 @@ add_glob_target(
TARGET lintc-uncrustify
COMMAND ${UNCRUSTIFY_PRG}
FLAGS -c ${UNCRUSTIFY_CONFIG} -q --check
FILES ${NVIM_SOURCES} ${NVIM_HEADERS})
FILES ${UNCRUSTIFY_NVIM_SOURCES})
add_glob_target(
TARGET formatc
COMMAND ${UNCRUSTIFY_PRG}
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
# our config (backslash escape in strings). Once fixed these two lines should be deleted

View File

@@ -7,7 +7,7 @@
#include "nvim/os/os.h"
#include "nvim/os/os_win_console.h"
# include "os/os_win_console.c.generated.h"
#include "os/os_win_console.c.generated.h"
static char origTitle[256] = { 0 };
static HWND hWnd = NULL;
@@ -27,7 +27,7 @@ int os_open_conin_fd(void)
return conin_fd;
}
void os_clear_hwnd(void)
void os_clear_hwnd(void)
{
hWnd = NULL;
}
@@ -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.
void os_icon_reset(void) {
void os_icon_reset(void)
{
if (hWnd == NULL) {
return;
}

View File

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

View File

@@ -12,7 +12,7 @@
#include "nvim/os/pty_conpty_win.h"
#include "nvim/os/pty_proc_win.h"
# include "os/pty_proc_win.c.generated.h"
#include "os/pty_proc_win.c.generated.h"
static void CALLBACK pty_proc_terminate_cb(void *context, BOOLEAN unused)
FUNC_ATTR_NONNULL_ALL