Skip to content

fix: ignore reference to 'go@version' from newer go mod graph output #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/providers/golang_gomodules.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'node:fs'
import { EOL } from "os";

Check warning on line 2 in src/providers/golang_gomodules.js

View workflow job for this annotation

GitHub Actions / Lint and test project (latest)

Imports should be sorted alphabetically

Check warning on line 2 in src/providers/golang_gomodules.js

View workflow job for this annotation

GitHub Actions / Lint and test project (18)

Imports should be sorted alphabetically
import { getCustom, getCustomPath, invokeCommand } from "../tools.js";

Check warning on line 3 in src/providers/golang_gomodules.js

View workflow job for this annotation

GitHub Actions / Lint and test project (latest)

Expected 'multiple' syntax before 'single' syntax

Check warning on line 3 in src/providers/golang_gomodules.js

View workflow job for this annotation

GitHub Actions / Lint and test project (18)

Expected 'multiple' syntax before 'single' syntax
import path from 'node:path'
import Sbom from '../sbom.js'
Expand Down Expand Up @@ -262,7 +262,9 @@
let ignoredDeps = getIgnoredDeps(manifest);
let allIgnoredDeps = ignoredDeps.map((dep) => dep.toString())
let sbom = new Sbom();
let rows = goGraphOutput.split(getLineSeparatorGolang());
let rows = goGraphOutput.split(getLineSeparatorGolang()).filter(line => {
return !line.includes(' go@');
});
let root = getParentVertexFromEdge(rows[0])
let matchManifestVersions = getCustom("MATCH_MANIFEST_VERSIONS", "false", opts);
if(matchManifestVersions === "true") {
Expand Down
Loading