Use SwiftFormat version 0.49.x and enable some new rules (#527)
This commit is contained in:
parent
b62c5fa2e5
commit
cdedff0d4d
32 changed files with 139 additions and 126 deletions
19
.swiftformat
19
.swiftformat
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue