Skip to content

Commit 4ed1389

Browse files
committed
Fix additional linting issues.
1 parent 0fa877f commit 4ed1389

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

.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
@@ -595,7 +595,7 @@ public enum Device {
595595
/// - parameter identifier: The device identifier, e.g. "iPhone7,1". Can be obtained from `Device.identifier`.
596596
///
597597
/// - returns: An initialized `Device`.
598-
public static func mapToDevice(identifier: String) -> Device { // swiftlint:disable:this cyclomatic_complexity function_body_length
598+
public static func mapToDevice(identifier: String) -> Device {
599599
#if os(iOS)
600600
switch identifier {
601601
case "iPod5,1": return iPodTouch5

Source/Device.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ public enum Device {
441441
/// - parameter identifier: The device identifier, e.g. "iPhone7,1". Can be obtained from `Device.identifier`.
442442
///
443443
/// - returns: An initialized `Device`.
444-
public static func mapToDevice(identifier: String) -> Device { // swiftlint:disable:this cyclomatic_complexity function_body_length
444+
public static func mapToDevice(identifier: String) -> Device {
445445
#if os(iOS)
446446
switch identifier {
447447
% for device in iOSDevices:

Tests/Tests.swift

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

159-
func testMapFromIdentifier() { // swiftlint:disable:this function_body_length
159+
func testMapFromIdentifier() {
160160
XCTAssertEqual(Device.mapToDevice(identifier: "iPod5,1"), .iPodTouch5)
161161
XCTAssertEqual(Device.mapToDevice(identifier: "iPod7,1"), .iPodTouch6)
162162
XCTAssertEqual(Device.mapToDevice(identifier: "iPhone3,1"), .iPhone4)

0 commit comments

Comments
 (0)