Skip to content

x/build, cmd/go: extend main Go repo's "every vet check is forcibly made high-confidence" behavior to golang.org/x packages that are vendored (or exclude vendored packages from it) #74011

Open
@dmitshur

Description

@dmitshur

The go test command normally runs a select subset of vet checks, and fails the test if any of them fail.

In the main Go repo, to aid development, that behavior is forcibly modified to have all vet checks be treated as strict and included in go test:

// In GOROOT, we enable all the vet tests during 'go test',
// not just the high-confidence subset. This gets us extra
// checking for the standard library (at some compliance cost)
// and helps us gain experience about how well the checks
// work, to help decide which should be turned on by default.

(https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/work/exec.go;l=1256-1260;drc=2b3794e3e8a0ecf9d0ff7d8689ca9cdaea974e08)

This causes some unnecessary friction when it comes to golang.org/x packages that are vendored into the main Go repo. For example, a self-assignment finding that was introduced in CL 663756 (but not reported because that was in x/arch) started being reported a week or two later (in CL 678556 and CL 677257).

We can avoid this friction by either extending this behavior to apply to all golang.org/x packages that are vendored (or all golang.org/x repos?), or by having it not apply to vendored packages at all.

CC @golang/release, @golang/command-line, @adonovan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Buildersx/build issues (builders, bots, dashboards)FrictionNuisances that make good candidates for our "friction" fix-it weeksGoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolProposalIssues describing a requested change to a Go tool or command-line program.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions