Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the reusable Go security/lint workflows to allow callers to pass GOEXPERIMENT, enabling tools like govulncheck (and golangci-lint) to run under specific Go experiment flags.
Changes:
- Add a
go-experimentinput to the reusablelint-goworkflow and pass it asGOEXPERIMENTto thegolangci-lintaction step. - Add a
go-experimentinput to the reusableaudit-goworkflow and setGOEXPERIMENTat thegovulncheckjob level.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/lint-go.yml | Adds go-experiment input and forwards it to golangci-lint via GOEXPERIMENT. |
| .github/workflows/audit-go.yml | Adds go-experiment input and sets GOEXPERIMENT for the govulncheck job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| default: go.mod | ||
| type: string | ||
|
|
||
| go-experiment: |
There was a problem hiding this comment.
The new go-experiment reusable-workflow input is missing a description. Other inputs in this workflow provide descriptions, so adding one will make it clearer to callers what format/values are expected (e.g., comma-separated GOEXPERIMENT flags).
| go-experiment: | |
| go-experiment: | |
| description: Comma-separated GOEXPERIMENT flags to set for Go commands. |
| go-experiment: | ||
| default: "" | ||
| type: string |
There was a problem hiding this comment.
go-experiment is defined as an input but is only applied to the golangci-lint step. The go-mod-tidy-diff job still runs go mod tidy without GOEXPERIMENT, which can lead to inconsistent results when callers set this input. Consider applying GOEXPERIMENT at the job level (or at least for the go mod tidy step) so all Go invocations in this workflow use the same experiment settings.
| on: | ||
| workflow_call: | ||
| inputs: | ||
| go-experiment: |
There was a problem hiding this comment.
The newly added reusable-workflow input go-experiment has no description. Adding one would help workflow callers understand that this maps to the GOEXPERIMENT environment variable and what values are expected.
| go-experiment: | |
| go-experiment: | |
| description: "Optional Go experiment flags passed to the GOEXPERIMENT environment variable (e.g., space-separated experiment names)." |
No description provided.