From fa7308fdd9ea317365d4bf68dbc9cfa484aa3883 Mon Sep 17 00:00:00 2001 From: Arthur Sabintsev Date: Thu, 2 Jun 2022 00:01:53 -0400 Subject: [PATCH] Fixed swiftlint issues --- .swiftlint.yml | 6 +-- .../Supporting Files/ViewController.swift | 1 - Example/Tests/SirenTests.swift | 48 +++++++++---------- 3 files changed, 25 insertions(+), 30 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 6a4796ed..5affe324 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -2,14 +2,12 @@ reporter: "xcode" included: - ../Sources/ + - Example/Tests/ disabled_rules: - cyclomatic_complexity - identifier_name + - file_length - line_length - nesting - unused_optional_binding - -# Specialized Rules -file_length: - - 500 diff --git a/Example/Example/Supporting Files/ViewController.swift b/Example/Example/Supporting Files/ViewController.swift index aad7a952..710b876d 100755 --- a/Example/Example/Supporting Files/ViewController.swift +++ b/Example/Example/Supporting Files/ViewController.swift @@ -21,4 +21,3 @@ class ViewController: UIViewController { } } - diff --git a/Example/Tests/SirenTests.swift b/Example/Tests/SirenTests.swift index b077e41b..a7f8b41a 100644 --- a/Example/Tests/SirenTests.swift +++ b/Example/Tests/SirenTests.swift @@ -18,11 +18,9 @@ final class SirenTests: XCTestCase { // MARK: - API extension SirenTests { - func testAPIDefaultsToUnitedStatesAppStore() { XCTAssertEqual(siren.apiManager.country, AppStoreCountry.unitedStates) } - } // MARK: - Updates @@ -353,19 +351,19 @@ extension SirenTests { // Update XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Update") } - + func testGreekLocalization() { let language: Localization.Language = .greek // Update Available XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Διαθέσιμη Ενημέρωση") - + // Next time XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Άλλη φορά") - + // Skip this version XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Αγνόησε αυτήν την έκδοση") - + // Update XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Αναβάθμιση") } @@ -535,49 +533,49 @@ extension SirenTests { // Update Available XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "بروزرسانی در دسترس") - + // Next time XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "دفعه بعد") - + // Skip this version XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "رد این نسخه") - + // Update XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "بروزرسانی") } - + func testPersianAfghanistanLocalization() { let language: Localization.Language = .persianAfghanistan - + // Update Available XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "بروزرسانی در دسترس") - + // Next time XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "دگر بار") - + // Skip this version XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "رد این نسخه") - + // Update XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "بروزرسانی") } - + func testPersianIranLocalization() { let language: Localization.Language = .persianIran // Update Available XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "بروزرسانی در دسترس") - + // Next time XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "دفعه بعد") - + // Skip this version XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "رد این نسخه") - + // Update XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "بروزرسانی") } - + func testPolishLocalization() { let language: Localization.Language = .polish @@ -775,17 +773,17 @@ extension SirenTests { // Update Available XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Доступне Оновлення") - + // Next time XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Наступного разу") - + // Skip this version XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Пропустити версію") - + // Update XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Оновити") } - + func testUrduLocalization() { let language: Localization.Language = .urdu @@ -801,7 +799,7 @@ extension SirenTests { // Update XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "اپڈیٹ کریں") } - + func testVietnameseLocalization() { let language: Localization.Language = .vietnamese @@ -817,5 +815,5 @@ extension SirenTests { // Update XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Cập nhật") } - + }