Skip to content

Commit c6d73b9

Browse files
committed
all: add DiagnosticTag prefix to DiagnosticTag enum
1 parent 2b2282a commit c6d73b9

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

basic.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,24 +170,24 @@ type DiagnosticTag float64
170170

171171
// list of DiagnosticTag.
172172
const (
173-
// DiagnosticUnnecessary unused or unnecessary code.
173+
// DiagnosticTagUnnecessary unused or unnecessary code.
174174
//
175175
// Clients are allowed to render diagnostics with this tag faded out instead of having
176176
// an error squiggle.
177-
DiagnosticUnnecessary DiagnosticTag = 1
177+
DiagnosticTagUnnecessary DiagnosticTag = 1
178178

179-
// DiagnosticDeprecated deprecated or obsolete code.
179+
// DiagnosticTagDeprecated deprecated or obsolete code.
180180
//
181181
// Clients are allowed to rendered diagnostics with this tag strike through.
182-
DiagnosticDeprecated DiagnosticTag = 2
182+
DiagnosticTagDeprecated DiagnosticTag = 2
183183
)
184184

185185
// String implements fmt.Stringer.
186186
func (d DiagnosticTag) String() string {
187187
switch d {
188-
case DiagnosticUnnecessary:
188+
case DiagnosticTagUnnecessary:
189189
return "Unnecessary"
190-
case DiagnosticDeprecated:
190+
case DiagnosticTagDeprecated:
191191
return "Deprecated"
192192
default:
193193
return strconv.FormatFloat(float64(d), 'f', -10, 64)

basic_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,8 @@ func testDiagnostic(t *testing.T, marshal marshalFunc, unmarshal unmarshalFunc)
582582
Source: "test foo bar",
583583
Message: "foo bar",
584584
Tags: []DiagnosticTag{
585-
DiagnosticUnnecessary,
586-
DiagnosticDeprecated,
585+
DiagnosticTagUnnecessary,
586+
DiagnosticTagDeprecated,
587587
},
588588
RelatedInformation: []DiagnosticRelatedInformation{
589589
{
@@ -906,12 +906,12 @@ func TestDiagnosticTag_String(t *testing.T) {
906906
}{
907907
{
908908
name: "Unnecessary",
909-
d: DiagnosticUnnecessary,
909+
d: DiagnosticTagUnnecessary,
910910
want: "Unnecessary",
911911
},
912912
{
913913
name: "Deprecated",
914-
d: DiagnosticDeprecated,
914+
d: DiagnosticTagDeprecated,
915915
want: "Deprecated",
916916
},
917917
{

general_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5576,8 +5576,8 @@ func testTextDocumentClientCapabilitiesPublishDiagnostics(t *testing.T, marshal
55765576
RelatedInformation: true,
55775577
TagSupport: &TextDocumentClientCapabilitiesPublishDiagnosticsTagSupport{
55785578
ValueSet: []DiagnosticTag{
5579-
DiagnosticDeprecated,
5580-
DiagnosticUnnecessary,
5579+
DiagnosticTagDeprecated,
5580+
DiagnosticTagUnnecessary,
55815581
},
55825582
},
55835583
VersionSupport: true,

0 commit comments

Comments
 (0)