chore: update .clang-format configuration

- Disallow short `if` statements on a single line by setting `AllowShortIfStatementsOnASingleLine` to `Never`.
- Enable insertion of braces for control statements with `InsertBraces`.
This commit is contained in:
Kieran Kihn
2025-11-23 14:58:55 +08:00
parent 09f252e443
commit 6c50c600bf

View File

@@ -48,7 +48,7 @@ AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Empty
# 允许短的if语句保持在同一行
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortIfStatementsOnASingleLine: Never
# 允许短的循环保持在同一行
AllowShortLoopsOnASingleLine: true
@@ -199,4 +199,6 @@ Standard: Latest
TabWidth: 4
# 使用tab字符: Never, ForIndentation, ForContinuationAndIndentation, Always
UseTab: Never
UseTab: Never
InsertBraces: true