Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

alandonovan opened this issue Sep 13, 2018 · 1 comment

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

alandonovan opened this issue Sep 13, 2018 · 1 comment


Copy link

@alandonovan alandonovan commented Sep 13, 2018

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

$ go list -f {{.SFiles}} math/big

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

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.

@andybons andybons added the NeedsFix label Sep 25, 2018
@andybons andybons added this to the Unplanned milestone Sep 25, 2018

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 12, 2018

Change mentions this issue: cmd/go: vet: pass non-.go files to vet tool

@gopherbot gopherbot closed this in e787b13 Nov 13, 2018
gopherbot pushed a commit to golang/tools that referenced this issue Nov 15, 2018
- add a no-op -tags flag for legacy compatibility.
  Tags processing is done by go vet, but it passes the flag on.
  Exercised by cmd/go TestGoVetWithTags.

- rename OtherFiles to NonGoFiles in the JSON *.cfg file, to match
  the name actually used for this field (see
  We really need to publish the types for this protocol.
  Exercised by cmd/go TestScript/vet_asm.

- suppress diagnostics in cfg.VetxOnly mode.
  Exercised by cmd/go TestTestVet.

Change-Id: I63259f1bd01531d110362e38190a220389b2ec4b
Run-TryBot: Alan Donovan <>
TryBot-Result: Gobot Gobot <>
Reviewed-by: Michael Matloob <>
@golang golang locked and limited conversation to collaborators Nov 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
4 participants
You can’t perform that action at this time.