From e6ab5509b61fdb7c5120610c4d25888cee2487a3 Mon Sep 17 00:00:00 2001 From: Alejandro Cabeza Romero Date: Fri, 10 Apr 2026 17:23:58 +0200 Subject: [PATCH] Add prettifier. --- .clang-format | 26 ++++++++++++++++++++++++++ justfile | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 .clang-format create mode 100644 justfile diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..b2b9dca --- /dev/null +++ b/.clang-format @@ -0,0 +1,26 @@ +BasedOnStyle: LLVM + +IndentWidth: 4 +ColumnLimit: 120 + +IndentAccessModifiers: false +AccessModifierOffset: -4 + +AlignAfterOpenBracket: BlockIndent +BinPackParameters: false +BinPackArguments: false + +AllowAllParametersOfDeclarationOnNextLine: false +PenaltyBreakBeforeFirstCallParameter: 1 + +PointerAlignment: Left +ReferenceAlignment: Left + +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false + +BreakAfterReturnType: None +PenaltyReturnTypeOnItsOwnLine: 1000 + +NamespaceIndentation: All diff --git a/justfile b/justfile new file mode 100644 index 0000000..243fa19 --- /dev/null +++ b/justfile @@ -0,0 +1,2 @@ +prettify: + nix shell nixpkgs#clang-tools -c clang-format -i src/**.cpp src/**.hpp