From 18eb8a07ba39a8aad1c75521cee027b9c9c72e40 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 1 Feb 2026 00:58:20 +0100 Subject: clang-format --- .clang-format | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) (limited to '.clang-format') 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 -- cgit v1.2.3