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
BinPackArguments: false
BinPackLongBracedList: false
BinPackParameters: OnePerLine
# BinPackLongBracedList: false
# BinPackParameters: OnePerLine
BinPackParameters: true
AllowAllArgumentsOnNextLine: 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)
check:
clang-format --dry-run --Werror -style=file:.clang-format.github src/*
$(target): $(sources:%.c=$(obj_dir)/%.o)
$(LD) -o $@ $(CFLAGS) $(LDFLAGS) $^
@ -47,6 +44,12 @@ $(obj_dir)/%.o: %.c
@mkdir -p $(dir $@)
$(CC) $< -c -o $@ -MMD -MP $(CFLAGS)
format:
clang-format -style=file -i src/*
check:
clang-format --dry-run --Werror -style=file src/*
clean:
rm -rf $(build_dir)

View File

@ -14,14 +14,9 @@ int print_out_key(
return MHD_YES;
}
int answer_to_connection(void* cls,
struct MHD_Connection* connection,
const char* url,
const char* method,
const char* version,
const char* upload_data,
size_t* upload_data_size,
void** req_cls)
int answer_to_connection(void* cls, struct MHD_Connection* connection,
const char* url, 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>";
struct MHD_Response* response;