Skip to content

Commit

Permalink
Fixed swiftlint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtSabintsev committed Jun 2, 2022
1 parent f7568b6 commit fa7308f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 30 deletions.
6 changes: 2 additions & 4 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion Example/Example/Supporting Files/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ class ViewController: UIViewController {
}

}

48 changes: 23 additions & 25 deletions Example/Tests/SirenTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ final class SirenTests: XCTestCase {
// MARK: - API

extension SirenTests {

func testAPIDefaultsToUnitedStatesAppStore() {
XCTAssertEqual(siren.apiManager.country, AppStoreCountry.unitedStates)
}

}

// MARK: - Updates
Expand Down Expand Up @@ -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), "Αναβάθμιση")
}
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -801,7 +799,7 @@ extension SirenTests {
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "اپڈیٹ کریں")
}

func testVietnameseLocalization() {
let language: Localization.Language = .vietnamese

Expand All @@ -817,5 +815,5 @@ extension SirenTests {
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Cập nhật")
}

}

0 comments on commit fa7308f

Please sign in to comment.