Created
February 10, 2025 17:00
-
-
Save T1T4N/4f61a5a68bd22bc0b294479eb325afe0 to your computer and use it in GitHub Desktop.
Default SwiftFormat v0.55.5 rules assembled from the official documentation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--swiftversion 5.9 | |
# Opt-in rule config | |
--disable all | |
# Explicitly disabled (opt-in) rules: | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#acronyms | |
--disable acronyms | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#blankLineAfterSwitchCase | |
--disable blankLineAfterSwitchCase | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#blankLinesBetweenImports | |
--disable blankLinesBetweenImports | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#blockComments | |
--disable blockComments | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#docComments | |
--disable docComments | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#isEmpty | |
--disable isEmpty | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#markTypes | |
--disable markTypes | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#noExplicitOwnership | |
--disable noExplicitOwnership | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#organizeDeclarations | |
--disable organizeDeclarations | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#propertyTypes | |
--disable propertyTypes | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantProperty | |
--disable redundantProperty | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#sortSwitchCases | |
--disable sortSwitchCases | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#unusedPrivateDeclarations | |
--disable unusedPrivateDeclarations | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapConditionalBodies | |
--disable wrapConditionalBodies | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapEnumCases | |
--disable wrapEnumCases | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapMultilineConditionalAssignment | |
--disable wrapMultilineConditionalAssignment | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapSwitchCases | |
--disable wrapSwitchCases | |
# Default rules with their default options: | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#andOperator | |
--enable andOperator | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#anyObjectProtocol | |
--enable anyObjectProtocol | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#applicationMain | |
--enable applicationMain | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#assertionFailures | |
--enable assertionFailures | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#blankLineAfterImports | |
--enable blankLineAfterImports | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#blankLinesAroundMark | |
--enable blankLinesAroundMark | |
--lineaftermarks true | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#blankLinesAtEndOfScope | |
--enable blankLinesAtEndOfScope | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#blankLinesAtStartOfScope | |
--enable blankLinesAtStartOfScope | |
--typeblanklines remove | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#blankLinesBetweenChainedFunctions | |
--enable blankLinesBetweenChainedFunctions | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#blankLinesBetweenScopes | |
--enable blankLinesBetweenScopes | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#braces | |
--enable braces | |
--allman false | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#conditionalAssignment | |
--enable conditionalAssignment | |
--condassignment after-property | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#consecutiveBlankLines | |
--enable consecutiveBlankLines | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#consecutiveSpaces | |
--enable consecutiveSpaces | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#consistentSwitchCaseSpacing | |
--enable consistentSwitchCaseSpacing | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#docCommentsBeforeModifiers | |
--enable docCommentsBeforeModifiers | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#duplicateImports | |
--enable duplicateImports | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#elseOnSameLine | |
--enable elseOnSameLine | |
--elseposition same-line | |
--guardelse auto | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#emptyBraces | |
--enable emptyBraces | |
--emptybraces no-space | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#enumNamespaces | |
--enable enumNamespaces | |
--enumnamespaces always | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#extensionAccessControl | |
--enable extensionAccessControl | |
--extensionacl on-extension | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#fileHeader | |
--enable fileHeader | |
--header ignore | |
--dateformat system | |
--timezone system | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#genericExtensions | |
--enable genericExtensions | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#headerFileName | |
--enable headerFileName | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#hoistAwait | |
--enable hoistAwait | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#hoistPatternLet | |
--enable hoistPatternLet | |
--patternlet hoist | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#hoistTry | |
--enable hoistTry | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#indent | |
--enable indent | |
--indent 4 | |
--tabwidth unspecified | |
--smarttabs enabled | |
--indentcase false | |
--ifdef indent | |
--xcodeindentation disabled | |
--indentstrings false | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#initCoderUnavailable | |
--enable initCoderUnavailable | |
--initcodernil false | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#leadingDelimiters | |
--enable leadingDelimiters | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#linebreakAtEndOfFile | |
--enable linebreakAtEndOfFile | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#linebreaks | |
--enable linebreaks | |
--linebreaks lf | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#modifierOrder | |
--enable modifierOrder | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#numberFormatting | |
--enable numberFormatting | |
--decimalgrouping 3,6 | |
--binarygrouping 4,8 | |
--octalgrouping 4,8 | |
--hexgrouping 4,8 | |
--fractiongrouping disabled | |
--exponentgrouping disabled | |
--hexliteralcase uppercase | |
--exponentcase uppercase | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#opaqueGenericParameters | |
--enable opaqueGenericParameters | |
--someany true | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#preferForLoop | |
--enable preferForLoop | |
--anonymousforeach convert | |
--inlinedforeach ignore | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#preferKeyPath | |
--enable preferKeyPath | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantBackticks | |
--enable redundantBackticks | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantBreak | |
--enable redundantBreak | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantClosure | |
--enable redundantClosure | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantExtensionACL | |
--enable redundantExtensionACL | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantFileprivate | |
--enable redundantFileprivate | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantGet | |
--enable redundantGet | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantInit | |
--enable redundantInit | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantInternal | |
--enable redundantInternal | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantLet | |
--enable redundantLet | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantLetError | |
--enable redundantLetError | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantNilInit | |
--enable redundantNilInit | |
--nilinit remove | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantObjc | |
--enable redundantObjc | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantOptionalBinding | |
--enable redundantOptionalBinding | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantParens | |
--enable redundantParens | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantPattern | |
--enable redundantPattern | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantRawValues | |
--enable redundantRawValues | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantReturn | |
--enable redundantReturn | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantSelf | |
--enable redundantSelf | |
--self remove | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantStaticSelf | |
--enable redundantStaticSelf | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantType | |
--enable redundantType | |
--propertytypes infer-locals-only | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantTypedThrows | |
--enable redundantTypedThrows | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#redundantVoidReturnType | |
--enable redundantVoidReturnType | |
--closurevoid remove | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#semicolons | |
--enable semicolons | |
--semicolons inline | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#sortDeclarations | |
--enable sortDeclarations | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#sortImports | |
--enable sortImports | |
--importgrouping alpha | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#sortTypealiases | |
--enable sortTypealiases | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#spaceAroundBraces | |
--enable spaceAroundBraces | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#spaceAroundBrackets | |
--enable spaceAroundBrackets | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#spaceAroundComments | |
--enable spaceAroundComments | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#spaceAroundGenerics | |
--enable spaceAroundGenerics | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#spaceAroundOperators | |
--enable spaceAroundOperators | |
--operatorfunc spaced | |
--ranges spaced | |
--typedelimiter space-after | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#spaceAroundParens | |
--enable spaceAroundParens | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#spaceInsideBraces | |
--enable spaceInsideBraces | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#spaceInsideBrackets | |
--enable spaceInsideBrackets | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#spaceInsideComments | |
--enable spaceInsideComments | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#spaceInsideGenerics | |
--enable spaceInsideGenerics | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#spaceInsideParens | |
--enable spaceInsideParens | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#strongOutlets | |
--enable strongOutlets | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#strongifiedSelf | |
--enable strongifiedSelf | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#todos | |
--enable todos | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#trailingClosures | |
--enable trailingClosures | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#trailingCommas | |
--enable trailingCommas | |
--commas always | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#trailingSpace | |
--enable trailingSpace | |
--trimwhitespace always | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#typeSugar | |
--enable typeSugar | |
--shortoptionals except-properties | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#unusedArguments | |
--enable unusedArguments | |
--stripunusedargs always | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#void | |
--enable void | |
--voidtype void | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrap | |
--enable wrap | |
--maxwidth none | |
--assetliterals visual-width | |
--wrapternary default | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapArguments | |
--enable wrapArguments | |
--wraparguments preserve | |
--wrapparameters preserve | |
--wrapcollections preserve | |
--closingparen balanced | |
--callsiteparen balanced | |
--wrapreturntype preserve | |
--wrapconditions preserve | |
--wraptypealiases preserve | |
--wrapeffects preserve | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapAttributes | |
--enable wrapAttributes | |
--funcattributes preserve | |
--typeattributes preserve | |
--storedvarattrs preserve | |
--computedvarattrs preserve | |
--complexattrs preserve | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapLoopBodies | |
--enable wrapLoopBodies | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapMultilineStatementBraces | |
--enable wrapMultilineStatementBraces | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapSingleLineComments | |
--enable wrapSingleLineComments | |
# See: https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#yodaConditions | |
--enable yodaConditions | |
--yodaswap always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment