Coordinate separate full vet pass
This commit is contained in:
17
check.go
17
check.go
@@ -46,6 +46,9 @@ type ValidationSpec struct {
|
||||
type GoValidationSpec struct {
|
||||
// Race runs the one standard Go test suite with the race detector enabled.
|
||||
Race bool
|
||||
// FullVet runs go vet after the suite instead of the test-time vet pass.
|
||||
// Failures use the go-vet validation check identity.
|
||||
FullVet bool
|
||||
}
|
||||
|
||||
// Check validates one local, committed release candidate. It requires a clean
|
||||
@@ -53,7 +56,8 @@ type GoValidationSpec struct {
|
||||
// and an unused local tag. It always runs the offline Go test suite with the
|
||||
// available compatible local Go toolchain and Go host target, then calls
|
||||
// AdditionalChecks when supplied. Validation.Go.Race runs that one suite with
|
||||
// the race detector; the zero value preserves the ordinary native suite. If
|
||||
// the race detector, and Validation.Go.FullVet runs go vet after the suite
|
||||
// instead of test-time vet. Their zero values preserve the ordinary suite. If
|
||||
// Build selects targets, Check builds them after validation in temporary
|
||||
// storage outside the worktree, then rechecks
|
||||
// branch, HEAD, worktree, index, and local tag state. Success establishes local
|
||||
@@ -72,10 +76,13 @@ func Check(ctx context.Context, request ReleaseRequest) (Candidate, error) {
|
||||
|
||||
func candidateRequest(request ReleaseRequest) candidate.Request {
|
||||
return candidate.Request{
|
||||
RepositoryDir: request.RepositoryDir,
|
||||
Product: request.Product,
|
||||
Version: request.Version,
|
||||
Validation: validation.Settings{Race: request.Validation.Go.Race},
|
||||
RepositoryDir: request.RepositoryDir,
|
||||
Product: request.Product,
|
||||
Version: request.Version,
|
||||
Validation: validation.Settings{
|
||||
Race: request.Validation.Go.Race,
|
||||
FullVet: request.Validation.Go.FullVet,
|
||||
},
|
||||
AdditionalChecks: candidateChecks(request.AdditionalChecks),
|
||||
AfterValidate: internalbuild.CandidateCallback(internalBuildSpec(request.Build), request.Output),
|
||||
Output: request.Output,
|
||||
|
||||
Reference in New Issue
Block a user