File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 11use clarity_repl:: clarity:: analysis:: ContractAnalysis ;
2- use clarity_repl:: clarity:: diagnostic:: Diagnostic as ClarityDiagnostic ;
2+ use clarity_repl:: clarity:: diagnostic:: { Diagnostic as ClarityDiagnostic , Level as ClarityLevel } ;
33use clarity_repl:: clarity:: docs:: {
44 make_api_reference, make_define_reference, make_keyword_reference,
55} ;
@@ -29,7 +29,11 @@ pub fn convert_clarity_diagnotic_to_lsp_diagnostic(diagnostic: ClarityDiagnostic
2929 // TODO(lgalabru): add hint for contracts not found errors
3030 LspDiagnostic {
3131 range,
32- severity : Some ( DiagnosticSeverity :: Error ) ,
32+ severity : match diagnostic. level {
33+ ClarityLevel :: Error => Some ( DiagnosticSeverity :: Error ) ,
34+ ClarityLevel :: Warning => Some ( DiagnosticSeverity :: Warning ) ,
35+ ClarityLevel :: Note => Some ( DiagnosticSeverity :: Information ) ,
36+ } ,
3337 code : None ,
3438 code_description : None ,
3539 source : Some ( "clarity" . to_string ( ) ) ,
You can’t perform that action at this time.
0 commit comments