Configured the Swift Format rules for the project.
This commit is contained in:
+2
-1
@@ -51,4 +51,5 @@ Package.resolved
|
||||
/.build/checkouts/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"fileScopedDeclarationPrivacy": {
|
||||
"accessLevel": "private"
|
||||
},
|
||||
"indentBlankLines": false,
|
||||
"indentConditionalCompilationBlocks": false,
|
||||
"indentSwitchCaseLabels": true,
|
||||
"indentation": {
|
||||
"spaces": 4
|
||||
},
|
||||
"lineBreakAroundMultilineExpressionChainComponents": true,
|
||||
"lineBreakBeforeControlFlowKeywords": true,
|
||||
"lineBreakBeforeEachArgument": true,
|
||||
"lineBreakBeforeEachGenericRequirement": false,
|
||||
"lineBreakBetweenDeclarationAttributes": true,
|
||||
"lineLength": 120,
|
||||
"maximumBlankLines": 1,
|
||||
"multilineTrailingCommaBehavior": "keptAsWritten",
|
||||
"multiElementCollectionTrailingCommas": true,
|
||||
"noAssignmentInExpressions" : {
|
||||
"allowedFunctions" : [
|
||||
"XCTAssertNoThrow"
|
||||
]
|
||||
},
|
||||
"orderedImports": {
|
||||
"includeConditionalImports": true,
|
||||
"shouldGroupImports": true
|
||||
},
|
||||
"prioritizeKeepingFunctionOutputTogether": true,
|
||||
"reflowMultilineStringLiterals": "always",
|
||||
"respectsExistingLineBreaks": true,
|
||||
"rules": {
|
||||
"AllPublicDeclarationsHaveDocumentation": true,
|
||||
"AlwaysUseLiteralForEmptyCollectionInit": true,
|
||||
"AlwaysUseLowerCamelCase": true,
|
||||
"AmbiguousTrailingClosureOverload": false,
|
||||
"AvoidRetroactiveConformances": true,
|
||||
"BeginDocumentationCommentWithOneLineSummary": true,
|
||||
"DoNotUseSemicolons": true,
|
||||
"DontRepeatTypeInStaticProperties": true,
|
||||
"FullyIndirectEnum": true,
|
||||
"IdentifiersMustBeASCII": true,
|
||||
"NeverForceUnwrap": true,
|
||||
"NeverUseForceTry": true,
|
||||
"NeverUseImplicitlyUnwrappedOptionals": true,
|
||||
"NoAccessLevelOnExtensionDeclarations": false,
|
||||
"NoAssignmentInExpressions": true,
|
||||
"NoBlockComments": true,
|
||||
"NoCasesWithOnlyFallthrough": true,
|
||||
"NoEmptyLinesOpeningClosingBraces": false,
|
||||
"NoEmptyTrailingClosureParentheses": true,
|
||||
"NoLabelsInCasePatterns": true,
|
||||
"NoLeadingUnderscores": true,
|
||||
"NoParensAroundConditions": true,
|
||||
"NoPlaygroundLiterals": true,
|
||||
"NoVoidReturnOnFunctionSignature": true,
|
||||
"OneCasePerLine": true,
|
||||
"OneVariableDeclarationPerLine": true,
|
||||
"OnlyOneTrailingClosureArgument": true,
|
||||
"OrderedImports" : true,
|
||||
"ReturnVoidInsteadOfEmptyTuple": true,
|
||||
"TypeNamesShouldBeCapitalized": true,
|
||||
"UseEarlyExits": true,
|
||||
"UseExplicitNilCheckInConditions": true,
|
||||
"UseLetInEveryBoundCaseVariable": true,
|
||||
"UseShorthandTypeNames": true,
|
||||
"UseSynthesizedInitializer": true,
|
||||
"UseTripleSlashForDocumentationComments": true,
|
||||
"UseWhereClausesInForLoops": true,
|
||||
"ValidateDocumentationComments": true
|
||||
},
|
||||
"spacesAroundRangeFormationOperators": true,
|
||||
"spacesBeforeEndOfLineComments" : 2,
|
||||
"tabWidth": 4,
|
||||
"version": 1
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
0296B3232F3903E6001C3BDB /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 0296B3222F3903E6001C3BDB /* README.md */; };
|
||||
0296B3272F390E1A001C3BDB /* .swift-format in Resources */ = {isa = PBXBuildFile; fileRef = 0296B3262F390E1A001C3BDB /* .swift-format */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -32,6 +33,7 @@
|
||||
0296B2FF2F38F8F7001C3BDB /* TodosTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TodosTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0296B3092F38F8F7001C3BDB /* TodosUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TodosUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0296B3222F3903E6001C3BDB /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
|
||||
0296B3262F390E1A001C3BDB /* .swift-format */ = {isa = PBXFileReference; lastKnownFileType = text; path = ".swift-format"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
||||
@@ -74,6 +76,7 @@
|
||||
0296B2E72F38F8F7001C3BDB = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0296B3262F390E1A001C3BDB /* .swift-format */,
|
||||
0296B3222F3903E6001C3BDB /* README.md */,
|
||||
0296B2F22F38F8F7001C3BDB /* App */,
|
||||
0296B3022F38F8F7001C3BDB /* UnitTests */,
|
||||
@@ -205,6 +208,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
files = (
|
||||
0296B3232F3903E6001C3BDB /* README.md in Resources */,
|
||||
0296B3272F390E1A001C3BDB /* .swift-format in Resources */,
|
||||
);
|
||||
};
|
||||
0296B2FD2F38F8F7001C3BDB /* Resources */ = {
|
||||
|
||||
Reference in New Issue
Block a user