diff --git a/backend/.clang-format b/backend/.clang-format index 859ab4c..d04a59a 100644 --- a/backend/.clang-format +++ b/backend/.clang-format @@ -7,8 +7,9 @@ InsertNewlineAtEOF: true AllowShortFunctionsOnASingleLine: None BinPackArguments: false -BinPackLongBracedList: false -BinPackParameters: OnePerLine +# BinPackLongBracedList: false +# BinPackParameters: OnePerLine +BinPackParameters: true AllowAllArgumentsOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true diff --git a/backend/.clang-format.github b/backend/.clang-format.github deleted file mode 100644 index 6617ad7..0000000 --- a/backend/.clang-format.github +++ /dev/null @@ -1,15 +0,0 @@ -BasedOnStyle: WebKit -IndentWidth: 4 -ColumnLimit: 80 - -IndentCaseLabels: true -InsertNewlineAtEOF: true -AllowShortFunctionsOnASingleLine: None - -BinPackArguments: false - -BinPackParameters: true - -AllowAllArgumentsOnNextLine: true -AllowAllParametersOfDeclarationOnNextLine: true - diff --git a/backend/Makefile b/backend/Makefile index e60401b..1fd463c 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -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) diff --git a/backend/src/main.c b/backend/src/main.c index 2501ff5..7ec81ef 100644 --- a/backend/src/main.c +++ b/backend/src/main.c @@ -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 = "Hello, browser!"; struct MHD_Response* response;