Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Cut the comments that only repeat what the tests and names say

Țugui Dragoș77c788e37e24
diff --git a/Packages/PeelCore/Sources/PeelCore/Removal/RemovalTotals.swift b/Packages/PeelCore/Sources/PeelCore/Removal/RemovalTotals.swift
index 9185425c..85088096 100644
--- a/Packages/PeelCore/Sources/PeelCore/Removal/RemovalTotals.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Removal/RemovalTotals.swift
@@ -53,7 +53,6 @@ public struct RemovalTotals: Sendable, Equatable, Codable {
}
}
- /// Counts `count` more removals History left out.
mutating func countNoLongerListed(_ count: Int) {
removalsLeftOut = noLongerListed.addingCapped(count)
}
diff --git a/Packages/PeelCore/Sources/PeelCore/Space/CloudStorage.swift b/Packages/PeelCore/Sources/PeelCore/Space/CloudStorage.swift
index 8a24dbea..3757904d 100644
--- a/Packages/PeelCore/Sources/PeelCore/Space/CloudStorage.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Space/CloudStorage.swift
@@ -22,7 +22,6 @@ public struct CloudFile: Sendable, Hashable, Identifiable {
public var id: URL { url }
- /// Whether Select Recommended takes it.
public var isRecommended: Bool {
!isDesktopPicture && heldBack == nil
}
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/BackgroundItemActionsTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/BackgroundItemActionsTests.swift
index b9db1db2..b7cb7d4d 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/BackgroundItemActionsTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/BackgroundItemActionsTests.swift
@@ -27,8 +27,6 @@ struct BackgroundItemActionsTests {
#expect(try !#require(JobDefinition(["Label": "a"])).loadsInTheBackground)
}
- /// The tab says what runs in the background: a job of an app the person excluded is listed, marked so, and Peel
- /// acts on none of it.
@Test func listsAnExcludedAppsJobWithoutActingOnIt() {
func job(_ label: String, owner: String) -> BackgroundItem {
BackgroundItem(
@@ -120,8 +118,6 @@ struct BackgroundItemActionsTests {
#expect(!present.isLeftByAGoneApp)
}
- /// A job its app gave launchd itself, as Squirrel's ShipIt is, is told apart from one the app registered with
- /// ServiceManagement, whose switch is in System Settings.
@Test func knowsAJobItsAppGaveLaunchdItself() throws {
func item(_ details: Launchctl.JobDetails) throws -> BackgroundItem {
let found = BackgroundItems.undeclaredItem(
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/CleanupTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/CleanupTests.swift
index de7ac283..73ef7db9 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/CleanupTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/CleanupTests.swift
@@ -41,8 +41,6 @@ struct CleanupTests {
#expect(plan.total.known == 20)
}
- /// A removal History couldn't keep is refused before anything moves, naming how many items it keeps at once, and
- /// a dry run says so.
@Test func refusesARemovalHistoryCouldNotKeep() async throws {
let directory = try TemporaryDirectory()
let service = try service(in: directory)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/CloudStorageTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/CloudStorageTests.swift
index 178a8a0c..f0d09059 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/CloudStorageTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/CloudStorageTests.swift
@@ -195,9 +195,6 @@ struct CloudStorageTests {
#expect(sizes["clone.bin"] == nil, "a clone frees nothing")
}
- /// Keep Downloaded keeps a file, or every file in a folder, on this Mac whatever happens, and iCloud downloads it
- /// again once its download is removed: such a file is listed and held back. Only FileProvider sets the mark, so
- /// the test says which items carry it.
@Test func holdsBackWhatKeepDownloadedKeepsOnThisMac() throws {
let directory = try TemporaryDirectory()
let drive = "Library/Mobile Documents/com~apple~CloudDocs"
@@ -221,8 +218,6 @@ struct CloudStorageTests {
#expect(collector.collected.files.filter(\.isRecommended).map(\.name) == ["a.pdf"])
}
- /// What an app keeps in its own iCloud folder is listed and not recommended: Finder may not show it, and the app
- /// may expect to find it on this Mac. Only what is in iCloud Drive itself is.
@Test func recommendsOnlyWhatIsInICloudDriveItself() throws {
let directory = try TemporaryDirectory()
try directory.file("Library/Mobile Documents/com~apple~CloudDocs/Report.pdf", bytes: 2_000)
@@ -239,8 +234,6 @@ struct CloudStorageTests {
#expect(held["notes.db"] == .inAnAppsICloudFolder)
}
- /// A password database or a wallet's keys, once its download is removed, opens again only with an internet
- /// connection: it is listed and not recommended, and so is every file in a wallet's folder.
@Test func holdsBackPasswordsAndWalletsItWouldTakeOffline() throws {
let directory = try TemporaryDirectory()
let drive = "Library/Mobile Documents/com~apple~CloudDocs"
@@ -261,8 +254,6 @@ struct CloudStorageTests {
#expect(held["prices.csv"] == .some(nil))
}
- /// Without the folder iCloud keeps in the home, iCloud Drive was never set up for this account, which the page
- /// says rather than that nothing was found.
@Test func saysWhenICloudDriveIsNotSetUp() async throws {
let directory = try TemporaryDirectory()
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
index 2e5bbd53..484eee48 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
@@ -528,8 +528,6 @@ struct DeveloperCachesTests {
#expect(chat.locations.map(\.url.lastPathComponent) == ["GPUCache"])
}
- /// Homebrew's cache, moved by `HOMEBREW_CACHE`, is found where it went by the names Homebrew gives its folders
- /// there, and only where Homebrew keeps its definitions: the setting can name any folder.
@Test func findsHomebrewsCacheWhereItsSettingsMoveIt() async throws {
let directory = try TemporaryDirectory()
let home = directory.url.appending(path: "home", directoryHint: .isDirectory)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift
index c71b1ea0..83514ed6 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift
@@ -189,9 +189,6 @@ struct DuplicateFinderTests {
#expect(result.groups.allSatisfy { !$0.holdsASyncedCopy })
}
- /// Copies with the same bytes are duplicates whatever their Finder tags or resource fork. Moving a copy takes
- /// them with it, so a copy with what the others lack stays and the others may all go. Folders that differ in
- /// them still aren't copies of each other, since a folder moves whole.
@Test func aCopyWithTagsOrAForkTheOthersLackStays() async throws {
let directory = try TemporaryDirectory()
let contract = randomData(count: 4_000)
@@ -229,8 +226,6 @@ struct DuplicateFinderTests {
#expect(result.folderGroups.isEmpty)
}
- /// The Finder keeps a comment in the copy's extended attributes, so it goes with the copy, as tags do. Copies
- /// that each have something the others lack all stay, so nothing could go and they aren't listed.
@Test func aCopyWithAFinderCommentTheOthersLackStays() async throws {
let directory = try TemporaryDirectory()
let report = randomData(count: 4_000)
@@ -357,8 +352,6 @@ struct DuplicateFinderTests {
#expect(inside.groups.isEmpty, "a folder inside a repository was scanned")
}
- /// A copy in iCloud Drive or a cloud's File Provider folder syncs through that cloud, and one a sync app keeps in
- /// step, such as Syncthing, through that app: the row's symbol says which.
@Test func tellsACloudFromASyncApp() async throws {
let directory = try TemporaryDirectory()
let contents = randomData(count: 3_000)
@@ -738,8 +731,6 @@ struct DuplicateFinderTests {
}
}
- /// The copy on the disk the home folder is on is kept before an older one on another disk, such as photos that
- /// were on a card before they were on the Mac.
@Test func keepsTheCopyOnTheHomeDisk() async throws {
let directory = try TemporaryDirectory()
let home = directory.url.appending(path: "home", directoryHint: .isDirectory)
@@ -772,8 +763,6 @@ struct DuplicateFinderTests {
#expect(kept(files.groups.first?.files.first?.url) == kept(onTheMac))
}
- /// Select Recommended and Deselect All change only the groups they are asked about, which a search narrows:
- /// what is selected in the others stays.
@Test func selectsWhatItRecommendsOnlyInTheGroupsShown() async throws {
let directory = try TemporaryDirectory()
let first = randomData(count: 4_000)
@@ -810,9 +799,6 @@ struct DuplicateFinderTests {
await #expect(throws: CancellationError.self) { try await task.value }
}
- /// A file that may share blocks with a clone frees only its private size. Any other frees every block it takes,
- /// since what a snapshot keeps of it comes back once macOS deletes the snapshot. A snapshot can't be made in a
- /// test, so the rule is asked with what `getattrlist(2)` would say of such a file.
@Test func aFileThatSharesNoBlockFreesEveryBlockItTakes() {
let freed = { (privateSize: Int64?, mayBeShared: Bool?, isCompressed: Bool) in
ReclaimableSpace.freed(
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/ExclusionsTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/ExclusionsTests.swift
index 6514dd09..7e9df290 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/ExclusionsTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/ExclusionsTests.swift
@@ -596,7 +596,6 @@ struct ExclusionsReachEveryScannerTests {
#expect(artifacts.isEmpty)
}
- /// An app excluded by identifier takes its background items with it: they are not listed, so not stopped.
/// Background Items says what runs, so an excluded app's jobs stay listed there, and Peel acts on none of them.
@Test func theBackgroundItemsOfAnExcludedAppAreListedAndLeftAlone() async throws {
let directory = try TemporaryDirectory()
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/FileCommandTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/FileCommandTests.swift
index 9d466cc0..41f10446 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/FileCommandTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/FileCommandTests.swift
@@ -532,8 +532,6 @@ struct FileCommandTests {
}
- /// A copy with tags the others lack stays and keeps the bytes for them, so no copy is marked "keep" and every
- /// other one moves; the JSON names it under stays.
@Test func movesEveryOtherCopyWhenOneStaysForWhatTheOthersLack() async throws {
let directory = try TemporaryDirectory()
let logs = logs(in: directory)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/FileSearchTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/FileSearchTests.swift
index 9aecfb75..667205b1 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/FileSearchTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/FileSearchTests.swift
@@ -325,10 +325,6 @@ struct FileSearchTests {
#expect(results.leftOut == [.protected: 1])
}
- /// The guard is asked only about the files that can make the list: the largest first, and no further once
- /// the list is full and one more file shows it had to be cut.
- /// A file's size is what moving it frees, never its length, and the list goes by it: two clones keep the same
- /// blocks, so moving either frees nothing while the other stays.
@Test func sizesEachFileByWhatMovingItFrees() throws {
let directory = try TemporaryDirectory()
let home = directory.url.appending(path: "home", directoryHint: .isDirectory)
@@ -354,8 +350,6 @@ struct FileSearchTests {
#expect(results.files.first?.url.lastPathComponent == "small.mov")
}
- /// A file in a repository may be part of a project's work, and one in /Users/Shared another account's: both are
- /// listed and held back, never recommended.
@Test func holdsBackWhatIsInARepositoryOrShared() throws {
let directory = try TemporaryDirectory()
let home = directory.url.appending(path: "home", directoryHint: .isDirectory)
@@ -378,6 +372,8 @@ struct FileSearchTests {
#expect(held["Movies"] == .some(nil))
}
+ /// The guard is asked only about the files that can make the list: the largest first, and no further once
+ /// the list is full and one more file shows it had to be cut.
@Test func asksTheGuardOnlyAboutFilesThatCanMakeTheList() throws {
let directory = try TemporaryDirectory()
let home = directory.url.appending(path: "home", directoryHint: .isDirectory)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/HistoryCommandTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/HistoryCommandTests.swift
index 804b1797..addd1485 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/HistoryCommandTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/HistoryCommandTests.swift
@@ -241,8 +241,6 @@ struct HistoryCommandTests {
#expect(try listed(try await printed(["history", "--refused", "--json"], from: logs)).isEmpty)
}
- /// A list that reaches History's oldest removal says how many older removals History no longer lists, in the
- /// table and in `--json` alike; one that `--limit` cuts short doesn't.
@Test func saysWhatHistoryNoLongerListsWhereTheListEnds() async throws {
let directory = try TemporaryDirectory()
let removals = RemovalLog(url: directory.url.appending(path: "Peel/removals.json"), flush: { _ in true }, readLimit: 4_096)
@@ -272,7 +270,6 @@ struct HistoryCommandTests {
#expect(try await noted(["history", "--limit", "\(listed - 1)"], from: logs).isEmpty)
}
- /// A History emptied by Put Back or Forget is not called one Peel never wrote to.
@Test func anEmptiedHistoryIsNotCalledNeverUsed() async throws {
let directory = try TemporaryDirectory()
let logs = logs(in: directory)
@@ -282,8 +279,6 @@ struct HistoryCommandTests {
#expect(try await printed(["history"], from: logs) == "History lists no removals.\n")
}
- /// The list of what moved says how many removals also left items where they were, which `--refused` lists; a
- /// list that `--limit` cuts short counts only those since its oldest removal.
@Test func saysHowManyRemovalsAlsoHaveItemsThatStayed() async throws {
let directory = try TemporaryDirectory()
let logs = logs(in: directory)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/InstallersTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/InstallersTests.swift
index e3809907..a7c73ec8 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/InstallersTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/InstallersTests.swift
@@ -215,7 +215,6 @@ struct InstallersTests {
== Set([copied, photos, backup, secrets].map { PathPattern.comparablePath(of: $0) }))
}
- /// An installer that arrived in its folder or changed in the last hour may be the one being installed from now.
@Test func holdsBackAnInstallerThatJustArrived() async throws {
let directory = try TemporaryDirectory()
let fresh = try directory.file("Downloads/Fresh-1.dmg", bytes: 400_000)
@@ -579,7 +578,6 @@ struct InstallersTests {
#expect(items["com.apple.finder.ShipIt"]?.heldBack == .appIsRunning)
}
- /// An excluded app's downloaded update stays with the app, as its caches do, whatever the updater named its folder.
@Test func leavesOutWhatAnExcludedAppDownloaded() async throws {
let directory = try TemporaryDirectory()
let caches = "Library/Caches"
@@ -678,8 +676,6 @@ struct InstallersTests {
#expect(scan.items(in: .firmware).map(\.name) == ["iPhone17,1_26.1.ipsw"])
}
- /// A macOS installer is found in every folder Peel reads apps from, and one from before macOS Sierra by the name
- /// Apple gave it then.
@Test func findsMacOSInstallersWhereverThePersonKeepsApps() async throws {
let directory = try TemporaryDirectory()
let home = directory.url.appending(path: "home", directoryHint: .isDirectory)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/MovableTotalTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/MovableTotalTests.swift
index e2517bfd..4f7db489 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/MovableTotalTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/MovableTotalTests.swift
@@ -20,7 +20,6 @@ struct MovableTotalTests {
#expect(group.movable(canUseHelper: true) == SizeTotal(known: 10, isComplete: true))
}
- /// What only the helper can move counts while the helper can act, as the bar beside the total counts it.
@Test func whatOnlyTheHelperMovesCountsOnlyWhileItCanAct() {
let cache = OrphanItem(
url: URL(filePath: "/Users/x/Library/Caches/org.example.gone"), kind: .caches, size: 10,
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift
index 0ab5a575..3656ade6 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift
@@ -1239,7 +1239,6 @@ struct OrphanScannerTests {
#expect(Set(scan.groups.flatMap(\.items).map(\.url.lastPathComponent)) == ["Gone.vst3", "Gone Reverb.component"])
}
- /// Music apps still load a gone app's audio plug-in on their own, so its group is unsure, and the item says why.
@Test func aGoneAppsAudioPlugInMakesItsGroupUnsure() async throws {
let directory = try TemporaryDirectory()
let info = #"<?xml version="1.0" encoding="UTF-8"?><plist version="1.0"><dict><key>CFBundleIdentifier</key><string>com.gonevendor.gone.vst3</string></dict></plist>"#
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/PluginsTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/PluginsTests.swift
index 0b64ca37..2d54732d 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/PluginsTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/PluginsTests.swift
@@ -65,8 +65,6 @@ struct PluginsTests {
#expect(plugins.first { $0.name == "Own" }?.staysInTheTrash == false)
}
- /// A plug-in's page says which app it came with, by Orphaned Files' rule: an installed app its declared identifier
- /// names, one whose name a plug-in that declares none carries, or else an app Peel saw go.
@Test func saysWhichAppAPlugInCameWith() {
let surge = InstalledApp(
url: URL(filePath: "/Applications/Surge XT.app"), bundleIdentifier: "org.example.surgext", name: "Surge XT"
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/ProjectArtifactsTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/ProjectArtifactsTests.swift
index b46e5669..9d6e9332 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/ProjectArtifactsTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/ProjectArtifactsTests.swift
@@ -1163,8 +1163,6 @@ struct ProjectArtifactsTests {
#expect(ProjectArtifacts.BackupMarks(found, excluded: [], excludedFromAbove: []).markable.isEmpty)
}
- /// Beside a Python project's own file, a folder holding `pyvenv.cfg` is an environment whatever it is called, as
- /// `.venv` and `venv` are: listed with the installed packages and never selected.
@Test func aPythonEnvironmentBesideItsProjectIsOneWhateverItIsCalled() async throws {
let directory = try TemporaryDirectory()
try directory.file("Projects/api/requirements.txt", bytes: 16)
@@ -1228,7 +1226,6 @@ struct ProjectArtifactsTests {
#expect(!pods.isRecommended)
}
- /// An index that takes longer than its budget to read says so, rather than that it couldn't be read.
@Test func whatGitTracksIsNotKnownYetWhileItsIndexTakesTooLong() async throws {
let directory = try TemporaryDirectory()
let git = try await GitFixture(home: directory.url.appending(path: "home"))
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/RemovalHistoryTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/RemovalHistoryTests.swift
index 5a2b0b9b..41b157eb 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/RemovalHistoryTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/RemovalHistoryTests.swift
@@ -392,8 +392,6 @@ struct RemovalHistoryTests {
#expect(!batches.contains(removals[0]), "the oldest removal was kept past the limit")
}
- /// History counts the removals it leaves out to stay within what it reads back, so it can say what it no
- /// longer lists.
@Test func countsTheRemovalsItLeavesOut() async throws {
let directory = try TemporaryDirectory()
let url = directory.url.appending(path: "Peel/removals.json")
@@ -458,8 +456,6 @@ struct RemovalHistoryTests {
#expect(outcome.records?.count == records.count, "the batch lost its tail")
}
- /// One removal holds at most what History can keep and read back: `maximumRecords` items, fewer when their paths
- /// are long. A record is never reckoned smaller than History writes it.
@Test func tellsHowManyItemsOneRemovalCanHold() throws {
let short = (0...RemovalLog.maximumRecords).map { URL(filePath: "/Users/me/Library/Caches/org.example.app\($0)") }
let deep = String(repeating: "書類フォルダ/", count: 50)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/RemovalJournalTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/RemovalJournalTests.swift
index 57301b89..1ed09f2f 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/RemovalJournalTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/RemovalJournalTests.swift
@@ -59,8 +59,6 @@ struct RemovalJournalTests {
#expect(journal.entries().isEmpty)
}
- /// A removal of several parts that stops after a part moved and before it was recorded is still one entry: what
- /// the part left in the journal joins the removal under the part's own name.
@Test func aPassStoppedBetweenPartsStaysOneRemoval() async throws {
let directory = try TemporaryDirectory()
let history = directory.url.appending(path: "Peel/removals.json")
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/RemovalTotalsTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/RemovalTotalsTests.swift
index ee47598d..3047cc93 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/RemovalTotalsTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/RemovalTotalsTests.swift
@@ -149,7 +149,6 @@ struct RemovalTotalsTests {
#expect(kept.contains { $0.hasPrefix("totals-damaged-") })
}
- /// Totals written before History counted the removals it leaves out are read as they were.
@Test func readsTotalsWrittenBeforeHistoryCountedWhatItLeftOut() throws {
let directory = try TemporaryDirectory()
let history = directory.url.appending(path: "Peel/removals.json")
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/SearchingTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/SearchingTests.swift
index 048f1abb..fdddc8cf 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/SearchingTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/SearchingTests.swift
@@ -143,8 +143,6 @@ struct SearchingTests {
#expect(result.failures.map(\.reason) == [.changedSinceScan])
}
- /// A selected file a new search leaves out stays selected apart, as the search found it, until it is deselected
- /// or gone from the disk.
@Test func keepsWhatANewSearchLeavesOutSelectedApart() throws {
let directory = try TemporaryDirectory()
let a = try directory.file("a.dmg")
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/ToolSettingsTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/ToolSettingsTests.swift
index 55decbb9..2315755f 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/ToolSettingsTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/ToolSettingsTests.swift
@@ -172,9 +172,6 @@ struct ToolSettingsTests {
#expect(left.inside(home.appending(path: "Library/Caches", directoryHint: .isDirectory)).contains(["npm"]))
}
- /// `bin/brew` reads the system's file, its prefix's, then the person's, the last line that sets a variable
- /// winning, and the system's once more when it says so. Each prefix and each place the person's file may be in
- /// gives a place, and a value names one only as an absolute path, since Homebrew takes it as written.
@Test func findsHomebrewsCacheWhereItsSettingsFilesMoveIt() throws {
let directory = try TemporaryDirectory()
let home = directory.url.appending(path: "home", directoryHint: .isDirectory)
@@ -197,7 +194,6 @@ struct ToolSettingsTests {
#expect(caches().isEmpty, "a value taken as written names no place")
}
- /// Space leaves to Developer the folder Homebrew's settings for everyone moved its cache into.
@Test func spaceLeavesToDeveloperHomebrewsCacheMovedIntoItsCaches() throws {
let directory = try TemporaryDirectory()
let home = directory.url.appending(path: "home", directoryHint: .isDirectory)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/UninstallationTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/UninstallationTests.swift
index 1b270dbd..a824f4cb 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/UninstallationTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/UninstallationTests.swift
@@ -181,8 +181,6 @@ struct UninstallationTests {
#expect(!plan.selectable(canUseHelper: true).contains(leftover.url))
}
- /// Music apps and other hosts load an audio plug-in on their own, so an uninstall lists it unselected, and a click
- /// still selects it.
@Test func holdsBackAnAudioPlugInOtherAppsLoad() async throws {
let directory = try TemporaryDirectory()
let app = InstalledApp(
diff --git a/Peel/Model/CloudLibrary.swift b/Peel/Model/CloudLibrary.swift
index 70a06cfe..2bd372eb 100644
--- a/Peel/Model/CloudLibrary.swift
+++ b/Peel/Model/CloudLibrary.swift
@@ -33,7 +33,6 @@ final class CloudLibrary {
private(set) var couldNotRead = false
/// The downloads left out because another copy on this Mac shares their space, so removing them frees nothing.
private(set) var sharedDownloads = 0
- /// iCloud Drive was never set up for this account.
private(set) var isNotSetUp = false
var selectedURLs: Set<URL> = [] {
didSet { updateSelectedSize() }
diff --git a/Peel/Model/FileSearchLibrary.swift b/Peel/Model/FileSearchLibrary.swift
index 24221bce..c51cc947 100644
--- a/Peel/Model/FileSearchLibrary.swift
+++ b/Peel/Model/FileSearchLibrary.swift
@@ -95,7 +95,6 @@ final class FileSearchLibrary {
keepsWhatIsOutside = true
}
- /// Deselects the files no longer listed.
func deselectWhatIsOutside() {
let outside = selection.outside.keys
selectedURLs = selection.deselectOutside(from: selectedURLs)
diff --git a/PeelTests/CloudNotesTests.swift b/PeelTests/CloudNotesTests.swift
index 9bc79f3a..15ccfb2b 100644
--- a/PeelTests/CloudNotesTests.swift
+++ b/PeelTests/CloudNotesTests.swift
@@ -11,7 +11,6 @@ struct CloudNotesTests {
)
}
- /// The note column is on while a listed download has a note, so the note is drawn beside its row.
@Test func showsTheNoteColumnWhileARowHasANote() {
var picture = Self.download("Beach.heic")
picture.isDesktopPicture = true
diff --git a/PeelTests/FileSearchLibraryTests.swift b/PeelTests/FileSearchLibraryTests.swift
index 3c87df46..e10058f1 100644
--- a/PeelTests/FileSearchLibraryTests.swift
+++ b/PeelTests/FileSearchLibraryTests.swift
@@ -61,7 +61,6 @@ struct FileSearchLibraryTests {
#expect(library.selectedURLs == [invoice])
}
- /// A selected file a newer search leaves out stays selected, and moves with the rest, until it is deselected.
@Test func keepsSelectedWhatANewerSearchLeavesOut() async throws {
let folder = FileManager.default.temporaryDirectory.appending(path: "PeelTests-\(UUID().uuidString)")
try FileManager.default.createDirectory(at: folder, withIntermediateDirectories: true)
diff --git a/PeelTests/RemovalBarTests.swift b/PeelTests/RemovalBarTests.swift
index 2c893b24..7f8c43bb 100644
--- a/PeelTests/RemovalBarTests.swift
+++ b/PeelTests/RemovalBarTests.swift
@@ -26,7 +26,6 @@ struct RemovalBarTests {
#expect(RemovalBar.lines(for: parts(most)).count == most)
}
- /// A selection History couldn't keep in one removal is refused before Peel asks to move it.
@Test func refusesASelectionHistoryCouldNotKeep() {
let many = (0...RemovalLog.maximumRecords).map { URL(filePath: "/Users/me/Library/Caches/org.example.app\($0)") }
let selection = CarriedSelection.Part(
diff --git a/PeelTests/RemovalHistoryStoreTests.swift b/PeelTests/RemovalHistoryStoreTests.swift
index 15378487..49fba3e5 100644
--- a/PeelTests/RemovalHistoryStoreTests.swift
+++ b/PeelTests/RemovalHistoryStoreTests.swift
@@ -43,7 +43,6 @@ struct RemovalHistoryStoreTests {
#expect(history.undoTitle == nil, "Undo still offered what peel put back")
}
- /// History's page says once how many older removals History no longer lists, and again when it leaves out more.
@Test func saysOnceWhatHistoryNoLongerLists() async throws {
let folder = FileManager.default.temporaryDirectory.appending(path: "PeelTests-\(UUID().uuidString)")
defer { try? FileManager.default.removeItem(at: folder) }
@@ -80,7 +79,6 @@ struct RemovalHistoryStoreTests {
#expect(later.untoldNoLongerListed == 5)
}
- /// Nothing moves or comes back while Peel removes itself, since Remove Peel takes History and Peel's folder.
@Test func movesNothingWhilePeelRemovesItself() {
let folder = FileManager.default.temporaryDirectory.appending(path: "PeelTests-\(UUID().uuidString)")
defer { try? FileManager.default.removeItem(at: folder) }
diff --git a/PeelTests/SelectionCarrierTests.swift b/PeelTests/SelectionCarrierTests.swift
index ff4b30a9..f804a684 100644
--- a/PeelTests/SelectionCarrierTests.swift
+++ b/PeelTests/SelectionCarrierTests.swift
@@ -62,7 +62,6 @@ struct SelectionCarrierTests {
#expect(carrier.free(among: [part("chrome"), part("npm"), part("slack")]).map(\.page.scope) == ["npm"])
}
- /// Each part moves with the removal and the part it goes into in History, which the journal keeps with what moved.
@Test func movesEachPartAsPartOfTheRemovalHistoryRecords() async throws {
let folder = FileManager.default.temporaryDirectory.appending(path: "PeelTests-\(UUID().uuidString)")
defer { try? FileManager.default.removeItem(at: folder) }
diff --git a/PeelTests/SelfUninstallWayTests.swift b/PeelTests/SelfUninstallWayTests.swift
index 6f93efe0..7a8f3220 100644
--- a/PeelTests/SelfUninstallWayTests.swift
+++ b/PeelTests/SelfUninstallWayTests.swift
@@ -13,8 +13,6 @@ struct SelfUninstallWayTests {
#expect(SelfUninstall.way(cask: cask, homebrewKnowsItsApps: false) == .homebrew("brew uninstall --zap --cask peel"))
}
- /// Once Homebrew's reading ended without an answer, Remove Peel says why, as the Homebrew page does, rather than
- /// waiting for an answer that isn't coming.
@Test func saysWhyHomebrewDidntSayWhetherItInstalledThisCopy() {
#expect(
SelfUninstall.way(cask: nil, homebrewKnowsItsApps: false, unanswered: .readingFailed)
@@ -29,8 +27,6 @@ struct SelfUninstallWayTests {
#expect(!SelfUninstall.Way.removePeel.waitsForHomebrew)
}
- /// A Homebrew Peel doesn't run, the one chosen in Settings that can't be run or one where Homebrew installs itself
- /// that Peel refuses, says nothing of what it installed, so Remove Peel waits and says why.
@Test func waitsWhileThereIsAHomebrewPeelDoesNotRun() {
#expect(!HomebrewLibrary.knowsItsOwnApps(isInstalled: false, hasAnswered: false, isNotRun: true))
#expect(HomebrewLibrary.knowsItsOwnApps(isInstalled: false, hasAnswered: false, isNotRun: false))
diff --git a/PeelTests/ToolDefaultsTests.swift b/PeelTests/ToolDefaultsTests.swift
index 21f73e31..d9a4e3c3 100644
--- a/PeelTests/ToolDefaultsTests.swift
+++ b/PeelTests/ToolDefaultsTests.swift
@@ -3,7 +3,6 @@ import Foundation
import Testing
struct ToolDefaultsTests {
- /// iCloud Drive's page starts on only where iCloud Drive is set up, as Homebrew's does only with Homebrew.
@Test func showsICloudDriveByDefaultOnlyWhereItIsSetUp() {
#expect(Tool.cloud.isShownByDefault(homebrewIsInstalled: true, hasICloudDrive: true))
#expect(!Tool.cloud.isShownByDefault(homebrewIsInstalled: true, hasICloudDrive: false))