From 7e17016d706da09d9419e9b306c46938e92a6e69 Mon Sep 17 00:00:00 2001 From: shanluo911 Date: Thu, 24 Feb 2022 15:36:47 +0800 Subject: [PATCH 1/2] Update docs validation (#7901) * update docs.validation and docs.validation.analyzer * update version of docs.validation and docs.validation.analyzer --- src/docfx/docfx.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docfx/docfx.csproj b/src/docfx/docfx.csproj index 05f0f88d46c..b32b572627a 100644 --- a/src/docfx/docfx.csproj +++ b/src/docfx/docfx.csproj @@ -14,7 +14,7 @@ - + @@ -43,7 +43,7 @@ - + From b06fe09e93c910d0b5001e314d393eb16c08a6a8 Mon Sep 17 00:00:00 2001 From: shanluo911 Date: Mon, 7 Mar 2022 13:56:48 +0800 Subject: [PATCH 2/2] filter out info level in vscode validation extension (#7915) --- docs/specs/lsp.yml | 11 +++++++++++ src/docfx/serve/LanguageServerBuilder.cs | 1 + 2 files changed, 12 insertions(+) diff --git a/docs/specs/lsp.yml b/docs/specs/lsp.yml index 74006abf786..5be1be7a1df 100644 --- a/docs/specs/lsp.yml +++ b/docs/specs/lsp.yml @@ -227,3 +227,14 @@ languageServer: .openpublishing.publish.config.json: "{}" - expectDiagnostics: .openpublishing.publish.config.json: [{"code": "config-not-found"}] +--- +# Info-level errors will be filtered out. +inputs: + docfx.yml: + a.md: +languageServer: + - openFiles: + a.md: | + + - expectDiagnostics: + a.md: [] diff --git a/src/docfx/serve/LanguageServerBuilder.cs b/src/docfx/serve/LanguageServerBuilder.cs index 73e6283df84..200b2f0356a 100644 --- a/src/docfx/serve/LanguageServerBuilder.cs +++ b/src/docfx/serve/LanguageServerBuilder.cs @@ -127,6 +127,7 @@ private void PublishDiagnosticsParams(ErrorList errors, IEnumerable { List filesWithDiagnostics = new(); var diagnosticsGroupByFile = from error in errors.ToArray() + where error.Level != ErrorLevel.Info let source = error.Source ?? new SourceInfo(new FilePath(".openpublishing.publish.config.json"), 0, 0) let diagnostic = ConvertToDiagnostics(error, source) group diagnostic by source.File;