Skip to content

Commit 58b328a

Browse files
authored
Add swift-format file (pjechris#18)
1 parent 25a81bc commit 58b328a

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.swift-format

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"fileScopedDeclarationPrivacy" : {
3+
"accessLevel" : "private"
4+
},
5+
"indentation" : {
6+
"spaces" : 4
7+
},
8+
"indentConditionalCompilationBlocks" : true,
9+
"indentSwitchCaseLabels" : false,
10+
"lineBreakAroundMultilineExpressionChainComponents" : false,
11+
"lineBreakBeforeControlFlowKeywords" : false,
12+
"lineBreakBeforeEachArgument" : false,
13+
"lineBreakBeforeEachGenericRequirement" : false,
14+
"lineLength" : 100,
15+
"maximumBlankLines" : 1,
16+
"prioritizeKeepingFunctionOutputTogether" : false,
17+
"respectsExistingLineBreaks" : true,
18+
"rules" : {
19+
"AllPublicDeclarationsHaveDocumentation" : false,
20+
"AlwaysUseLowerCamelCase" : true,
21+
"AmbiguousTrailingClosureOverload" : true,
22+
"BeginDocumentationCommentWithOneLineSummary" : false,
23+
"DoNotUseSemicolons" : true,
24+
"DontRepeatTypeInStaticProperties" : true,
25+
"FileScopedDeclarationPrivacy" : true,
26+
"FullyIndirectEnum" : true,
27+
"GroupNumericLiterals" : true,
28+
"IdentifiersMustBeASCII" : true,
29+
"NeverForceUnwrap" : false,
30+
"NeverUseForceTry" : false,
31+
"NeverUseImplicitlyUnwrappedOptionals" : false,
32+
"NoAccessLevelOnExtensionDeclaration" : true,
33+
"NoBlockComments" : true,
34+
"NoCasesWithOnlyFallthrough" : true,
35+
"NoEmptyTrailingClosureParentheses" : true,
36+
"NoLabelsInCasePatterns" : true,
37+
"NoLeadingUnderscores" : false,
38+
"NoParensAroundConditions" : true,
39+
"NoVoidReturnOnFunctionSignature" : true,
40+
"OneCasePerLine" : true,
41+
"OneVariableDeclarationPerLine" : true,
42+
"OnlyOneTrailingClosureArgument" : true,
43+
"OrderedImports" : true,
44+
"ReturnVoidInsteadOfEmptyTuple" : true,
45+
"UseEarlyExits" : false,
46+
"UseLetInEveryBoundCaseVariable" : true,
47+
"UseShorthandTypeNames" : true,
48+
"UseSingleLinePropertyGetter" : true,
49+
"UseSynthesizedInitializer" : true,
50+
"UseTripleSlashForDocumentationComments" : true,
51+
"UseWhereClausesInForLoops" : false,
52+
"ValidateDocumentationComments" : false
53+
},
54+
"tabWidth" : 8,
55+
"version" : 1
56+
}

Package.swift

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ let package = Package(
1313
dependencies: [
1414
// Dependencies declare other packages that this package depends on.
1515
// .package(url: /* package url */, from: "1.0.0"),
16+
.package(url: "https://github.com/apple/swift-format", branch: "main")
1617
],
1718
targets: [
1819
.target(name: "SimpleHTTPFoundation", dependencies: []),

0 commit comments

Comments
 (0)