Ignore the tools and godebug GO directives #1553
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Go introduced a new
toolsdirective in version 1.24. Tools directive documentationThe explicit purpose is to allow users to download developer dependencies that are not shipped with the tool. We currently do not support differentiating between developer dependencies so I believe the correct behavior here is to ignore any dependencies in this directive.
This PR also ignores the
godebugdirective that we previously did not support. This specifies the defaultGODEBUGenvironment variable settings for the project. Unsure when this was introduced, but this causes a failure.Acceptance criteria
GO projects with
toolandgodebugdirectives with single lines declarations properly scan.Note: In the process of writing this PR I realized that multi-line syntax for
toolchainand by extension, nowtoolandgodebugdirectives is not supported by the CLI. I am going to work on this as a follow up item.Testing plan
Risks
toolsection and nothing else.toolchain,tool, andgodebugsupport as implemented do not support multi line ignores. I'm investigating this but may put up a PR without this for the time being.References
Checklist
docs/.docs/README.msand gave consideration to how discoverable or not my documentation is.Changelog.md. If this PR did not mark a release, I added my changes into an## Unreleasedsection at the top..fossa.ymlorfossa-deps.{json.yml}, I updateddocs/references/files/*.schema.jsonAND I have updated example files used byfossa initcommand. 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).docs/references/subcommands/<subcommand>.md.