Skip to content

Commit

Permalink
Add id and label to test error
Browse files Browse the repository at this point in the history
  • Loading branch information
davidanthoff committed Jul 17, 2024
1 parent 40653e9 commit da2d6a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ JSONRPC = "1.1"
JuliaFormatter = "0.20.0, 0.21, 0.22, 0.23, 1"
PrecompileTools = "1"
StaticLint = "8.0"
JuliaWorkspaces = "4.2"
JuliaWorkspaces = "4.3"
SymbolServer = "8"
Tokenize = "0.5.10"
URIs = "1.3"
Expand Down
2 changes: 2 additions & 0 deletions src/extensions/extensions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ end
end

@dict_readable struct TestErrorDetail <: Outbound
id::String
label::Union{Nothing,String}
range::Range
error::String
end
Expand Down
2 changes: 1 addition & 1 deletion src/requests/textdocument.jl
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ function publish_tests!(doc, server::LanguageServerInstance, jr_endpoint)

testitems = TestItemDetail[TestItemDetail(i.id, i.name, Range(st, i.range), get_text(doc)[i.code_range], Range(st, i.code_range), i.option_default_imports, string.(i.option_tags), string.(i.option_setup)) for i in testitems_results.testitems]
testsetups= TestSetupDetail[TestSetupDetail(string(i.name), string(i.kind), Range(st, i.range), get_text(doc)[i.code_range], Range(st, i.code_range), ) for i in testitems_results.testsetups]
testerrors = TestErrorDetail[TestErrorDetail(Range(st, i.range), i.message) for i in testitems_results.testerrors]
testerrors = TestErrorDetail[TestErrorDetail(te.id, te.name, Range(st, te.range), te.message) for te in testitems_results.testerrors]
# TODO SALSA
# # Find which workspace folder the doc is in.
# parent_workspaceFolders = sort(filter(f -> startswith(doc._path, f), collect(server.workspaceFolders)), by=length, rev=true)
Expand Down

0 comments on commit da2d6a6

Please sign in to comment.