-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: "diagnostic location is not among files of package: %s" assertion is unjustified for Diagnostic.Related #70791
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
Comments
This stack
|
This stack
|
This stack
|
Ah! The stack frame in toGobDiagnostic clearly implicates the Related field of Diagnostic, and sure enough, SA4023 supplies Related information, one element of which uses the position of a |
Change https://go.dev/cl/667517 mentions this issue: |
Issue created by stacks.
The analyzer that reported the diagnostic is staticcheck's SA4023, but all its calls to Report look fine.
This stack
dlmz3w
was reported by telemetry:gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/cache.(*action).exec.func2:+48
golang.org/x/tools/gopls/internal/cache.toGobDiagnostic:+22
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+1
honnef.co/go/tools/analysis/report.Report:+40
honnef.co/go/tools/staticcheck/sa4023.run:+100
golang.org/x/tools/gopls/internal/cache.(*action).exec.func7:+31
golang.org/x/tools/gopls/internal/cache.(*action).exec:+277
golang.org/x/tools/gopls/internal/cache.execActions.func1.1:+2
sync.(*Once).doSlow:+5
sync.(*Once).Do:=67
golang.org/x/tools/gopls/internal/cache.execActions.func1:+2
runtime.goexit:+0
Dups: ARI9LQ xuqd0A UM4FBg
The text was updated successfully, but these errors were encountered: