Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
Keep each new test's comment to one line
Țugui Dragoș8730215214d3
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swiftindex 556b769c..a96aa2e8 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift@@ -909,8 +909,7 @@ struct CommandLineTests {}}- /// The manual page leaves out the defaults `--help` marks, so each is said in words both show: an option's in- /// its own help, and a default subcommand's in the discussion of the command above it.+ /// The manual page drops what `--help` marks as a default, so each default is said in words both show.@Test func eachDefaultIsSaidWhereTheManualPageShowsIt() throws {func commands(under command: any ParsableCommand.Type) -> [any ParsableCommand.Type] {[command] + command.configuration.subcommands.flatMap { commands(under: $0) }diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swiftindex 22a2bab0..dc7f2a21 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift@@ -835,8 +835,7 @@ struct DeveloperCachesTests {#expect(byName["Notes 17.09.2026, 10.00.xcarchive"]?.kind == .archives)}- /// npm, Yarn, pnpm and Go each write where a cache moved into a configuration file of their own, with their- /// own `config set`; Developer reads those files, never runs a tool, and finds the cache there.+ /// Developer reads each tool's own configuration file, never runs the tool, and finds the cache it moved.@Test func findsTheCachesEachToolsOwnConfigurationMovedElsewhere() async throws {let directory = try TemporaryDirectory()let fast = directory.url.appending(path: "Fast", directoryHint: .isDirectory).path(percentEncoded: false)@@ -867,8 +866,7 @@ struct DeveloperCachesTests {])}- /// What a tool would read with its own environment (another variable, its working folder), or a folder that does- /// not show the tool's own mark, is no place Peel can name, so it is passed over.+ /// A path that needs the tool's own environment, or a folder without the tool's mark, names no place.@Test func aConfigurationThatNamesNoPlaceOfItsOwnMovesNothing() async throws {let directory = try TemporaryDirectory()let fast = directory.url.appending(path: "Fast", directoryHint: .isDirectory).path(percentEncoded: false)@@ -1443,8 +1441,7 @@ struct DeveloperCachesTests {}}- /// `glob` asked to limit itself stops at 128 paths on macOS, while Playwright leaves a folder in the temporary- /// folder for every run that ended early. Every pattern of the table finds all 200 of its matches here.+ /// Limited, `glob` stops at 128 paths, and Playwright alone leaves a folder for every run that ended early.@Test func eachPatternFindsEveryMatch() throws {let count = 200for definition in DeveloperCaches.definitions {@@ -1470,8 +1467,7 @@ struct DeveloperCachesTests {}}- /// A path `pattern` matches, made distinct by `number`: its first `*` holds the number or, with no `*`, its `?`- /// and bracket classes spell it digit by digit. Nil for a plain path, or when the classes can't spell that many.+ /// A path `pattern` matches, made distinct by `number`; nil when its classes cannot spell that many.private static func name(matching pattern: String, number: Int) -> String? {let pattern = pattern.hasSuffix("/") ? String(pattern.dropLast()) : patternguard pattern.contains(where: { "*?[".contains($0) }) else { return nil }diff --git a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swiftindex 7a824fe8..2eb1d5e3 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift@@ -385,8 +385,7 @@ struct LeftoverScannerTests {#expect(try #require(emptied.leftovers.first { $0.kind == .containers }).match.isRecommended)}- /// macOS keeps privileged helpers only in the Mac's own Library, so a folder by that name in the home's Library is- /// no place macOS knows: it is searched like any other folder at the top of a Library.+ /// macOS keeps privileged helpers only in the Mac's Library, so the home's folder by that name is searched.@Test func searchesAFolderTheHomesLibraryHasOnlyByAnotherLibrarysName() async throws {let directory = try TemporaryDirectory()try directory.file("home/Library/PrivilegedHelperTools/net.example.client.helper")@@ -398,8 +397,6 @@ struct LeftoverScannerTests {#expect(scan.leftovers.map(\.url.lastPathComponent) == ["net.example.client.helper"])}- /// At the top of a Library, what is skipped is what that Library searches as a place of its own, and nothing the- /// other Library alone searches.@Test func eachLibrarySkipsOnlyWhatItSearchesItself() throws {let directory = try TemporaryDirectory()let environment = environment(in: directory)diff --git a/Packages/PeelCore/Tests/PeelCoreTests/LineLengthTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/LineLengthTests.swiftindex 01d1d0f4..a526fd1d 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/LineLengthTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/LineLengthTests.swift@@ -9,8 +9,7 @@ struct LineLengthTests {static let folders = ["Peel", "PeelCLI", "PeelFinder", "PeelHelper", "PeelUITests", "Scripts", "Packages/PeelCore"]- /// A string is never split to make its line fit, so a sentence can still be found with a search: what counts is- /// the line without its string literals.+ /// What counts is a line without its string literals, so a sentence is never split and can be searched for.@Test func everyLineFitsIn120Columns() throws {var long: [String] = []for file in try Self.swiftFiles() {diff --git a/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swiftindex 3f279cef..f5bb3c20 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift@@ -529,9 +529,7 @@ struct OrphanScannerTests {#expect(Set(scan.groups.flatMap(\.items).map(\.url.lastPathComponent)) == ["Gone.vst3", "Gone Reverb.component"])}- /// An app can keep its files inside a maker's folder or another app's, a level or two below where Orphaned Files- /// reads names, as an uninstall finds them. Down there a dotted name is often only a file's, a lock or a backup,- /// so only what came with an app Peel saw go is listed.+ /// Below the top of a place a dotted name is often a lock or a backup, so only what came with a gone app counts.@Test func findsWhatAnAppThatLeftKeptInsideSomebodyElsesFolder() async throws {let directory = try TemporaryDirectory()try directory.file("root/Library/Application Support/Example Software/org.example.mixer/settings.json")@@ -558,8 +556,7 @@ struct OrphanScannerTests {#expect(items.first { $0.kind == .sharedFolder }?.heldBack == .sharedWithEveryone)}- /// A crash report is never selected on an app's page, since the app's developer may still ask for it, and the- /// same holds once the app is gone.+ /// As on an app's page, since the app's developer may still ask for the report.@Test func aCrashReportOfAnAppThatLeftIsLeftForThePersonToChoose() async throws {let directory = try TemporaryDirectory()let report = """diff --git a/Packages/PeelCore/Tests/PeelCoreTests/SpaceInventoryTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/SpaceInventoryTests.swiftindex a0f9031e..05e352be 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/SpaceInventoryTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/SpaceInventoryTests.swift@@ -26,9 +26,7 @@ struct SpaceInventoryTests {#expect(stop.askedAfter == 0)}- /// macOS gives each account a folder for caches outside its Library and empties it only in a safe boot (`man- /// confstr`), so Space lists it beside App Caches. What macOS keeps there is not measured: some of it not even- /// Full Disk Access can read, and it would leave the area's size unknown.+ /// macOS empties it only in a safe boot (`man confstr`); its own files there, some unreadable, aren't measured.@Test(.permissionsHold) func listsTheFolderMacOSGivesTheAccountForCaches() async throws {let directory = try TemporaryDirectory()try directory.file("C/org.example.editor.helper/com.apple.metal/shaders.data", bytes: 400)diff --git a/Packages/PeelCore/Tests/PeelCoreTests/SpaceRemovalTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/SpaceRemovalTests.swiftindex f9cd09e7..c2f6e4ad 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/SpaceRemovalTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/SpaceRemovalTests.swift@@ -144,8 +144,7 @@ struct SpaceRemovalTests {#expect(names(Array(logged.suggested)) == ["com.apple.example"])}- /// In the folder macOS gives the account for caches, what its own services keep, named for themselves, is left- /// out; Developer's is left to Developer, the rest is offered as in App Caches, and the folder itself stays.+ /// macOS's own services keep theirs, Developer's go to Developer, and the folder itself is never offered.@Test func plansTheFolderMacOSGivesTheAccountForCachesWithoutMacOSsOwn() async throws {let directory = try TemporaryDirectory()for name in ["com.apple.dock.iconcache", "assessmentagent", "AudioComponentRegistrar", "org.example.editor"] {diff --git a/Packages/PeelCore/Tests/PeelCoreTests/ToolSettingsTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/ToolSettingsTests.swiftindex d7485e8d..3ba5d1ef 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/ToolSettingsTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/ToolSettingsTests.swift@@ -66,9 +66,7 @@ struct ToolSettingsTests {#expect(ToolSettings.goEnvironmentValue(of: "goproxy", in: environment) == nil)}- /// Each tool takes the path it reads its own way: npm and pnpm 10 with `${HOME}` and `~/`, Yarn from the folder of- /// its file with `${HOME}` and a fallback, pnpm 11 with `~/`, and Go with only an absolute path, an empty value- /// being unset.+ /// npm and pnpm 10 read `${HOME}` and `~/`, Yarn its file's folder and a fallback, pnpm 11 `~/`, Go a full path.@Test func takesEachToolsPathAsTheToolDoes() throws {let directory = try TemporaryDirectory()try directory.file("home/.npmrc", contents: Data("cache=${HOME}/npm-cache\nstore-dir=~/pnpm-ten\n".utf8))@@ -107,8 +105,6 @@ struct ToolSettingsTests {#expect(Self.path(ToolSettings(home: home).yarnCacheRoot) == "/from/argument")}- /// A value whose place depends on the tool's own environment, another variable or the folder it runs in, names- /// no place.@Test func passesOverWhatOnlyTheToolsEnvironmentCouldName() throws {let directory = try TemporaryDirectory()try directory.file("home/.npmrc", contents: Data("cache=${XDG_CACHE_HOME}/npm\nstore-dir=relative/pnpm\n".utf8))