golang/go
x/tools/gopls/internal/analysis/deprecated: support fields too
Fechada
#79.801 aberto em 3 de jun. de 2026
AnalysisToolsgoplshelp wanted
Métricas do repositório
- Stars
- (133.883 estrelas)
- Métricas de merge de PR
- (Nenhuma PRs mesclada em 30d)
Description
gopls' deprecated analyzer reports a diagnostic for each reference to a deprecated package-level symbol or concrete method. (It uses the LSP's hint severity and deprecated tag to make it subtle.) However, it does not report references to deprecated fields, such as the Obj field of ast.Ident, declared thus:
// An Ident node represents an identifier.
Ident struct {
NamePos token.Pos // identifier position
Name string // identifier name
Obj *Object // denoted object, or nil. Deprecated: see Object.
}
It should support field references too. And interface methods.