From a0f0a71766decdefe2e739c7e484a19157e20967 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 11 Apr 2022 17:03:00 +0800 Subject: [PATCH] ClangFormat // Update configuration for SwiftUI. --- .clang-format-swift.json | 6 +++--- README.md | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.clang-format-swift.json b/.clang-format-swift.json index 7c9dc985..2ebfa011 100644 --- a/.clang-format-swift.json +++ b/.clang-format-swift.json @@ -21,7 +21,7 @@ "AmbiguousTrailingClosureOverload" : true, "BeginDocumentationCommentWithOneLineSummary" : false, "DoNotUseSemicolons" : true, - "DontRepeatTypeInStaticProperties" : true, + "DontRepeatTypeInStaticProperties" : false, "FileScopedDeclarationPrivacy" : true, "FullyIndirectEnum" : true, "GroupNumericLiterals" : true, @@ -39,7 +39,7 @@ "NoVoidReturnOnFunctionSignature" : true, "OneCasePerLine" : true, "OneVariableDeclarationPerLine" : true, - "OnlyOneTrailingClosureArgument" : true, + "OnlyOneTrailingClosureArgument" : false, "OrderedImports" : true, "ReturnVoidInsteadOfEmptyTuple" : true, "UseEarlyExits" : false, @@ -47,7 +47,7 @@ "UseShorthandTypeNames" : true, "UseSingleLinePropertyGetter" : true, "UseSynthesizedInitializer" : true, - "UseTripleSlashForDocumentationComments" : true, + "UseTripleSlashForDocumentationComments" : false, "UseWhereClausesInForLoops" : false, "ValidateDocumentationComments" : false }, diff --git a/README.md b/README.md index 5b1b6fd3..d3ab59d0 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,9 @@ - `"lineLength" : 120,` - `"NoBlockComments" : false,` - `"tabWidth" : 4,` + - `"OnlyOneTrailingClosureArgument" : false,` // SwiftUI 相容 + - `"UseTripleSlashForDocumentationComments" : false,` + - `"DontRepeatTypeInStaticProperties" : false,` - (Obj)C(++) 系語言:使用 clang-format 命令、且採 Microsoft 行文規範。該規範以四個西文半形空格為行縮進單位。 ## 特殊勸告