From d983d74bfa1d4f8ff81ac01a54893943dd5a6c3d Mon Sep 17 00:00:00 2001 From: SimonFJ20 Date: Fri, 20 Mar 2026 13:39:49 +0100 Subject: [PATCH] another clang-format for github --- backend/.clang-format | 5 +---- backend/.clang-format.github | 15 +++++++++++++++ backend/Makefile | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 backend/.clang-format.github diff --git a/backend/.clang-format b/backend/.clang-format index 56e56b4..859ab4c 100644 --- a/backend/.clang-format +++ b/backend/.clang-format @@ -8,10 +8,7 @@ AllowShortFunctionsOnASingleLine: None BinPackArguments: false BinPackLongBracedList: false - -# replace this when when github actions/ubuntu has a new enough LLVM version -# BinPackParameters: OnePerLine -BinPackParameters: true +BinPackParameters: OnePerLine AllowAllArgumentsOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true diff --git a/backend/.clang-format.github b/backend/.clang-format.github new file mode 100644 index 0000000..6617ad7 --- /dev/null +++ b/backend/.clang-format.github @@ -0,0 +1,15 @@ +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 3b13c04..e60401b 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -38,7 +38,7 @@ target=$(build_dir)/backend all: $(target) check: - clang-format --dry-run --Werror src/* + clang-format --dry-run --Werror -style=file:.clang-format.github src/* $(target): $(sources:%.c=$(obj_dir)/%.o) $(LD) -o $@ $(CFLAGS) $(LDFLAGS) $^