# OpenRocky SwiftFormat configuration
#
# Conservative ruleset matching existing style (per CLAUDE.md):
# - 4-space indentation
# - Same-line opening brace
# - No imports grouping changes (would churn too much)
#
# To apply:   swiftformat --config .swiftformat OpenRocky/OpenRocky
# To check:   swiftformat --lint --config .swiftformat OpenRocky/OpenRocky

--swiftversion 6.0
--languagemode 6

# Indentation & whitespace
--indent 4
--tabwidth 4
--trimwhitespace always
--ifdef no-indent

# Braces
--elseposition same-line
--guardelse next-line
--allman false

# Line endings & max width
--linebreaks lf
--maxwidth none

# Exclusions
--exclude Packages,build,OpenRocky/build,website,.build

# Safe rules only — stuff that rarely changes intent
--rules \
    consecutiveBlankLines,\
    consecutiveSpaces,\
    duplicateImports,\
    emptyBraces,\
    linebreakAtEndOfFile,\
    redundantParens,\
    redundantSelf,\
    redundantVoidReturnType,\
    semicolons,\
    spaceAroundBraces,\
    spaceAroundComments,\
    spaceAroundOperators,\
    spaceAroundParens,\
    spaceInsideBraces,\
    spaceInsideBrackets,\
    spaceInsideComments,\
    spaceInsideParens,\
    trailingCommas,\
    trailingSpace
