MCPcopy Create free account
hub / github.com/Effect-TS/tsgo / diagnosticCodeString

Function diagnosticCodeString

internal/effecttest/quickfix_baseline.go:41–52  ·  view source on GitHub ↗

diagnosticCodeString formats the diagnostic code for display.

(d *lsproto.Diagnostic)

Source from the content-addressed store, hash-verified

39
40// diagnosticCodeString formats the diagnostic code for display.
41func diagnosticCodeString(d *lsproto.Diagnostic) string {
42 if d.Code == nil {
43 return "?"
44 }
45 if d.Code.Integer != nil {
46 return strconv.Itoa(int(*d.Code.Integer))
47 }
48 if d.Code.String != nil {
49 return *d.Code.String
50 }
51 return "?"
52}
53
54func diagnosticMessageString(d *lsproto.Diagnostic) string {
55 if d.Message.String != nil {

Callers 1

generateQuickFixBaselineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected