Fix lint issues.

This commit is contained in:
Brent Simmons 2025-01-23 21:04:27 -08:00
parent dd885d1743
commit 492bdbdf51
8 changed files with 12 additions and 11 deletions

View File

@ -14,3 +14,5 @@ disabled_rules:
excluded:
- Modules/Secrets/Sources/Secrets/SecretKey.swift
- Modules/Account/Tests/AccountTests/Feedly/
- Widget/Resources/Localized.swift

View File

@ -370,7 +370,7 @@
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
"NetNewsWire-iOSTests/Info.plist",
"NetNewsWire-iOSTests/NetNewsWire_iOSTests.swift",
"NetNewsWire-iOSTests/NetNewsWire-iOSTests.swift",
NetNewsWireTests/Info.plist,
);
target = 849C64701ED37A5D003D8FC0 /* NetNewsWireTests */;
@ -378,7 +378,7 @@
84C1EB962CDFE31700C7456A /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
"NetNewsWire-iOSTests/NetNewsWire_iOSTests.swift",
"NetNewsWire-iOSTests/NetNewsWire-iOSTests.swift",
);
target = 518B2ED12351B3DD00400001 /* NetNewsWire-iOSTests */;
};

View File

@ -10,5 +10,6 @@ import Foundation
struct Constants {
// swiftlint:disable:next line_length
static let prototypeText = "You are about to being reading Italo Calvinos new novel, *If on a winters night a traveler*. Relax. Concentrate. Dispel every other thought. Let the world around you fade. Best to close the door; the TV is always on in the next room. Tell the others right away, “No, I dont want to watch TV!” Raise your voice—they wont hear you otherwise—“Im reading! I dont want to be disturbed!” Maybe they havent heard you, with all that racket; speak louder, yell: “Im beginning to read Italo Calvinos new novel!” Or if you prefer, dont say anything; just hope theyll leave you alone. Find the most comfortable position: seated, stretched out, curled up, or lying flat. Flat on your back, on your side, on your stomach. In an easy chair, on the sofa, in the rocker, the deck chair, on the hassock. In the hammock, if you have a hammock. On top of your bed, of course, or in the bed. You can even stand on your hands, head down, in the yoga position. With the book upside down, naturally."
}

View File

@ -17,6 +17,7 @@ final class ExtensionContainersFile {
private static var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "extensionContainersFile")
private static var filePath: String = {
// swiftlint:disable:next force_cast
let appGroup = Bundle.main.object(forInfoDictionaryKey: "AppGroup") as! String
let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroup)
return containerURL!.appendingPathComponent("extension_containers.plist").path

View File

@ -15,6 +15,7 @@ final class ExtensionFeedAddRequestFile: NSObject, NSFilePresenter {
private static var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "extensionFeedAddRequestFile")
private static var filePath: String = {
// swiftlint:disable:next force_cast
let appGroup = Bundle.main.object(forInfoDictionaryKey: "AppGroup") as! String
let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroup)
return containerURL!.appendingPathComponent("extension_feed_add_request.plist").path

View File

@ -143,11 +143,7 @@ private extension FeedTreeControllerDelegate {
}
func nodeInArrayRepresentingObject(_ nodes: [Node], _ representedObject: AnyObject) -> Node? {
for oneNode in nodes {
if oneNode.representedObject === representedObject {
return oneNode
}
}
return nil
nodes.first { $0.representedObject === representedObject }
}
}

View File

@ -1,5 +1,5 @@
//
// NetNewsWire_iOSTests.swift
// NetNewsWire-iOSTests.swift
// NetNewsWire-iOSTests
//
// Created by Brent Simmons on 2/5/18.
@ -8,7 +8,7 @@
import XCTest
class NetNewsWire_iOSTests: XCTestCase {
class NetNewsWire-iOSTests: XCTestCase {
func testExample() {
// This is an example of a functional test case.

View File

@ -34,7 +34,7 @@ extension NSAppleEventDescriptor {
var usrfDictionary: [String: NSAppleEventDescriptor] = [:]
var processedItems = 0
while processedItems < listCount {
processedItems = processedItems + 2
processedItems += 2
guard let nthlabel = usrfList.atIndex(processedItems-1) else {
print("usrfDictionary() couldn't get item \(processedItems+1) in usrf list")
continue