feat: format diagnostic (#895)

This commit is contained in:
yetone
2024-11-24 06:02:34 +08:00
committed by GitHub
parent 5e6d3368f7
commit c8e688a0ac
2 changed files with 34 additions and 18 deletions

View File

@@ -1,12 +1,10 @@
{%- if use_xml_format -%}
{%- if diagnostics -%}
<diagnostic_field_description>
lnum: The starting line of the diagnostic (1-indexed)
end_lnum: The final line of the diagnostic (1-indexed)
col: The starting column of the diagnostic (1-indexed)
end_col: The final column of the diagnostic (1-indexed)
content: The diagnostic content
start_line: The starting line of the diagnostic (1-indexed)
end_line: The final line of the diagnostic (1-indexed)
severity: The severity of the diagnostic
message: The diagnostic text
source: The source of the diagnostic
</diagnostic_field_description>
<diagnostics>
@@ -16,12 +14,10 @@ source: The source of the diagnostic
{%- else -%}
{%- if diagnostics -%}
DIAGNOSTIC_FIELD_DESCRIPTION:
lnum: The starting line of the diagnostic (1-indexed)
end_lnum: The final line of the diagnostic (1-indexed)
col: The starting column of the diagnostic (1-indexed)
end_col: The final column of the diagnostic (1-indexed)
content: The diagnostic content
start_line: The starting line of the diagnostic (1-indexed)
end_line: The final line of the diagnostic (1-indexed)
severity: The severity of the diagnostic
message: The diagnostic text
source: The source of the diagnostic
DIAGNOSTICS: