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
Give a Homebrew test its comment back and cut the new tests' comments
Țugui Dragoș652d31fac2ff
diff --git a/Packages/PeelCore/Sources/PeelCore/Extensions/AppExtensions.swift b/Packages/PeelCore/Sources/PeelCore/Extensions/AppExtensions.swiftindex 0bee7c20..cc7297af 100644--- a/Packages/PeelCore/Sources/PeelCore/Extensions/AppExtensions.swift+++ b/Packages/PeelCore/Sources/PeelCore/Extensions/AppExtensions.swift@@ -122,7 +122,6 @@ public struct CarriedSystemExtensions: Sendable, Hashable {}public static let none = CarriedSystemExtensions(names: [])- /// What an app Peel couldn't look into may carry, which Finder's move asks macOS to remove.public static let notKnown = CarriedSystemExtensions(names: [], systemSettingsDeletesThem: false, isKnown: false)public var isEmpty: Bool { names.isEmpty && isKnown }diff --git a/Packages/PeelCore/Tests/PeelCoreTests/AttackRemovalGuardTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/AttackRemovalGuardTests.swiftindex 78f3f4e9..99fd07b2 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/AttackRemovalGuardTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/AttackRemovalGuardTests.swift@@ -877,8 +877,6 @@ struct AttackRemovalGuardTests {#expect(guardian.allowsRemoval(of: home.appending(path: "Documents/.GlobalPreferences.plist")))}- /// What the guard looks for a level or two inside a folder can sit in a folder it may not list, so a folder it- /// can't see all through stays. One only the helper can move, the helper looks inside as root.@Test(.permissionsHold) func aFolderItCannotSeeAllThroughStays() throws {let directory = try TemporaryDirectory()let guardian = RemovalGuard(environment: SearchEnvironment(@@ -934,8 +932,6 @@ struct AttackRemovalGuardTests {#expect(ProtectedData.holdsABrowserWallet(path("Missing")) == .nothing)}- /// The helper knows nothing of the exclusions, so a folder Peel can't search for them stays, even one only the- /// helper could move.@Test(.permissionsHold) func aFolderItCannotSearchForAnExclusionStaysWhoeverWouldMoveIt() throws {let directory = try TemporaryDirectory()let vendor = "root/Library/Application Support/org.example.Vendor"diff --git a/Packages/PeelCore/Tests/PeelCoreTests/BackgroundItemOwnershipTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/BackgroundItemOwnershipTests.swiftindex b9a61046..0d5a568f 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/BackgroundItemOwnershipTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/BackgroundItemOwnershipTests.swift@@ -42,7 +42,6 @@ struct BackgroundItemOwnershipTests {#expect(!ownership.isOrphan(label: "org.example.cut", program: "/bin/sh\u{0}gone", owner: nil))}- /// launchd runs a daemon as root, so a program in a folder this account can't search is not gone.@Test(.permissionsHold) func neverCallsGoneAProgramInAFolderItCannotSearch() throws {let directory = try TemporaryDirectory()let program = try directory.file("Vendor/bin/agent").path(percentEncoded: false)diff --git a/Packages/PeelCore/Tests/PeelCoreTests/ExclusionsTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/ExclusionsTests.swiftindex a50e53d2..364ca315 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/ExclusionsTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/ExclusionsTests.swift@@ -107,7 +107,6 @@ struct ExclusionsTests {#expect(Exclusions(paths: [URL(filePath: "/opt/homebrew/Cellar/curl")]).excludes(formula, apps: [], prefix: prefix) == false)}- /// A folder Peel can't look inside may hold what an excluded app keeps, so `brew uninstall` isn't run on it.@Test(.permissionsHold) func keepsAPackageItCannotSearchForAnExclusion() throws {let directory = try TemporaryDirectory()try directory.file("prefix/Caskroom/example/1.0/kept/org.example.excluded/state.db")diff --git a/Packages/PeelCore/Tests/PeelCoreTests/HomebrewTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/HomebrewTests.swiftindex 8add9e89..bf5e246e 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/HomebrewTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/HomebrewTests.swift@@ -98,10 +98,6 @@ struct HomebrewTests {}}- /// `brew cleanup` and the autoremove that `brew uninstall` runs delete formulae and their old versions for good,- /// so the formulae the exclusions cover are named in `HOMEBREW_NO_CLEANUP_FORMULAE`, which Homebrew's own- /// documentation says makes it refuse to clean up or autoremove them.- /// A formula Peel can't look at may be one the exclusions cover, so nothing that deletes for good runs then.@Test(.permissionsHold) func keepsNoListItCannotReadWhole() throws {let directory = try TemporaryDirectory()try directory.directory("Cellar/wget/1.25.0")@@ -121,6 +117,9 @@ struct HomebrewTests {#expect(excludingWget.keptFormulae(inCellarOf: directory.url.appending(path: "Missing")) == [])}+ /// `brew cleanup` and the autoremove that `brew uninstall` runs delete formulae and their old versions for good,+ /// so the formulae the exclusions cover are named in `HOMEBREW_NO_CLEANUP_FORMULAE`, which Homebrew's own+ /// documentation says makes it refuse to clean up or autoremove them.@Test func homebrewIsToldToKeepTheFormulaeTheExclusionsCover() async throws {let directory = try TemporaryDirectory()try directory.directory("Cellar/wget/1.25.0")diff --git a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swiftindex 73ac5e51..c566c800 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift@@ -1117,8 +1117,6 @@ struct LeftoverScannerTests {#expect(!found.isMeasured, "a folder nobody measured was given a size of zero")}- /// The helper knows nothing of the exclusions, so a folder Peel can't search for them is left alone, even one- /// only the helper could move.@Test(.permissionsHold) func leavesAloneAFolderItCannotSearchForAnExclusion() async throws {let directory = try TemporaryDirectory()let place = "root/Library/Application Support/Tunewell"diff --git a/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swiftindex 15c1b209..d16fd0d2 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/OrphanScannerTests.swift@@ -573,8 +573,6 @@ struct OrphanScannerTests {#expect(item.size == nil)}- /// The helper knows nothing of the exclusions, so a folder Peel can't search for them is left alone, even one- /// only the helper could move.@Test(.permissionsHold) func leavesAloneAFolderItCannotSearchForAnExclusion() async throws {let directory = try TemporaryDirectory()let place = "root/Library/Application Support/com.gone.app"diff --git a/Packages/PeelCore/Tests/PeelCoreTests/TemporaryDirectoryTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/TemporaryDirectoryTests.swiftindex 9412242d..60a826e5 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/TemporaryDirectoryTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/TemporaryDirectoryTests.swift@@ -2,7 +2,6 @@ import Foundationimport Testingstruct TemporaryDirectoryTests {- /// It takes its folder away when the test ends.@Test func onlyTemporaryDirectoryNamesTheTemporaryFolder() throws {let this = URL(filePath: #filePath)let folder = this.deletingLastPathComponent()diff --git a/Packages/PeelCore/Tests/PeelCoreTests/UninstallationTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/UninstallationTests.swiftindex dd5b1284..d6d93a4b 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/UninstallationTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/UninstallationTests.swift@@ -120,7 +120,6 @@ struct UninstallationTests {#expect(!unanswered.systemSettingsDeletesThem, "with no answer the category is not known")}- /// What Peel can't look into may carry a system extension, which only Finder's move asks macOS to remove.@Test(.permissionsHold) func leavesToFinderAnAppItCannotLookInto() async throws {let directory = try TemporaryDirectory()let app = try appCarryingAFilter(in: directory)diff --git a/Peel/Model/HomebrewLibrary.swift b/Peel/Model/HomebrewLibrary.swiftindex 351eadcf..28d99187 100644--- a/Peel/Model/HomebrewLibrary.swift+++ b/Peel/Model/HomebrewLibrary.swift@@ -45,7 +45,6 @@ final class HomebrewLibrary {}}- /// Whether Homebrew deletes formulae for good while it runs, which it does keeping the ones Peel names.var deletesFormulae: Bool {switch self {case .uninstall, .cleanup, .clearOlderDownloads, .clearEveryDownload: true