From 9eb1e96d7980b6c962a8bfa2d2accce0cb815426 Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Mon, 21 Sep 2026 13:32:53 -0700 Subject: [PATCH] Add rudimentary swift-format configuration --- .swift-format | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .swift-format diff --git a/.swift-format b/.swift-format new file mode 100644 index 00000000..36e51424 --- /dev/null +++ b/.swift-format @@ -0,0 +1,50 @@ +{ + "version": 1, + "lineLength": 80, + "indentation": { + "spaces": 2 + }, + "maximumBlankLines": 10, + "respectsExistingLineBreaks": false, + "lineBreakBeforeEachArgument": true, + "lineBreakBeforeEachGenericRequirement": true, + "lineBreakBetweenDeclarationAttributes": true, + "prioritizeKeepingFunctionOutputTogether": true, + "indentConditionalCompilationBlocks": false, + "lineBreakAroundMultilineExpressionChainComponents": true, + "indentSwitchCaseLabels": false, + "spacesAroundRangeFormationOperators": true, + "multilineTrailingCommaBehavior": "keptAsWritten", + "multiElementCollectionTrailingCommas": true, + "indentBlankLines": false, + "rules": { + "AlwaysUseLowerCamelCase": false, + "AmbiguousTrailingClosureOverload": false, + "DoNotUseSemicolons": false, + "DontRepeatTypeInStaticProperties": false, + "NeverForceUnwrap": false, + "NeverUseForceTry": false, + "NoAccessLevelOnExtensionDeclaration": true, + "NoBlockComments": false, + "NoCasesWithOnlyFallthrough": false, + "NoEmptyLinesOpeningClosingBraces": false, + "NoEmptyTrailingClosureParentheses": false, + "NoLeadingUnderscores": false, + "NoPlaygroundLiterals": true, + "NoVoidReturnOnFunctionSignature": false, + "OneCasePerLine": true, + "OneVariableDeclarationPerLine": true, + "OrderedImports": false, + "ReplaceForEachWithForLoop": false, + "TypeNamesShouldBeCapitalized": true, + "UseEarlyExits": false, + "UseExplicitNilCheckInConditions": false, + "UseLetInEveryBoundCaseVariable": false, + "UseShorthandTypeNames": false, + "UseSingleLinePropertyGetter": false, + "UseSynthesizedInitializer": false, + "UseTripleSlashForDocumentationComments": true, + "UseWhereClausesInForLoops": false, + "ValidateDocumentationComments": true + } +}