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: suspicious state from syntax checker go-vet #36173

Open
yuanlai opened this issue Dec 17, 2019 · 3 comments
Open

cmd/go: suspicious state from syntax checker go-vet #36173

yuanlai opened this issue Dec 17, 2019 · 3 comments

Comments

@yuanlai
Copy link

@yuanlai yuanlai commented Dec 17, 2019

What version of Go are you using (go version)?

$ go version
go version go1.13.4 

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

darwin/amd64

go env Output
$ go env

What did you do?

  1. Set the env variable in .zshrc:
export GOPATH=$HOME/Github/service
  1. Open my test file:
// $HOME/Github/service/src/github.com/myName/project/internal/user/user_test.go
package user_test

import (
    ...
    "github.com/myName/project/internal/platform/web"
)

...
  1. It report a suspicious state from go-vet checker, the warm message is:
imports github.com/myName/project/internal/platform/web:
use of internal package github.com/myName/project/internal/platform/web not allowed
@cagedmantis cagedmantis changed the title Suspicious state from syntax checker go-vet cmd/go: suspicious state from syntax checker go-vet Dec 23, 2019
@cagedmantis

This comment has been minimized.

Copy link
Contributor

@cagedmantis cagedmantis commented Dec 23, 2019

Hi @yuanlai. I've attempted to reproduce the scenario posted above. go vet did not return any errors in my sample scenario. Can you post what command you are running that is producing these results?

@yuanlai

This comment has been minimized.

Copy link
Author

@yuanlai yuanlai commented Dec 24, 2019

I using emacs flycheck wrap the go-vet, the error occurs seems happen between flycheck and go-vet. flycheck/flycheck#1659 (comment)

@agnivade

This comment has been minimized.

Copy link
Contributor

@agnivade agnivade commented Dec 25, 2019

If the error comes from flycheck and not go-vet, then I'm afraid there is nothing we can do here.

But the issue you linked to shows that the issue is with vet. Could you please clarify ?

Please post the exact instructions that we can run from the command line to reproduce this. Thank you.

@yuanlai yuanlai closed this Dec 25, 2019
@yuanlai yuanlai reopened this Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.