Skip to content

Commit 1fdb9b7

Browse files
Strum355claude
andcommitted
fix(workspace): export golang.model to Jackson and fix glob matching
Add opens/exports for golang.model package in module-info.java so Jackson can deserialize GoWorkspace. Also fix Java PathMatcher quirk where **/X/** doesn't match root-level paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1627909 commit 1fdb9b7

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

src/main/java/io/github/guacsec/trustifyda/utils/WorkspaceUtils.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,17 @@ public static List<Path> filterByIgnorePatterns(
4343

4444
List<PathMatcher> matchers =
4545
ignorePatterns.stream()
46-
.map(p -> FileSystems.getDefault().getPathMatcher("glob:" + p))
46+
.flatMap(
47+
p -> {
48+
var fs = FileSystems.getDefault();
49+
java.util.stream.Stream.Builder<PathMatcher> b =
50+
java.util.stream.Stream.builder();
51+
b.add(fs.getPathMatcher("glob:" + p));
52+
if (p.startsWith("**/")) {
53+
b.add(fs.getPathMatcher("glob:" + p.substring(3)));
54+
}
55+
return b.build();
56+
})
4757
.toList();
4858

4959
return manifests.stream()

src/main/java/module-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
com.fasterxml.jackson.databind;
1919
opens io.github.guacsec.trustifyda.providers.rust.model to
2020
com.fasterxml.jackson.databind;
21+
opens io.github.guacsec.trustifyda.providers.golang.model to
22+
com.fasterxml.jackson.databind;
2123

2224
exports io.github.guacsec.trustifyda;
2325
exports io.github.guacsec.trustifyda.impl;
@@ -35,6 +37,7 @@
3537
exports io.github.guacsec.trustifyda.providers.javascript.model;
3638
exports io.github.guacsec.trustifyda.providers.javascript.workspace;
3739
exports io.github.guacsec.trustifyda.providers.rust.model;
40+
exports io.github.guacsec.trustifyda.providers.golang.model;
3841
exports io.github.guacsec.trustifyda.logging;
3942
exports io.github.guacsec.trustifyda.image;
4043
exports io.github.guacsec.trustifyda.license;

0 commit comments

Comments
 (0)