From 41c5e122ba0539802c877652e72f2068bbfac0af Mon Sep 17 00:00:00 2001 From: Akhil Indurti Date: Wed, 11 Jan 2023 13:06:13 -0800 Subject: [PATCH 1/4] fix ArgumentNullException when accessing SymbolLocations --- src/PortToTripleSlash/src/libraries/Extensions.cs | 3 +++ src/PortToTripleSlash/src/libraries/ToTripleSlashPorter.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PortToTripleSlash/src/libraries/Extensions.cs b/src/PortToTripleSlash/src/libraries/Extensions.cs index d7927c6..3c1c06b 100644 --- a/src/PortToTripleSlash/src/libraries/Extensions.cs +++ b/src/PortToTripleSlash/src/libraries/Extensions.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Linq; namespace ApiDocsSync.PortToTripleSlash { @@ -59,6 +60,8 @@ public static string DocIdEscaped(this string docId) => // Checks if the passed string is considered "empty" according to the Docs repo rules. public static bool IsDocsEmpty(this string? s) => string.IsNullOrWhiteSpace(s) || s == Configuration.ToBeAdded; + + public static bool HasItems(this IEnumerable src) => src?.Any() ?? false; } } diff --git a/src/PortToTripleSlash/src/libraries/ToTripleSlashPorter.cs b/src/PortToTripleSlash/src/libraries/ToTripleSlashPorter.cs index 24ad955..ea5aadd 100644 --- a/src/PortToTripleSlash/src/libraries/ToTripleSlashPorter.cs +++ b/src/PortToTripleSlash/src/libraries/ToTripleSlashPorter.cs @@ -191,7 +191,7 @@ private async Task CollectSymbolLocationsFromReferencedProjectsAsync(DocsType do } } - if (!docsType.SymbolLocations.Any()) + if (!docsType.SymbolLocations.HasItems()) { Log.Error($"No symbols found for docs type '{docsType.DocId}'."); } From 8bb91033d2787c59eafa73e364eeb42ae3292738 Mon Sep 17 00:00:00 2001 From: carlossanlop <1175054+carlossanlop@users.noreply.github.com> Date: Wed, 11 Jan 2023 14:00:00 -0800 Subject: [PATCH 2/4] update nuget packages --- .../src/libraries/libraries.csproj | 18 +++++++++--------- src/PortToTripleSlash/tests/tests.csproj | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/PortToTripleSlash/src/libraries/libraries.csproj b/src/PortToTripleSlash/src/libraries/libraries.csproj index cd217d4..0c2b666 100644 --- a/src/PortToTripleSlash/src/libraries/libraries.csproj +++ b/src/PortToTripleSlash/src/libraries/libraries.csproj @@ -11,18 +11,18 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + diff --git a/src/PortToTripleSlash/tests/tests.csproj b/src/PortToTripleSlash/tests/tests.csproj index 298731b..1f26773 100644 --- a/src/PortToTripleSlash/tests/tests.csproj +++ b/src/PortToTripleSlash/tests/tests.csproj @@ -28,11 +28,11 @@ - - + + - - + + all From 2288fa8688c2a554b816e334b2d01221079e161f Mon Sep 17 00:00:00 2001 From: carlossanlop <1175054+carlossanlop@users.noreply.github.com> Date: Wed, 11 Jan 2023 14:07:18 -0800 Subject: [PATCH 3/4] Update tests nuget package from arcade --- src/PortToTripleSlash/tests/tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PortToTripleSlash/tests/tests.csproj b/src/PortToTripleSlash/tests/tests.csproj index 1f26773..322ec05 100644 --- a/src/PortToTripleSlash/tests/tests.csproj +++ b/src/PortToTripleSlash/tests/tests.csproj @@ -30,7 +30,7 @@ - + From f13673120a8bface54c94e25facf85d8bdd0215a Mon Sep 17 00:00:00 2001 From: Akhil Indurti Date: Wed, 11 Jan 2023 14:10:28 -0800 Subject: [PATCH 4/4] add nuget.config --- nuget.config | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 nuget.config diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..a6425c4 --- /dev/null +++ b/nuget.config @@ -0,0 +1,8 @@ + + + + + + + +