diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-01 00:58:20 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-01 01:13:53 +0100 |
| commit | 18eb8a07ba39a8aad1c75521cee027b9c9c72e40 (patch) | |
| tree | 87e498dbaffdd591eb94fddca315f6ba28756a32 /.clang-format | |
| parent | 03cd94817097e59a0809b222e0e1e74dd9a8ede7 (diff) | |
clang-format
Diffstat (limited to '.clang-format')
| -rw-r--r-- | .clang-format | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/.clang-format b/.clang-format index cb492a9..2529c27 100644 --- a/.clang-format +++ b/.clang-format @@ -4,16 +4,38 @@ BasedOnStyle: LLVM IndentWidth: 2 UseTab: Never ColumnLimit: 80 -AllowShortBlocksOnASingleLine: Always -AllowShortCaseLabelsOnASingleLine: true -AllowShortEnumsOnASingleLine: true -AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: Always + +# From CONTRIBUTING.md: "The keyword 'public', 'protected', 'private' should be intended 1 character less than the methods." +# IndentWidth is 2, so AccessModifierOffset -1 results in indentation of 1. +AccessModifierOffset: -1 + +# From CONTRIBUTING.md: "prefer const T* name to const T *name" +PointerAlignment: Left +DerivePointerAlignment: false + +# From CONTRIBUTING.md: "keep the code compact vertically... Use only one statement per line." +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortEnumsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: Never AllowShortLambdasOnASingleLine: All -AllowShortLoopsOnASingleLine: true -AllowShortNamespacesOnASingleLine: true +AllowShortLoopsOnASingleLine: false MaxEmptyLinesToKeep: 1 KeepEmptyLinesAtTheStartOfBlocks: false + +# From CONTRIBUTING.md: "put spaces around code and operators (cosmetics)" +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: false +SpacesInAngles: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false + +# Misc improvements AlwaysBreakBeforeMultilineStrings: true -FixNamespaceComments: false -... +FixNamespaceComments: true +SortIncludes: true +Standard: Latest
\ No newline at end of file |
