diff --git a/experimental/ir/lower_deprecated.go b/experimental/ir/lower_deprecated.go index ffeb78f9..9e945a29 100644 --- a/experimental/ir/lower_deprecated.go +++ b/experimental/ir/lower_deprecated.go @@ -16,6 +16,7 @@ package ir import ( "github.com/bufbuild/protocompile/experimental/report" + "github.com/bufbuild/protocompile/experimental/report/tags" "github.com/bufbuild/protocompile/experimental/seq" "github.com/bufbuild/protocompile/experimental/source" ) @@ -128,5 +129,6 @@ func (e errDeprecated) Diagnose(d *report.Diagnostic) { report.Message("`%s` is deprecated", e.name), report.Snippet(e.ref), report.Snippetf(e.cause, "deprecated here"), + report.Tag(tags.Deprecated), ) } diff --git a/experimental/report/tags/tags.go b/experimental/report/tags/tags.go index 3af32007..1bc8ec9b 100644 --- a/experimental/report/tags/tags.go +++ b/experimental/report/tags/tags.go @@ -25,4 +25,7 @@ const ( // in the current scope. This may indicate a missing import or a reference // to a non-existent symbol. UnknownSymbol = "protobuf:unknown_symbol" + + // Deprecated is the tag for a diagnostic where a symbol is deprecated. + Deprecated = "protobuf:deprecated" )