Skip to content

Conversation

tjugdev
Copy link
Contributor

@tjugdev tjugdev commented Oct 2, 2025

Overview

Update the go.mod parser to handle an empty file.

Acceptance criteria

Parsing an empty go.mod file should not result in an error

Testing plan

  1. New unit tests added and passing
  2. Clone an existing Go repo. Run an analysis and confirm that the go dependencies are detected correctly.
  3. Truncate the go.mod file and run the analysis again. Confirm that it says the gomod project scan succeeded and discovered no dependencies.

References

Checklist

  • I added tests for this PR's change (or explained in the PR description why tests don't make sense).
  • If this PR introduced a user-visible change, I added documentation into docs/.
  • If this PR added docs, I added links as appropriate to the user manual's ToC in docs/README.ms and gave consideration to how discoverable or not my documentation is.
  • If this change is externally visible, I updated Changelog.md. If this PR did not mark a release, I added my changes into an ## Unreleased section at the top.
  • If I made changes to .fossa.yml or fossa-deps.{json.yml}, I updated docs/references/files/*.schema.json AND I have updated example files used by fossa init command. You may also need to update these if you have added/removed new dependency type (e.g. pip) or analysis target type (e.g. poetry).
  • If I made changes to a subcommand's options, I updated docs/references/subcommands/<subcommand>.md.

@tjugdev tjugdev requested a review from a team as a code owner October 2, 2025 21:37
@tjugdev tjugdev requested a review from spatten October 2, 2025 21:37
Copy link
Contributor

@spatten spatten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks great, and so do the tests.

Can you add in a test plan showing how you tested this end-to-end? I know it's a simple change, but IMO we should still run those manual tests.

Also, can you either fill in or delete the rest of the sections in the PR description. For example, you could add a simple acceptance criteria and delete risks, metrics and references.

@tjugdev tjugdev merged commit 219b089 into master Oct 3, 2025
19 checks passed
@tjugdev tjugdev deleted the empty-gomod branch October 3, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants