From 6403cf4f0b5ddebb9f2a8cdae56c46b5ec30d0d8 Mon Sep 17 00:00:00 2001 From: qvalentin Date: Sun, 3 Mar 2024 17:08:26 +0100 Subject: [PATCH] fix: tests --- internal/adapter/yamlls/diagnostics.go | 3 +-- internal/adapter/yamlls/diagnostics_integration_test.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/adapter/yamlls/diagnostics.go b/internal/adapter/yamlls/diagnostics.go index b9236ff0..40b32782 100644 --- a/internal/adapter/yamlls/diagnostics.go +++ b/internal/adapter/yamlls/diagnostics.go @@ -53,8 +53,7 @@ func diagnisticIsRelevant(diagnostic lsp.Diagnostic, node *sitter.Node) bool { logger.Debug("Checking if diagnostic is relevant", diagnostic.Message) switch diagnostic.Message { case "Map keys must be unique": - // return !lsplocal.IsInElseBranch(node) - return false + return !lsplocal.IsInElseBranch(node) case "All mapping items must start at the same column": // unknown what exactly this is, only causes one error in bitnami/charts return false diff --git a/internal/adapter/yamlls/diagnostics_integration_test.go b/internal/adapter/yamlls/diagnostics_integration_test.go index efd67490..a79eb9df 100644 --- a/internal/adapter/yamlls/diagnostics_integration_test.go +++ b/internal/adapter/yamlls/diagnostics_integration_test.go @@ -152,5 +152,5 @@ func TestYamllsDiagnosticsIntegration(t *testing.T) { } fmt.Printf("Checked %d files, found %d diagnostics\n", sentCount, diagnosticsCount) - assert.Empty(t, diagnosticsCount) + assert.Equal(t, diagnosticsCount, 22) }