You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to learn more about how this works, but this analyzer is gopls private package.
The package doc or source code is not easily searchable from pkg.go.dev. Some options I could think of:
make the analyzer public and provide detailed documentation as package doc.
enhance x/tools/gopls/doc/analyzers.md to add the link to the source location or the internal package doc page in pkg.go.dev
The text was updated successfully, but these errors were encountered:
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
Oct 30, 2023
Since we already embed the analyzer doc in x/tools/gopls/doc/analyzers.md, it seems we could just do the following:
Move the documentation for infertypeargs to doc.go, and use MustExtractDoc to keep package doc and Analyzer doc in sync.
Improve the documentation.
Though I'll note that in this case infertypeargs is a "convenience" analyzer, which is an entire concept that is going away (https://go.dev/issue/61559). Soon it will just be a code action, and we don't have a good way to modularize and document code actions (https://go.dev/issue/54115).
Since we already embed the analyzer doc in x/tools/gopls/doc/analyzers.md, it seems we could just do the following:
Move the documentation for infertypeargs to doc.go, and use MustExtractDoc to keep package doc and Analyzer doc in sync.
Improve the documentation.
Yes, this was the motivation of #61315 originally. :-) I am skeptical about the proposal being accepted. We can move this MustExtractDoc to golang.org/x/tools/internal instead if this is a path forward to document other (non-convenience) analyzers under x/tools/gopls/internal/lsp/analysis.
Looking into what
infertypeargs
analyzer does for#63821
I visited the gopls documentation (https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md#infertypeargs).
and found a short description about it (admittedly, not much more than what I could guess from the analyzer's name).
I wanted to learn more about how this works, but this analyzer is gopls private package.
The package doc or source code is not easily searchable from pkg.go.dev. Some options I could think of:
The text was updated successfully, but these errors were encountered: