Skip to content

cmd/go: go vet should tell cmd/vet the names of .s files #27665

@alandonovan

Description

@alandonovan
$ go version
go version devel +c5d38b896d Thu Aug 23 06:10:48 2018 +0000 linux/amd64

$ go list -f {{.SFiles}} math/big
[arith_amd64.s]

$ go vet -x math/big
...
cat >$WORK/b001/vet.cfg << 'EOF' # internal
{
        "Dir": "/home/adonovan/go/src/math/big",
        "ImportPath": "math/big",
        "GoFiles": [
                "/home/adonovan/go/src/math/big/accuracy_string.go",
                ...,
        ],
        ...,
}
EOF
...

Some vet checks, such as asmdecl and buildtag, apply equally to the Go files and non-Go files of a package. However, the .cfg file that go vet passes to cmd/vet does not mention them, so these checks are incomplete or ineffective.

The .cfg file should contain a field NonGoFiles that lists the package source files written in assembly, C, Fortran, and all the other benighted languages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions