ClangFormat // Update configuration for SwiftUI.

This commit is contained in:
ShikiSuen 2022-04-11 17:03:00 +08:00
parent 979e0aaa9a
commit 9e072bc47e
2 changed files with 6 additions and 3 deletions

View File

@ -21,7 +21,7 @@
"AmbiguousTrailingClosureOverload" : true, "AmbiguousTrailingClosureOverload" : true,
"BeginDocumentationCommentWithOneLineSummary" : false, "BeginDocumentationCommentWithOneLineSummary" : false,
"DoNotUseSemicolons" : true, "DoNotUseSemicolons" : true,
"DontRepeatTypeInStaticProperties" : true, "DontRepeatTypeInStaticProperties" : false,
"FileScopedDeclarationPrivacy" : true, "FileScopedDeclarationPrivacy" : true,
"FullyIndirectEnum" : true, "FullyIndirectEnum" : true,
"GroupNumericLiterals" : true, "GroupNumericLiterals" : true,
@ -39,7 +39,7 @@
"NoVoidReturnOnFunctionSignature" : true, "NoVoidReturnOnFunctionSignature" : true,
"OneCasePerLine" : true, "OneCasePerLine" : true,
"OneVariableDeclarationPerLine" : true, "OneVariableDeclarationPerLine" : true,
"OnlyOneTrailingClosureArgument" : true, "OnlyOneTrailingClosureArgument" : false,
"OrderedImports" : true, "OrderedImports" : true,
"ReturnVoidInsteadOfEmptyTuple" : true, "ReturnVoidInsteadOfEmptyTuple" : true,
"UseEarlyExits" : false, "UseEarlyExits" : false,
@ -47,7 +47,7 @@
"UseShorthandTypeNames" : true, "UseShorthandTypeNames" : true,
"UseSingleLinePropertyGetter" : true, "UseSingleLinePropertyGetter" : true,
"UseSynthesizedInitializer" : true, "UseSynthesizedInitializer" : true,
"UseTripleSlashForDocumentationComments" : true, "UseTripleSlashForDocumentationComments" : false,
"UseWhereClausesInForLoops" : false, "UseWhereClausesInForLoops" : false,
"ValidateDocumentationComments" : false "ValidateDocumentationComments" : false
}, },

View File

@ -86,6 +86,9 @@
- `"lineLength" : 120,` - `"lineLength" : 120,`
- `"NoBlockComments" : false,` - `"NoBlockComments" : false,`
- `"tabWidth" : 4,` - `"tabWidth" : 4,`
- `"OnlyOneTrailingClosureArgument" : false,` // SwiftUI 相容
- `"UseTripleSlashForDocumentationComments" : false,`
- `"DontRepeatTypeInStaticProperties" : false,`
- (Obj)C(++) 系語言:使用 clang-format 命令、且採 Microsoft 行文規範。該規範以四個西文半形空格為行縮進單位。 - (Obj)C(++) 系語言:使用 clang-format 命令、且採 Microsoft 行文規範。該規範以四個西文半形空格為行縮進單位。
## 特殊勸告 ## 特殊勸告