From dbb057f7db7454e0c3462accc53a5d336bdc4da6 Mon Sep 17 00:00:00 2001 From: Georg Jung Date: Tue, 13 Jul 2021 14:38:20 +0200 Subject: [PATCH] Fix SA1629 "... should end with a period" in generated xml docs Also, ... is generated like: /// Learn more about this API from docs.microsoft.com. while the end of is generated as: /// Read more on docs.microsoft.com. thus, beeing SA1629 compliant. --- src/Microsoft.Windows.CsWin32/Generator.cs | 2 +- test/Microsoft.Windows.CsWin32.Tests/GeneratorTests.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.Windows.CsWin32/Generator.cs b/src/Microsoft.Windows.CsWin32/Generator.cs index 6a1a34eb..1acb5dd1 100644 --- a/src/Microsoft.Windows.CsWin32/Generator.cs +++ b/src/Microsoft.Windows.CsWin32/Generator.cs @@ -2020,7 +2020,7 @@ private T AddApiDocumentation(string api, T memberDeclaration) else if (docs.HelpLink is object) { docCommentsBuilder.AppendLine(); - docCommentsBuilder.AppendLine($@"/// Learn more about this API from docs.microsoft.com."); + docCommentsBuilder.AppendLine($@"/// Learn more about this API from docs.microsoft.com."); docCommentsBuilder.Append("/// "); } diff --git a/test/Microsoft.Windows.CsWin32.Tests/GeneratorTests.cs b/test/Microsoft.Windows.CsWin32.Tests/GeneratorTests.cs index 7710f25d..1fdd897b 100644 --- a/test/Microsoft.Windows.CsWin32.Tests/GeneratorTests.cs +++ b/test/Microsoft.Windows.CsWin32.Tests/GeneratorTests.cs @@ -922,7 +922,7 @@ namespace UI.DisplayDevices { /// The DISPLAYCONFIG_SCANLINE_ORDERING enumeration specifies the method that the display uses to create an image on a screen. /// - /// Learn more about this API from docs.microsoft.com. + /// Learn more about this API from docs.microsoft.com. /// internal enum DISPLAYCONFIG_SCANLINE_ORDERING { @@ -1397,7 +1397,7 @@ internal static partial class PInvoke /// The return value indicates whether the DC was released. If the DC was released, the return value is 1. If the DC was not released, the return value is zero. /// /// - /// Learn more about this API from docs.microsoft.com. + /// Learn more about this API from docs.microsoft.com. /// [DllImport(""User32"", ExactSpelling = true)] [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] @@ -1803,7 +1803,7 @@ internal static partial class PInvoke /// If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. If the application is running under a debugger, the function will throw an exception if it receives either a handle value that is not valid or a pseudo-handle value. This can happen if you close a handle twice, or if you call CloseHandle on a handle returned by the FindFirstFile function instead of calling the FindClose function. /// /// - /// Learn more about this API from docs.microsoft.com. + /// Learn more about this API from docs.microsoft.com. /// [DllImport(""Kernel32"", ExactSpelling = true, SetLastError = true)] [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] @@ -1871,7 +1871,7 @@ internal static unsafe Microsoft.Win32.SafeHandles.SafeFileHandle CreateFile(str /// If the function succeeds, the return value is an open handle to the specified file, device, named pipe, or mail slot. If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError. /// /// - /// Learn more about this API from docs.microsoft.com. + /// Learn more about this API from docs.microsoft.com. /// [DllImport(""Kernel32"", ExactSpelling = true, EntryPoint = ""CreateFileW"", SetLastError = true)] [DefaultDllImportSearchPaths(DllImportSearchPath.System32)]