Use SwiftFormat version 0.49.x and enable some new rules (#527)

This commit is contained in:
Danny Moesch 2021-12-28 02:57:11 +01:00 committed by GitHub
parent b62c5fa2e5
commit cdedff0d4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 139 additions and 126 deletions

View file

@ -10,12 +10,16 @@
## Enabled rules
--rules \
acronyms, \
andOperator, \
anyObjectProtocol, \
assertionFailures, \
blankLinesAroundMark, \
blankLinesAtEndOfScope, \
blankLinesAtStartOfScope, \
# blankLinesBetweenImports, \
blankLinesBetweenScopes, \
blockComments, \
braces, \
consecutiveBlankLines, \
consecutiveSpaces, \
@ -36,9 +40,11 @@
# markTypes, \
numberFormatting, \
# organizeDeclarations, \
preferDouble, \
preferKeyPath, \
redundantBackticks, \
redundantBreak, \
redundantClosure, \
redundantExtensionACL, \
redundantFileprivate, \
redundantGet, \
@ -81,6 +87,7 @@
wrap, \
wrapArguments, \
wrapAttributes, \
wrapConditionalBodies, \
# wrapEnumCases, \
# wrapMultilineStatementBraces, \
# wrapSwitchCases, \
@ -88,6 +95,10 @@
## Formatting options
### Acronyms to auto-capitalize. Defaults to "ID,URL,UUID".
--acronyms "GPG, HTTP, HTTPS, ID, PGP, SSH, URI, URL, UUID"
### Use allman indentation style: "true" or "false" (default)
--allman false
@ -272,6 +283,14 @@
--wrapreturntype preserve
### Wrap ternary operators: "default", "before-operators"
--wrapternary before-operators
### Wrap typealiases: "before-first", "after-first", "preserve"
--wraptypealiases preserve
### Xcode indent guard/enum: "enabled" or "disabled" (default)
--xcodeindentation disabled