[FEAT] Update indent settings and add a clang-format file

This commit is contained in:
NADAL Jean-Baptiste
2024-02-01 12:27:39 +01:00
parent ec96114111
commit 3c5bf7e52a
17 changed files with 262 additions and 147 deletions

32
.clang-format Normal file
View File

@@ -0,0 +1,32 @@
---
# We'll use defaults from the LLVM style, but with 4 columns indentation.
BasedOnStyle: LLVM
IndentWidth: 4
# use \n instead of \r\n
UseCRLF: true
# spaces, not tabs!
UseTab: Never
---
Language: Cpp
Standard: c++17
AccessModifierOffset: -4
# Force pointers to the type for C++.
DerivePointerAlignment: false
PointerAlignment: Left
# Use 100 columns
ColumnLimit: 100
AlignConsecutiveStyle: Consecutive
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AlwaysBreakAfterReturnType: None
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
SplitEmptyFunction: true
BreakBeforeBraces: Allman
SeparateDefinitionBlocks: Always
NamespaceIndentation: All
IndentAccessModifiers: false
ReferenceAlignment: Right
BreakConstructorInitializers: AfterColon
...