fix format check

This commit is contained in:
SimonFJ20 2026-03-20 13:42:31 +01:00
parent d983d74bfa
commit 4584d99d4d
4 changed files with 12 additions and 28 deletions

View File

@ -7,8 +7,9 @@ InsertNewlineAtEOF: true
AllowShortFunctionsOnASingleLine: None AllowShortFunctionsOnASingleLine: None
BinPackArguments: false BinPackArguments: false
BinPackLongBracedList: false # BinPackLongBracedList: false
BinPackParameters: OnePerLine # BinPackParameters: OnePerLine
BinPackParameters: true
AllowAllArgumentsOnNextLine: true AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true

View File

@ -1,15 +0,0 @@
BasedOnStyle: WebKit
IndentWidth: 4
ColumnLimit: 80
IndentCaseLabels: true
InsertNewlineAtEOF: true
AllowShortFunctionsOnASingleLine: None
BinPackArguments: false
BinPackParameters: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true

View File

@ -37,9 +37,6 @@ target=$(build_dir)/backend
all: $(target) all: $(target)
check:
clang-format --dry-run --Werror -style=file:.clang-format.github src/*
$(target): $(sources:%.c=$(obj_dir)/%.o) $(target): $(sources:%.c=$(obj_dir)/%.o)
$(LD) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LD) -o $@ $(CFLAGS) $(LDFLAGS) $^
@ -47,6 +44,12 @@ $(obj_dir)/%.o: %.c
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
$(CC) $< -c -o $@ -MMD -MP $(CFLAGS) $(CC) $< -c -o $@ -MMD -MP $(CFLAGS)
format:
clang-format -style=file -i src/*
check:
clang-format --dry-run --Werror -style=file src/*
clean: clean:
rm -rf $(build_dir) rm -rf $(build_dir)

View File

@ -14,14 +14,9 @@ int print_out_key(
return MHD_YES; return MHD_YES;
} }
int answer_to_connection(void* cls, int answer_to_connection(void* cls, struct MHD_Connection* connection,
struct MHD_Connection* connection, const char* url, const char* method, const char* version,
const char* url, const char* upload_data, size_t* upload_data_size, void** req_cls)
const char* method,
const char* version,
const char* upload_data,
size_t* upload_data_size,
void** req_cls)
{ {
const char* page = "<html><body>Hello, browser!</body></html>"; const char* page = "<html><body>Hello, browser!</body></html>";
struct MHD_Response* response; struct MHD_Response* response;