Fix: go-manifest false positives from node_modules in sourceCodeUri scans#556
Fix: go-manifest false positives from node_modules in sourceCodeUri scans#556hoptical wants to merge 3 commits intografana:mainfrom
Conversation
|
|
1 similar comment
|
|
There was a problem hiding this comment.
Pull request overview
This PR updates the go-manifest analyzer to avoid false-positive manifest/source mismatches when sourceCodeUri includes dependency trees that contain .go files under node_modules (including pnpm-style nested layouts).
Changes:
- Filter discovered Go source files to exclude paths under
node_modulesbefore manifest verification. - Generalize manifest parsing to ignore
node_modulesentries instead of a single hardcoded ignored file.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
This PR fixes false-positive Go manifest validation errors when sourceCodeUri contains dependency trees with Go files under node_modules (including pnpm layouts).
Problem
Go manifest validation was scanning all Go files from sourceCodeUri and treating dependency files in node_modules as plugin-owned backend source. This caused errors like:
What changed
gomanifest.gogomanifest.gogomanifest_test.go:Validation
go test ./pkg/analysis/passes/gomanifest/ -vpassedIssues
Additional note about CI
It seems to me that the current PR CI does not run this analyzer test surface (for example go-manifest paths), so this class of regression can slip through even when required checks pass. I suggest adding analyzer/package tests to PR CI, at least:
or a broader: