clang-format: Disable namespace indentation and omit {} in if/for/while

1. Disables namespace indentation in accordance with 16. of (*) and the
   majority of the codebase.
2. Disables {} for single-statement if/for/while in accordance with 17.
   of (*) and the majority of the codebase.

Note: clang-format is used manually and voluntarily, usually only on new
files. Nothing is automatically reformatted, this is only about how new
files look.

Motivated by https://github.com/ClickHouse/ClickHouse/pull/54115#discussion_r1322741846.

(*) https://clickhouse.com/docs/en/development/style#formatting
This commit is contained in:
Robert Schulze 2023-09-12 18:27:02 +00:00
parent 4d2223defe
commit 76c8f451ad
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A

View File

@ -79,7 +79,7 @@ IndentWidth: 4
IndentWrappedFunctionNames: false
MacroBlockBegin: ''
MacroBlockEnd: ''
NamespaceIndentation: Inner
NamespaceIndentation: None
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
@ -89,6 +89,7 @@ PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
RemoveBracesLLVM: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements