Skip to content

Commit 8046844

Browse files
committed
implement swift-format
1 parent ca21b74 commit 8046844

File tree

190 files changed

+3146
-2974
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+3146
-2974
lines changed

.swift-format

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

Addame.xcodeproj/project.pbxproj

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@
105105
C3E50C98261B5DFA00285977 /* Sources */,
106106
C3E50C99261B5DFA00285977 /* Frameworks */,
107107
C3E50C9A261B5DFA00285977 /* Resources */,
108-
C3F9CB0A2678E4540007F6B9 /* SwiftLint */,
108+
C36C678E26E3FC9A007CC94D /* swift-format */,
109+
C36C678F26E3FCD7007CC94D /* swift-format-lint */,
109110
);
110111
buildRules = (
111112
);
@@ -164,7 +165,7 @@
164165
/* End PBXResourcesBuildPhase section */
165166

166167
/* Begin PBXShellScriptBuildPhase section */
167-
C3F9CB0A2678E4540007F6B9 /* SwiftLint */ = {
168+
C36C678E26E3FC9A007CC94D /* swift-format */ = {
168169
isa = PBXShellScriptBuildPhase;
169170
buildActionMask = 2147483647;
170171
files = (
@@ -173,14 +174,32 @@
173174
);
174175
inputPaths = (
175176
);
176-
name = SwiftLint;
177+
name = "swift-format";
177178
outputFileListPaths = (
178179
);
179180
outputPaths = (
180181
);
181182
runOnlyForDeploymentPostprocessing = 0;
182183
shellPath = /bin/sh;
183-
shellScript = "if which swiftlint >/dev/null; then\n swiftlint --fix --config \".swiftlint.yml\" && swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
184+
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif which swift-format >/dev/null; then\n swift-format -m format -i -r ${PROJECT_DIR}\nelse\n echo \"warning: swift-format not installed\"\nfi\n";
185+
};
186+
C36C678F26E3FCD7007CC94D /* swift-format-lint */ = {
187+
isa = PBXShellScriptBuildPhase;
188+
buildActionMask = 2147483647;
189+
files = (
190+
);
191+
inputFileListPaths = (
192+
);
193+
inputPaths = (
194+
);
195+
name = "swift-format-lint";
196+
outputFileListPaths = (
197+
);
198+
outputPaths = (
199+
);
200+
runOnlyForDeploymentPostprocessing = 0;
201+
shellPath = /bin/sh;
202+
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\nif which swift-format >/dev/null; then\n swift-format -m lint -r ${PROJECT_DIR}\n exit 0\nelse\n echo \"warning: swift-format not installed\"\nfi\n";
184203
};
185204
/* End PBXShellScriptBuildPhase section */
186205

Addame/Addame.swift

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@
55
// Created by Saroar Khandoker on 05.04.2021.
66
//
77

8+
import AppFeature
9+
import AuthClient
10+
import AuthClientLive
11+
import AuthenticationView
812
import ComposableArchitecture
9-
import SwiftUI
10-
import EventView
1113
import ConversationsView
14+
import EventView
1215
import ProfileView
16+
import SwiftUI
1317
import TabsView
14-
import AuthenticationView
15-
import AuthClient
16-
import AuthClientLive
17-
import AppFeature
1818

1919
@main
2020
struct AddameApp: App {
21-
2221
var body: some Scene {
2322
WindowGroup {
2423
AppView()

0 commit comments

Comments
 (0)