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.

Offer Autoconf's autom4te.cache in Build Artifacts

Țugui Dragoșabe518047017
diff --git a/Packages/PeelCore/Sources/PeelCore/Developer/ProjectArtifacts.swift b/Packages/PeelCore/Sources/PeelCore/Developer/ProjectArtifacts.swift
index ada3f72b..a75ad8d8 100644
--- a/Packages/PeelCore/Sources/PeelCore/Developer/ProjectArtifacts.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Developer/ProjectArtifacts.swift
@@ -376,6 +376,10 @@ public enum ProjectArtifacts {
name: "build", markers: ["CMakeLists.txt"], tool: "CMake", isGeneric: true,
source: "https://cmake.org/cmake/help/latest/manual/cmake.1.html"
),
+ Definition(
+ name: "autom4te.cache", markers: ["configure.ac", "configure.in"], tool: "Autoconf", isGeneric: false,
+ source: "https://www.gnu.org/software/autoconf/manual/autoconf-2.72/html_node/Autom4te-Cache.html"
+ ),
Definition(
name: "cmake-build-*", markers: ["CMakeLists.txt"], tool: "CLion", isGeneric: false,
source: "https://www.jetbrains.com/help/clion/quick-cmake-tutorial.html"
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/ProjectArtifactsTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/ProjectArtifactsTests.swift
index 1ada6d9a..368ecf6c 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/ProjectArtifactsTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/ProjectArtifactsTests.swift
@@ -416,6 +416,19 @@ struct ProjectArtifactsTests {
#expect(found.first?.isRecommended == true)
}
+ @Test func offersTheCacheAutoconfsToolsShare() async throws {
+ let directory = try TemporaryDirectory()
+ try directory.file("lib/configure.ac", bytes: 16)
+ try directory.file("lib/autom4te.cache/output.0", bytes: 400_000)
+ try age(directory.url, days: 60)
+
+ let found = await ProjectArtifacts.scan(roots: [directory.url]).artifacts
+
+ #expect(found.map(\.name) == ["autom4te.cache"])
+ #expect(found.first?.tool == "Autoconf")
+ #expect(found.first?.isRecommended == true)
+ }
+
@Test func offersTheRawCoverageNycWrites() async throws {
let directory = try TemporaryDirectory()
try directory.file("app/.nycrc.json", bytes: 16)