Skip to content

Commit

Permalink
fix(tools/spxls): correct diagnostic related return types (#1157)
Browse files Browse the repository at this point in the history
Signed-off-by: Aofei Sheng <[email protected]>
  • Loading branch information
aofei authored Dec 19, 2024
1 parent 3aa09e4 commit c891459
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class HoverController extends Disposable {
return {
contents: [
makeBasicMarkdownString(
`<diagnostic-item severity="${diagnostic.severity}">${diagnostic.message}"</diagnostic-item>`
`<diagnostic-item severity="${diagnostic.severity}">${diagnostic.message}</diagnostic-item>`
)
],
range: diagnostic.range,
Expand Down
6 changes: 3 additions & 3 deletions tools/spxls/internal/server/diagnostic.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ func (s *Server) textDocumentDiagnostic(params *DocumentDiagnosticParams) (*Docu
return nil, err
}

return &DocumentDiagnosticReport{Value: &RelatedFullDocumentDiagnosticReport{
return &DocumentDiagnosticReport{Value: RelatedFullDocumentDiagnosticReport{
FullDocumentDiagnosticReport: FullDocumentDiagnosticReport{
Kind: string(DiagnosticFull),
Items: result.diagnostics[params.TextDocument.URI],
Expand All @@ -24,8 +24,8 @@ func (s *Server) workspaceDiagnostic(params *WorkspaceDiagnosticParams) (*Worksp

var items []WorkspaceDocumentDiagnosticReport
for file, fileDiags := range result.diagnostics {
items = append(items, Or_WorkspaceDocumentDiagnosticReport{
Value: &WorkspaceFullDocumentDiagnosticReport{
items = append(items, WorkspaceDocumentDiagnosticReport{
Value: WorkspaceFullDocumentDiagnosticReport{
URI: DocumentURI(file),
FullDocumentDiagnosticReport: FullDocumentDiagnosticReport{
Kind: string(DiagnosticFull),
Expand Down

0 comments on commit c891459

Please sign in to comment.