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) }