Skip to content

Commit 0b1afcc

Browse files
committed
Fix swiftlint, remove unused files
1 parent 01eaf64 commit 0b1afcc

File tree

8 files changed

+31
-140
lines changed

8 files changed

+31
-140
lines changed

ForPDA.xcodeproj/project.pbxproj

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@
5757
B858E89A2AE1DED300F147A6 /* UIApplication+Ext.swift in Sources */ = {isa = PBXBuildFile; fileRef = B858E8992AE1DED300F147A6 /* UIApplication+Ext.swift */; };
5858
B863357D293D218900F8D2E6 /* String+Ext.swift in Sources */ = {isa = PBXBuildFile; fileRef = B863357C293D218900F8D2E6 /* String+Ext.swift */; };
5959
B874B41B2A101B5F00A004FC /* Array+Ext.swift in Sources */ = {isa = PBXBuildFile; fileRef = B874B41A2A101B5F00A004FC /* Array+Ext.swift */; };
60-
B874B4382A103EBA00A004FC /* ForumPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B874B4342A103EB900A004FC /* ForumPresenter.swift */; };
61-
B874B4392A103EBA00A004FC /* ForumFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = B874B4352A103EB900A004FC /* ForumFactory.swift */; };
62-
B874B43A2A103EBA00A004FC /* ForumView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B874B4362A103EBA00A004FC /* ForumView.swift */; };
63-
B874B43B2A103EBA00A004FC /* ForumVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = B874B4372A103EBA00A004FC /* ForumVC.swift */; };
6460
B874B4472A1066F500A004FC /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = B874B4492A1066F500A004FC /* Localizable.strings */; };
6561
B874B44C2A10706B00A004FC /* Links.swift in Sources */ = {isa = PBXBuildFile; fileRef = B874B44B2A10706B00A004FC /* Links.swift */; };
6662
B875D2092A1C0FBB00F8AB6A /* ProfileFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = B875D2082A1C0FBB00F8AB6A /* ProfileFactory.swift */; };
@@ -216,10 +212,6 @@
216212
B858E8992AE1DED300F147A6 /* UIApplication+Ext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+Ext.swift"; sourceTree = "<group>"; };
217213
B863357C293D218900F8D2E6 /* String+Ext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Ext.swift"; sourceTree = "<group>"; };
218214
B874B41A2A101B5F00A004FC /* Array+Ext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Ext.swift"; sourceTree = "<group>"; };
219-
B874B4342A103EB900A004FC /* ForumPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ForumPresenter.swift; sourceTree = "<group>"; };
220-
B874B4352A103EB900A004FC /* ForumFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ForumFactory.swift; sourceTree = "<group>"; };
221-
B874B4362A103EBA00A004FC /* ForumView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ForumView.swift; sourceTree = "<group>"; };
222-
B874B4372A103EBA00A004FC /* ForumVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ForumVC.swift; sourceTree = "<group>"; };
223215
B874B43F2A1064FE00A004FC /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
224216
B874B4482A1066F500A004FC /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
225217
B874B44A2A1066F800A004FC /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -465,17 +457,6 @@
465457
path = News;
466458
sourceTree = "<group>";
467459
};
468-
B874B42A2A103E0000A004FC /* Forum */ = {
469-
isa = PBXGroup;
470-
children = (
471-
B874B4352A103EB900A004FC /* ForumFactory.swift */,
472-
B874B4372A103EBA00A004FC /* ForumVC.swift */,
473-
B874B4362A103EBA00A004FC /* ForumView.swift */,
474-
B874B4342A103EB900A004FC /* ForumPresenter.swift */,
475-
);
476-
path = Forum;
477-
sourceTree = "<group>";
478-
};
479460
B87EB9CE293D2D8B0025C2A0 /* Article */ = {
480461
isa = PBXGroup;
481462
children = (
@@ -597,7 +578,6 @@
597578
B8C7ABB3293D208400FB2F67 /* News */,
598579
B87EB9CE293D2D8B0025C2A0 /* Article */,
599580
B81BE1472944054100E2AAF9 /* Comments */,
600-
B874B42A2A103E0000A004FC /* Forum */,
601581
B893011A2947E17C00D14141 /* Menu */,
602582
B893011F2947E2A700D14141 /* Login */,
603583
B8AC57702947FC8E00435CF3 /* Profile */,
@@ -865,6 +845,7 @@
865845
B8D351F2293CABB6008A84EA /* Frameworks */,
866846
B8D351F3293CABB6008A84EA /* Resources */,
867847
B8A85A962AA10CF500EDFE58 /* Embed Foundation Extensions */,
848+
B869B55B2AE4AFA6008A4B7E /* Swiftlint */,
868849
);
869850
buildRules = (
870851
);
@@ -986,6 +967,29 @@
986967
};
987968
/* End PBXResourcesBuildPhase section */
988969

970+
/* Begin PBXShellScriptBuildPhase section */
971+
B869B55B2AE4AFA6008A4B7E /* Swiftlint */ = {
972+
isa = PBXShellScriptBuildPhase;
973+
buildActionMask = 2147483647;
974+
files = (
975+
);
976+
inputFileListPaths = (
977+
"$(SRCROOT)/swiftlint/build_phases/ForPDA_swiftlint.xcfilelist",
978+
);
979+
inputPaths = (
980+
);
981+
name = Swiftlint;
982+
outputFileListPaths = (
983+
);
984+
outputPaths = (
985+
"$(SRCROOT)/swiftlint/build_phases/ForPDA_swiftlint_static_output\n",
986+
);
987+
runOnlyForDeploymentPostprocessing = 0;
988+
shellPath = /bin/sh;
989+
shellScript = "if [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif which swiftlint > /dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
990+
};
991+
/* End PBXShellScriptBuildPhase section */
992+
989993
/* Begin PBXSourcesBuildPhase section */
990994
B8A85A842AA10CF400EDFE58 /* Sources */ = {
991995
isa = PBXSourcesBuildPhase;
@@ -1019,7 +1023,6 @@
10191023
B8A51BB82A91292000FDB599 /* LoginInterceptor.swift in Sources */,
10201024
B88D3F522A0900630061C6C4 /* MenuAuthCell.swift in Sources */,
10211025
B8C7ABBA293D20E400FB2F67 /* PDAViewController.swift in Sources */,
1022-
B874B43A2A103EBA00A004FC /* ForumView.swift in Sources */,
10231026
B8001CB22A19434600E7A8A8 /* SettingsView.swift in Sources */,
10241027
B8001CB72A19511E00E7A8A8 /* SettingsService.swift in Sources */,
10251028
B887245F2A1E9A0900DFB47F /* ArticleBuilder.swift in Sources */,
@@ -1044,9 +1047,7 @@
10441047
B8001CDA2A1AA0FE00E7A8A8 /* CookiesService.swift in Sources */,
10451048
B858E8802AE1CFDE00F147A6 /* RequestError.swift in Sources */,
10461049
B874B44C2A10706B00A004FC /* Links.swift in Sources */,
1047-
B874B43B2A103EBA00A004FC /* ForumVC.swift in Sources */,
10481050
B8B86DB8295773950098D5E5 /* NewsPresenter.swift in Sources */,
1049-
B874B4382A103EBA00A004FC /* ForumPresenter.swift in Sources */,
10501051
B8001CB02A19433D00E7A8A8 /* SettingsPresenter.swift in Sources */,
10511052
B8BD2D89293E26A900E12E29 /* ArticleCommentCell.swift in Sources */,
10521053
B89301262947E2BD00D14141 /* LoginView.swift in Sources */,
@@ -1102,7 +1103,6 @@
11021103
B82B2EC12A89059C00CB067C /* AppScheme.swift in Sources */,
11031104
B83403572967AFCA00C3CF37 /* PDATableView.swift in Sources */,
11041105
B957D4432A12CA120013F578 /* UIViewController+Ext.swift in Sources */,
1105-
B874B4392A103EBA00A004FC /* ForumFactory.swift in Sources */,
11061106
B89301212947E2AE00D14141 /* LoginVC.swift in Sources */,
11071107
B8E446312A002F7200CE8745 /* AnalyticsService.swift in Sources */,
11081108
B875D2142A1C513100F8AB6A /* MultipartFormDataRequest.swift in Sources */,
@@ -1398,6 +1398,7 @@
13981398
CURRENT_PROJECT_VERSION = 114;
13991399
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
14001400
DEVELOPMENT_TEAM = 7353CQCGQC;
1401+
ENABLE_USER_SCRIPT_SANDBOXING = NO;
14011402
GENERATE_INFOPLIST_FILE = YES;
14021403
INFOPLIST_FILE = ForPDA/Info.plist;
14031404
INFOPLIST_KEY_CFBundleDisplayName = ForPDA;
@@ -1432,6 +1433,7 @@
14321433
CODE_SIGN_STYLE = Automatic;
14331434
CURRENT_PROJECT_VERSION = 114;
14341435
DEVELOPMENT_TEAM = 7353CQCGQC;
1436+
ENABLE_USER_SCRIPT_SANDBOXING = NO;
14351437
GENERATE_INFOPLIST_FILE = YES;
14361438
INFOPLIST_FILE = ForPDA/Info.plist;
14371439
INFOPLIST_KEY_CFBundleDisplayName = ForPDA;

ForPDA.xcodeproj/xcshareddata/xcschemes/ForPDA.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ExecutionAction
1010
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
1111
<ActionContent
12-
title = "Run Script"
12+
title = "Generate build phase file lists"
1313
scriptText = "cd $SOURCE_ROOT&#10;${SOURCE_ROOT}/swiftlint/swiftlint_helper.sh&#10;">
1414
<EnvironmentBuildable>
1515
<BuildableReference

ForPDA/Sources/Modules/Forum/ForumFactory.swift

Lines changed: 0 additions & 29 deletions
This file was deleted.

ForPDA/Sources/Modules/Forum/ForumPresenter.swift

Lines changed: 0 additions & 22 deletions
This file was deleted.

ForPDA/Sources/Modules/Forum/ForumVC.swift

Lines changed: 0 additions & 32 deletions
This file was deleted.

ForPDA/Sources/Modules/Forum/ForumView.swift

Lines changed: 0 additions & 30 deletions
This file was deleted.

ForPDA/Sources/Services/Network/Base/HTTPClient.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ class HTTPClient: NSObject, HTTPClientProtocol {
2525
@Injected(\.settingsService) private var settingsService
2626

2727
private lazy var webView: WKWebView = {
28+
// swiftlint:disable force_cast
2829
let webView = UIApplication.shared.keyWindow?.viewWithTag(666) as! WKWebView
2930
webView.navigationDelegate = self
3031
return webView
32+
// swiftlint:enable force_cast
3133
}()
3234

3335
private var continuation: CheckedContinuation<String, Error>?

ForPDA/Sources/Services/Network/User/UserEndpoint.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ extension UserEndpoint: Endpoint {
2727
return nil
2828
}
2929

30-
var body: [String : Any]? {
30+
var body: [String: Any]? {
3131
return nil
3232
}
3333

3434
var multipart: [String: String]? {
3535
return nil
3636
}
3737

38-
var query: [String : String]? {
38+
var query: [String: String]? {
3939
switch self {
4040
case .user(let id):
4141
return ["showuser": id]

0 commit comments

Comments
 (0)