Skip to content

Commit

Permalink
Fixed swiftlint rules. Added new ResponseDataType case.
Browse files Browse the repository at this point in the history
  • Loading branch information
oolxg committed May 14, 2023
1 parent 06a1e60 commit 56abebe
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 64 deletions.
10 changes: 0 additions & 10 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ disabled_rules:

opt_in_rules:
- array_init
- attributes
- closure_spacing
- collection_alignment
- colon # promote to error
Expand Down Expand Up @@ -44,7 +43,6 @@ opt_in_rules:
- strict_fileprivate
- toggle_bool
- unneeded_parentheses_in_closure_argument
- unused_import
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- yoda_condition
Expand All @@ -59,14 +57,6 @@ custom_rules:
severity: warning


attributes:
always_on_same_line:
- "@IBSegueAction"
- "@IBAction"
- "@NSManaged"
- "@objc"
- "@nonobjc"

force_try: warning
force_cast: warning
function_body_length:
Expand Down
20 changes: 4 additions & 16 deletions Hanami.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
224C657C2827204100AAEF2E /* HanamiApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224C657B2827204100AAEF2E /* HanamiApp.swift */; };
224C65802827204300AAEF2E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 224C657F2827204300AAEF2E /* Assets.xcassets */; };
224C65832827204300AAEF2E /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 224C65822827204300AAEF2E /* Preview Assets.xcassets */; };
224C658D2827204300AAEF2E /* HanamiTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224C658C2827204300AAEF2E /* HanamiTests.swift */; };
224E6712282E91FF001D214C /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224E6711282E91FF001D214C /* Response.swift */; };
224E6714282E9781001D214C /* Manga.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224E6713282E9781001D214C /* Manga.swift */; };
224E671B282EAA50001D214C /* AppError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224E671A282EAA50001D214C /* AppError.swift */; };
Expand Down Expand Up @@ -251,7 +250,6 @@
224C657F2827204300AAEF2E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
224C65822827204300AAEF2E /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
224C65882827204300AAEF2E /* HanamiTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HanamiTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
224C658C2827204300AAEF2E /* HanamiTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HanamiTests.swift; sourceTree = "<group>"; };
224C65922827204300AAEF2E /* HanamiUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HanamiUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
224E6711282E91FF001D214C /* Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Response.swift; sourceTree = "<group>"; };
224E6713282E9781001D214C /* Manga.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Manga.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -610,7 +608,6 @@
isa = PBXGroup;
children = (
224C657A2827204100AAEF2E /* Hanami */,
224C658B2827204300AAEF2E /* HanamiTests */,
224C65792827204100AAEF2E /* Products */,
33240CCD5BD875E1E9324710 /* .gitignore */,
);
Expand Down Expand Up @@ -653,14 +650,6 @@
path = "Preview Content";
sourceTree = "<group>";
};
224C658B2827204300AAEF2E /* HanamiTests */ = {
isa = PBXGroup;
children = (
224C658C2827204300AAEF2E /* HanamiTests.swift */,
);
path = HanamiTests;
sourceTree = "<group>";
};
224E6710282E8E18001D214C /* Model */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1099,7 +1088,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
224C658D2827204300AAEF2E /* HanamiTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1250,7 +1238,7 @@
CODE_SIGN_ENTITLEMENTS = Hanami/Hanami.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 15;
CURRENT_PROJECT_VERSION = 16;
DEVELOPMENT_ASSET_PATHS = "\"Hanami/Preview Content\"";
DEVELOPMENT_TEAM = HJ9678T652;
ENABLE_PREVIEWS = YES;
Expand All @@ -1271,7 +1259,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.25;
MARKETING_VERSION = 0.25.1;
PRODUCT_BUNDLE_IDENTIFIER = moe.mkpwnz.Hanami;
PRODUCT_NAME = "Hanami - Manga Reader";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1291,7 +1279,7 @@
CODE_SIGN_ENTITLEMENTS = Hanami/Hanami.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 15;
CURRENT_PROJECT_VERSION = 16;
DEVELOPMENT_ASSET_PATHS = "\"Hanami/Preview Content\"";
DEVELOPMENT_TEAM = HJ9678T652;
ENABLE_PREVIEWS = YES;
Expand All @@ -1312,7 +1300,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.25;
MARKETING_VERSION = 0.25.1;
PRODUCT_BUNDLE_IDENTIFIER = moe.mkpwnz.Hanami;
PRODUCT_NAME = "Hanami - Manga Reader";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ struct ChapterFeature: ReducerProtocol {
@Dependency(\.logger) private var logger
@Dependency(\.mainQueue) private var mainQueue

// swiftlint:disable:
var body: some ReducerProtocol<State, Action> {
Reduce { state, action in
switch action {
Expand Down
3 changes: 3 additions & 0 deletions Hanami/Extension/UI/UIDevice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,6 @@ extension UIDevice {
return top > 20
}
}
// swiftlint:enable cyclomatic_complexity
// swiftlint:enable function_body_length
// swiftlint:enable line_length
1 change: 1 addition & 0 deletions Hanami/Model/WebAPI/LocalizedString.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,4 @@ extension LocalizedString {
return nil
}
}
// swiftlint:enable identifier_name
1 change: 1 addition & 0 deletions Hanami/Model/WebAPI/ResponseDataType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ enum ResponseDataType: String {
case scanlationGroup = "scanlation_group"
case tag, user, leader, member
case customList = "custom_list"
case creator
}

extension ResponseDataType: Codable { }
1 change: 1 addition & 0 deletions Hanami/Model/WebAPI/Tag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,4 @@ extension Tag {
attributes.name.en.rawValue
}
}
// swiftlint:enable identifier_name
2 changes: 0 additions & 2 deletions Hanami/Utils/LiveText/LiveTextHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
// https://developer.apple.com/documentation/vision/recognizing_text_in_images
// https://github.com/TelegramMessenger/Telegram-iOS/blob/2a32c871882c4e1b1ccdecd34fccd301723b30d9/submodules/Translate/Sources/Translate.swift
// https://github.com/TelegramMessenger/Telegram-iOS/blob/0be460b147321b7455247aedca81ca819702959d/submodules/ImageContentAnalysis/Sources/ImageContentAnalysis.swift
// swiftlint:enable line_length
//

import Vision
import SwiftUI
Expand Down
35 changes: 0 additions & 35 deletions HanamiTests/HanamiTests.swift

This file was deleted.

0 comments on commit 56abebe

Please sign in to comment.