From 6c50c600bfbe26e497fd6ebd6fc48b40cdc9f84a Mon Sep 17 00:00:00 2001 From: Kieran Kihn <114803508+kierankihn@users.noreply.github.com> Date: Sun, 23 Nov 2025 14:58:55 +0800 Subject: [PATCH] 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`. --- .clang-format | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.clang-format b/.clang-format index 2f9e67f..3118ae1 100644 --- a/.clang-format +++ b/.clang-format @@ -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 \ No newline at end of file +UseTab: Never + +InsertBraces: true \ No newline at end of file