passforios/.swiftformat

96 lines
4.6 KiB
Text

# Exclude folders
--exclude Carthage,go,Pods
# Enabled rules
--rules andOperator, anyObjectProtocol, blankLinesAroundMark, blankLinesAtEndOfScope, blankLinesAtStartOfScope, blankLinesBetweenScopes, braces, consecutiveBlankLines, consecutiveSpaces, duplicateImports, elseOnSameLine, emptyBraces, fileHeader, hoistPatternLet, indent, isEmpty, leadingDelimiters, linebreakAtEndOfFile, linebreaks, modifierOrder, numberFormatting, preferKeyPath, redundantBackticks, redundantBreak, redundantExtensionACL, redundantFileprivate, redundantGet, redundantInit, redundantLet, redundantLetError, redundantNilInit, redundantObjc, redundantParens, redundantPattern, redundantRawValues, redundantReturn, redundantSelf, redundantVoidReturnType, semicolons, sortedImports, spaceAroundBraces, spaceAroundBrackets, spaceAroundComments, spaceAroundGenerics, spaceAroundOperators, spaceAroundParens, spaceInsideBraces, spaceInsideBrackets, spaceInsideComments, spaceInsideGenerics, spaceInsideParens, strongOutlets, strongifiedSelf, todos, trailingClosures, trailingCommas, trailingSpace, typeSugar, unusedArguments, void, wrap, wrapArguments, wrapAttributes, yodaConditions
# Formatting options
## Use allman indentation style: "true" or "false" (default)
--allman false
## Binary grouping,threshold (default: 4,8) or "none", "ignore"
--binarygrouping 4,8
## Closing paren position: "balanced" (default) or "same-line"
--closingparen balanced
## Commas in collection literals: "always" (default) or "inline"
--commas always
## Decimal grouping,threshold (default: 3,6) or "none", "ignore"
--decimalgrouping 3,6
## Placement of else/catch: "same-line" (default) or "next-line"
--elseposition same-line
## Case of 'e' in numbers: "lowercase" or "uppercase" (default)
--exponentcase lowercase
## Group exponent digits: "enabled" or "disabled" (default)
--exponentgrouping disabled
## Group digits after '.': "enabled" or "disabled" (default)
--fractiongrouping disabled
## Function @attributes: "preserve", "prev-line", or "same-line"
--funcattributes prev-line
## Guard else: "same-line", "next-line" or "auto" (default)
--guardelse auto
## Header comments: "strip", "ignore", or the text you wish use
--header ignore
## Hex grouping,threshold (default: 4,8) or "none", "ignore"
--hexgrouping 4,8
## Casing for hex literals: "uppercase" (default) or "lowercase"
--hexliteralcase uppercase
## #if indenting: "indent" (default), "no-indent" or "outdent"
--ifdef indent
## "testable-top", "testable-bottom" or "alphabetized" (default)
--importgrouping testable-bottom
## Number of spaces to indent, or "tab" to use tabs
--indent 4
## Indent cases inside a switch: "true" or "false" (default)
--indentcase false
## Linebreak character to use: "cr", "crlf" or "lf" (default)
--linebreaks lf
## Maximum length of a line before wrapping. defaults to "none"
--maxwidth none
## Comma-delimited list of modifiers in preferred order
--modifierorder
## Comma-delimited list of operators without surrounding space
--nospaceoperators
## Comma-delimited list of operators that shouldn't be wrapped
--nowrapoperators
## Octal grouping,threshold (default: 4,8) or "none", "ignore"
--octalgrouping 4,8
## Spacing for operator funcs: "spaced" (default) or "no-space"
--operatorfunc spaced
## let/var placement in patterns: "hoist" (default) or "inline"
--patternlet hoist
## Explicit self: "insert", "remove" (default) or "init-only"
--self init-only
## Comma-delimited list of functions with @autoclosure arguments
--selfrequired
## Allow semicolons: "never" or "inline" (default)
--semicolons inline
## Use ? for Optionals "always" (default) or "except-properties"
--shortoptionals always
## Align code independently of tab width. defaults to "enabled"
--smarttabs enabled
## "closure-only", "unnamed-only" or "always" (default)
--stripunusedargs always
## The width of a tab character. Defaults to "unspecified"
--tabwidth 4
## Comma-delimited list of functions that use trailing closures
--trailingclosures
## Trim trailing space: "always" (default) or "nonblank-lines"
--trimwhitespace always
## Type @attributes: "preserve", "prev-line", or "same-line"
--typeattributes preserve
## Property @attributes: "preserve", "prev-line", or "same-line"
--varattributes same-line
## How Void types are represented: "void" (default) or "tuple"
--voidtype void
## Wrap all arguments: "before-first", "after-first", "preserve"
--wraparguments preserve
## Wrap array/dict: "before-first", "after-first", "preserve"
--wrapcollections preserve
## Wrap func params: "before-first", "after-first", "preserve"
--wrapparameters preserve
## Xcode indent guard/enum: "enabled" or "disabled" (default)
--xcodeindentation disabled
## Swap yoda values: "always" (default) or "literals-only"
--yodaswap always