Last active
January 7, 2025 15:40
-
-
Save dgilbert-foreflight/b0198550eb6ad54d62df83d6812cb5be to your computer and use it in GitHub Desktop.
swiftformat rules
This file contains hidden or 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
| # Swift Format Rules | |
| # https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md | |
| --swiftversion 6.0 | |
| --minversion 0.55.4 | |
| # File Header | |
| --header "{file}\nOriginal Author: {author.name} <{author.email}>\n{created}" | |
| # Editor Settings | |
| --indent 2 | |
| --tabwidth 2 | |
| --maxwidth 120 | |
| --xcodeindentation disabled | |
| # Opt-In Rules | |
| --enable acronyms | |
| --enable blankLineAfterSwitchCase | |
| --enable blockComments | |
| --enable docComments | |
| --enable isEmpty | |
| --enable markTypes | |
| --enable noExplicitOwnership | |
| --enable organizeDeclarations | |
| --enable propertyTypes | |
| --enable redundantProperty | |
| --enable unusedPrivateDeclarations | |
| --enable wrapConditionalBodies | |
| --enable wrapEnumCases | |
| --enable wrapMultilineConditionalAssignment | |
| --enable wrapSwitchCases | |
| # Disabled Rules | |
| --disable andoperator | |
| # Enabled Rule Options | |
| --acronyms ID,URL,UUID | |
| --allman false | |
| --anonymousforeach convert | |
| --assetliterals visual-width | |
| --asynccapturing | |
| --beforemarks | |
| --binarygrouping none | |
| --callsiteparen default | |
| --categorymark "MARK: %c" | |
| --classthreshold 0 | |
| --closingparen balanced | |
| --closurevoid remove | |
| --commas always | |
| --complexattrs prev-line | |
| --computedvarattrs preserve | |
| --condassignment after-property | |
| --conflictmarkers reject | |
| --dateformat system | |
| --decimalgrouping none | |
| --doccomments before-declarations | |
| --elseposition same-line | |
| --emptybraces no-space | |
| --enumnamespaces always | |
| --enumthreshold 0 | |
| --exponentcase lowercase | |
| --exponentgrouping disabled | |
| --extensionacl on-extension | |
| --extensionlength 0 | |
| --extensionmark "MARK: - %t + %c" | |
| --fractiongrouping disabled | |
| --fragment false | |
| --funcattributes prev-line | |
| --generictypes | |
| --groupblanklines true | |
| --groupedextension "MARK: %c" | |
| --guardelse auto | |
| --header ignore | |
| --hexgrouping none | |
| --hexliteralcase uppercase | |
| --ifdef indent | |
| --importgrouping alpha | |
| --indentcase false | |
| --indentstrings false | |
| --inferredtypes exclude-cond-exprs | |
| --initcodernil false | |
| --inlinedforeach ignore | |
| --lifecycle | |
| --lineaftermarks true | |
| --linebreaks lf | |
| --markcategories true | |
| --markextensions always | |
| --marktypes always | |
| --modifierorder | |
| --nevertrailing | |
| --nilinit remove | |
| --noncomplexattrs | |
| --nospaceoperators | |
| --nowrapoperators | |
| --octalgrouping none | |
| --operatorfunc spaced | |
| --organizationmode visibility | |
| --organizetypes actor,class,enum,struct | |
| --patternlet hoist | |
| --preservedecls | |
| --preservedsymbols Package | |
| --propertytypes infer-locals-only | |
| --ranges spaced | |
| --self remove | |
| --selfrequired | |
| --semicolons never | |
| --shortoptionals except-properties | |
| --smarttabs enabled | |
| --someany true | |
| --sortedpatterns | |
| --storedvarattrs prev-line | |
| --stripunusedargs always | |
| --structthreshold 0 | |
| --throwcapturing | |
| --timezone system | |
| --trailingclosures | |
| --trimwhitespace always | |
| --typeattributes prev-line | |
| --typeblanklines remove | |
| --typedelimiter space-after | |
| --typemark "MARK: - %t" | |
| --typemarks | |
| --typeorder | |
| --visibilitymarks | |
| --visibilityorder | |
| --voidtype void | |
| --yodaswap always | |
| # WrapArguments | |
| --wraparguments before-first | |
| --wrapcollections before-first | |
| --wrapconditions preserve | |
| --wrapeffects preserve | |
| --wrapenumcases with-values | |
| --wrapparameters before-first | |
| --wrapreturntype preserve | |
| --wrapternary default | |
| --wraptypealiases preserve |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment