# SwiftFormat configuration
# https://github.com/nicklockwood/SwiftFormat

# Swift version
--swiftversion 5.9

# File options
--exclude DerivedData,.build,build,Packages,vendor

# Format options
--indent 4
--indentcase false
--tabwidth 4
--maxwidth 120
--wraparguments before-first
--wrapparameters before-first
--wrapcollections before-first
--wrapconditions after-first
--wrapreturntype if-multiline
--wrapeffects if-multiline
--closingparen balanced
--funcattributes prev-line
--typeattributes prev-line
--varattributes prev-line
--storedvarattrs same-line
--computedvarattrs same-line

# Spacing
--trimwhitespace always
--linebreaks lf
--semicolons never
--commas always
--operatorfunc spaced
--nospaceoperators
--ranges spaced
--typedelimiter space-after
--guardelse same-line

# Braces
--allman false
--elseposition same-line
--ifdef no-indent

# Number formatting (align with SwiftLint number_separator rule)
--decimalgrouping 3,4
--binarygrouping none
--octalgrouping none
--hexgrouping none

# Misc
--self remove
--selfrequired
--importgrouping alpha
--header strip
--stripunusedargs closure-only
--emptybraces no-space

# Enabled rules (comment out to disable)
--enable blankLineAfterImports
--enable blankLinesBetweenImports
--enable blockComments
--enable docComments
--enable isEmpty
--enable markTypes
--enable organizeDeclarations
--enable sortDeclarations
--enable wrapConditionalBodies
--enable wrapEnumCases
--enable wrapMultilineStatementBraces
--enable wrapSwitchCases

# Disabled rules
--disable acronyms
--disable modifierOrder
--disable redundantSelf
--disable trailingCommas
