Coordinate separate full vet pass

This commit is contained in:
2026-10-07 22:18:47 +00:00
parent 30fe4fe206
commit 1c41f7a0d1
19 changed files with 261 additions and 80 deletions

View File

@@ -10,7 +10,8 @@ import (
// Settings selects shared validation behavior.
type Settings struct {
Race bool
Race bool
FullVet bool
}
// Request identifies the captured source and output used by shared validation.
@@ -37,10 +38,19 @@ func Run(ctx context.Context, request Request) error {
if request.Settings.Race {
args = append(args, "-race")
}
if request.Settings.FullVet {
args = append(args, "-vet=off")
}
args = append(args, "./...")
_, err = tool.Run(ctx, request.RepositoryDir, gotool.Native, gotool.Target{}, request.Output, args...)
if err != nil {
return &Failure{Check: GoTest, Cause: err}
}
if request.Settings.FullVet {
_, err = tool.Run(ctx, request.RepositoryDir, gotool.Native, gotool.Target{}, request.Output, "vet", "-mod=readonly", "./...")
if err != nil {
return &Failure{Check: GoVet, Cause: err}
}
}
return nil
}