Upgrade to check-spelling v0.0.24 (#36235)

This upgrades to [v0.0.24](https://github.com/check-spelling/check-spelling/releases/tag/v0.0.24).

A number of GitHub APIs are being turned off shortly, so you need to upgrade or various uncertain outcomes will occur.

There's a new accessibility forbidden pattern:

> Do not use `(click) here` links
> For more information, see:
> * https://www.w3.org/QA/Tips/noClickHere
> * https://webaim.org/techniques/hypertext/link_text
> * https://granicus.com/blog/why-click-here-links-are-bad/
> * https://heyoka.medium.com/dont-use-click-here-f32f445d1021
```pl
(?i)(?:>|\[)(?:(?:click |)here|link|(?:read |)more)(?:</|\]\()
```

There are some minor bugs that I'm aware of and which I've fixed since this release, but I don't expect to make another release this month.

I've added a pair of patterns for includes and pragmas. My argument is that the **compiler** will _generally_ tell you if you've misspelled an include and the **linker** will _generally_ tell you if you misspell a lib.

- There's a caveat here: If your include case-insensitively matches the referenced file (but doesn't properly match it), then unless you either use a case-sensitive file system (as opposed to case-preserving) or beg clang to warn, you won't notice when you make this specific mistake -- this matters in that a couple of Windows headers (e.g. Unknwn.h) have particular case and repositories don't tend to consistently/properly write them.
This commit is contained in:
Josh Soref
2024-12-06 06:33:08 -10:00
committed by GitHub
parent 1212ce2216
commit 74a1a6eca2
84 changed files with 797 additions and 529 deletions

View File

@@ -163,7 +163,7 @@ namespace Microsoft.Plugin.Indexer
};
r.ContextData = searchResult;
// If the result is a directory, then it's display should show a directory.
// If the result is a directory, then its display should show a directory.
if (_fileSystem.Directory.Exists(path))
{
r.QueryTextDisplay = path;

View File

@@ -252,10 +252,10 @@ namespace Microsoft.Plugin.Program.Programs
logoUri = LogoUriFromManifest(manifestApp);
Enabled = true;
CanRunElevated = IfApplicationcanRunElevated();
CanRunElevated = IfApplicationCanRunElevated();
}
private bool IfApplicationcanRunElevated()
private bool IfApplicationCanRunElevated()
{
if (EntryPoint == "Windows.FullTrustApplication")
{

View File

@@ -132,7 +132,7 @@ namespace Microsoft.Plugin.Uri.UnitTests.UriHelper
// All following cases should be parsed as application URI
[DataRow("mailto:", true, null, "mailto:")]
[DataRow("mailto:/", false, null, null)]
[DataRow("mailto:example@mail.com", true, null, "mailto:example@mail.com")]
[DataRow("mailto:mail@example.com", true, null, "mailto:mail@example.com")]
[DataRow("ms-settings:", true, null, "ms-settings:")]
[DataRow("ms-settings:/", false, null, null)]
[DataRow("ms-settings://", false, null, null)]

View File

@@ -39,7 +39,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
{
if (!windowData.IsWindow)
{
Log.Debug($"Can not close the window '{windowData.Title}' ({windowData.Hwnd}), because it doesn't exist.", typeof(ContextMenuHelper));
Log.Debug($"Cannot close the window '{windowData.Title}' ({windowData.Hwnd}), because it doesn't exist.", typeof(ContextMenuHelper));
return false;
}
@@ -79,7 +79,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
// Validate process
if (!window.IsWindow || !window.Process.DoesExist || !window.Process.Name.Equals(WindowProcess.GetProcessNameFromProcessID(window.Process.ProcessID), StringComparison.Ordinal))
{
Log.Debug($"Can not kill process '{window.Process.Name}' ({window.Process.ProcessID}) of the window '{window.Title}' ({window.Hwnd}), because it doesn't exist.", typeof(ContextMenuHelper));
Log.Debug($"Cannot kill process '{window.Process.Name}' ({window.Process.ProcessID}) of the window '{window.Title}' ({window.Hwnd}), because it doesn't exist.", typeof(ContextMenuHelper));
return false;
}

View File

@@ -363,7 +363,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
{
if (_handlesToProcessCache.Count > 7000)
{
Debug.Print("Clearing Process Cache because it's size is " + _handlesToProcessCache.Count);
Debug.Print("Clearing Process Cache because its size is " + _handlesToProcessCache.Count);
_handlesToProcessCache.Clear();
}
@@ -381,7 +381,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
}
else
{
// For the dwm process we can not receive the name. This is no problem because the window isn't part of result list.
// For the dwm process we cannot receive the name. This is no problem because the window isn't part of result list.
Log.Debug($"Invalid process {processId} ({processName}) for window handle {hWindow}.", typeof(Window));
_handlesToProcessCache.Add(hWindow, new WindowProcess(0, 0, string.Empty));
}

View File

@@ -203,7 +203,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
}
/// <summary>
/// Kills the process by it's id. If permissions are required, they will be requested.
/// Kills the process by its id. If permissions are required, they will be requested.
/// </summary>
/// <param name="killProcessTree">Kill process and sub processes.</param>
internal void KillThisProcess(bool killProcessTree)

View File

@@ -20,7 +20,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Components
internal string Label { get; set; }
/// <summary>
/// Gets or sets an an alternative search tag that will be evaluated if label doesn't match. For example we like to show the era on searches for 'year' too.
/// Gets or sets an alternative search tag that will be evaluated if label doesn't match. For example we like to show the era on searches for 'year' too.
/// </summary>
internal string AlternativeSearchTag { get; set; }

View File

@@ -15,7 +15,7 @@ using Stopwatch = Wox.Infrastructure.Stopwatch;
namespace PowerLauncher.Helper
{
/// <Note>
/// On Windows operating system the name of environment variables is case insensitive. This means if we have a user and machine variable with differences in their name casing (eg. test vs Test), the name casing from machine level is used and won't be overwritten by the user var.
/// On Windows operating system the name of environment variables is case-insensitive. This means if we have a user and machine variable with differences in their name casing (eg. test vs Test), the name casing from machine level is used and won't be overwritten by the user var.
/// Example for Window's behavior: test=ValueMachine (Machine level) + TEST=ValueUser (User level) => test=ValueUser (merged)
/// To get the same behavior we use "StringComparer.OrdinalIgnoreCase" as compare property for the HashSet and Dictionaries where we merge machine and user variable names.
/// </Note>
@@ -96,7 +96,7 @@ namespace PowerLauncher.Helper
// Determine deleted variables and add them with a "string.Empty" value as marker to the dictionary
foreach (DictionaryEntry pVar in oldProcessEnvironment)
{
// We must compare case insensitive (see dictionary assignment) to avoid false positives when the variable name has changed (Example: "path" -> "Path")
// We must compare case-insensitive (see dictionary assignment) to avoid false positives when the variable name has changed (Example: "path" -> "Path")
if (!newEnvironment.ContainsKey((string)pVar.Key) & !_protectedProcessVariables.Contains((string)pVar.Key))
{
newEnvironment.Add((string)pVar.Key, string.Empty);
@@ -107,7 +107,7 @@ namespace PowerLauncher.Helper
// Later we only like to recreate the changed ones
foreach (string varName in newEnvironment.Keys.ToList())
{
// To be able to detect changed names correctly we have to compare case sensitive
// To be able to detect changed names correctly we have to compare case-sensitive
if (oldProcessEnvironment.Contains(varName))
{
if (oldProcessEnvironment[varName].Equals(newEnvironment[varName]))
@@ -155,7 +155,7 @@ namespace PowerLauncher.Helper
}
catch (Exception ex)
{
// The dotnet method "System.Environment.SetEnvironmentVariable" has it's own internal method to check the input parameters. Here we catch the exceptions that we don't check before updating the environment variable and log it to avoid crashes of PT Run.
// The dotnet method "System.Environment.SetEnvironmentVariable" has its own internal method to check the input parameters. Here we catch the exceptions that we don't check before updating the environment variable and log it to avoid crashes of PT Run.
Log.Exception($"Unhandled exception while updating the environment variable [{kv.Key}] for the PT Run process. (The variable value has a length of [{varValueLength}].)", ex, typeof(PowerLauncher.Helper.EnvironmentHelper));
}
}
@@ -189,7 +189,7 @@ namespace PowerLauncher.Helper
string uVarKey = (string)uVar.Key;
string uVarValue = (string)uVar.Value;
// The variable name of the path variable can be upper case, lower case ore mixed case. So we have to compare case insensitive.
// The variable name of the path variable can be upper case, lower case ore mixed case. So we have to compare case-insensitive.
if (!uVarKey.Equals(PathVariableName, StringComparison.OrdinalIgnoreCase))
{
environment[uVarKey] = uVarValue;

View File

@@ -617,7 +617,7 @@ namespace PowerLauncher
catch (ArgumentOutOfRangeException ex)
{
// Due to virtualization being enabled for the listview, the layout system updates elements in a deferred manner using an algorithm that balances performance and concurrency.
// Hence, there can be a situation where the element index that we want to scroll into view is out of range for it's parent control.
// Hence, there can be a situation where the element index that we want to scroll into view is out of range for its parent control.
// To mitigate this we use the UpdateLayout function, which forces layout update to ensure that the parent element contains the latest properties.
// However, it has a performance impact and is therefore not called each time.
Log.Exception("The parent element layout is not updated yet", ex, GetType());

View File

@@ -91,7 +91,7 @@ namespace Wox.Plugin.Common.VirtualDesktop.Helper
/// Method to update the list of Virtual Desktops from Registry
/// The data in the registry are always up to date
/// </summary>
/// <remarks>If we can not read from registry, we set the list/guid to empty values.</remarks>
/// <remarks>If we cannot read from registry, we set the list/guid to empty values.</remarks>
public void UpdateDesktopList()
{
int userSessionId = Process.GetCurrentProcess().SessionId;

View File

@@ -223,7 +223,7 @@ namespace Wox.Plugin
{
if (Plugin == null)
{
Log.Warn($"Can not initialize {Metadata.Name} plugin as it was not loaded", GetType());
Log.Warn($"Cannot initialize {Metadata.Name} plugin as it was not loaded", GetType());
return false;
}