Skip to content

Commit 6920593

Browse files
committed
Fix additional linting issues.
1 parent 2700344 commit 6920593

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

.swiftlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ disabled_rules:
55
- type_body_length
66
- identifier_name
77
- trailing_comma
8+
- function_body_length
89

910
opt_in_rules:
1011
- anyobject_protocol

Source/Device.generated.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ public enum Device {
623623
/// - parameter identifier: The device identifier, e.g. "iPhone7,1". Can be obtained from `Device.identifier`.
624624
///
625625
/// - returns: An initialized `Device`.
626-
public static func mapToDevice(identifier: String) -> Device { // swiftlint:disable:this cyclomatic_complexity function_body_length
626+
public static func mapToDevice(identifier: String) -> Device {
627627
#if os(iOS)
628628
switch identifier {
629629
case "iPod5,1": return iPodTouch5

Source/Device.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ public enum Device {
458458
/// - parameter identifier: The device identifier, e.g. "iPhone7,1". Can be obtained from `Device.identifier`.
459459
///
460460
/// - returns: An initialized `Device`.
461-
public static func mapToDevice(identifier: String) -> Device { // swiftlint:disable:this cyclomatic_complexity function_body_length
461+
public static func mapToDevice(identifier: String) -> Device {
462462
#if os(iOS)
463463
switch identifier {
464464
% for device in iOSDevices:

Tests/Tests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class DeviceKitTests: XCTestCase {
165165
XCTAssertTrue(Device.BatteryState.unplugged(2) > Device.BatteryState.charging(1))
166166
}
167167

168-
func testMapFromIdentifier() { // swiftlint:disable:this function_body_length
168+
func testMapFromIdentifier() {
169169
XCTAssertEqual(Device.mapToDevice(identifier: "iPod5,1"), .iPodTouch5)
170170
XCTAssertEqual(Device.mapToDevice(identifier: "iPod7,1"), .iPodTouch6)
171171
XCTAssertEqual(Device.mapToDevice(identifier: "iPhone3,1"), .iPhone4)

0 commit comments

Comments
 (0)