From 5c374dce7b94dffc2eae72950352dad1b3035f76 Mon Sep 17 00:00:00 2001 From: abdelDriowya <111757332+abdelDriowya@users.noreply.github.com> Date: Thu, 14 Dec 2023 13:31:39 +0100 Subject: [PATCH] fix: send diagnostics when config couldn't be parsed (#262) --- pkg/services/diagnostics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/services/diagnostics.go b/pkg/services/diagnostics.go index 3715a764..53119a02 100644 --- a/pkg/services/diagnostics.go +++ b/pkg/services/diagnostics.go @@ -48,7 +48,7 @@ func DiagnosticString(content string, cache *utils.Cache, context *utils.LsConte } func DiagnosticYAML(yamlDocument yamlparser.YamlDocument, cache *utils.Cache, context *utils.LsContext) ([]protocol.Diagnostic, error) { - if yamlDocument.Version < 2.1 { + if yamlDocument.Version != 0 && yamlDocument.Version < 2.1 { // TODO: Handle error return []protocol.Diagnostic{}, nil }