Updates for check-spelling v0.0.25 (#40386)

## Summary of the Pull Request

- #39572 updated check-spelling but ignored:
   > 🐣 Breaking Changes
[Code Scanning action requires a Code Scanning
Ruleset](https://github.com/check-spelling/check-spelling/wiki/Breaking-Change:-Code-Scanning-action-requires-a-Code-Scanning-Ruleset)
If you use SARIF reporting, then instead of the workflow yielding an 
when it fails, it will rely on [github-advanced-security
🤖](https://github.com/apps/github-advanced-security) to report the
failure. You will need to adjust your checks for PRs.

This means that check-spelling hasn't been properly doing its job 😦.

I'm sorry, I should have pushed a thing to this repo earlier,...

Anyway, as with most refreshes, this comes with a number of fixes, some
are fixes for typos that snuck in before the 0.0.25 upgrade, some are
for things that snuck in after, some are based on new rules in
spell-check-this, and some are hand written patterns based on running
through this repository a few times.

About the 🐣 **breaking change**: someone needs to create a ruleset for
this repository (see [Code Scanning action requires a Code Scanning
Ruleset: Sample ruleset

](https://github.com/check-spelling/check-spelling/wiki/Breaking-Change:-Code-Scanning-action-requires-a-Code-Scanning-Ruleset#sample-ruleset)).

The alternative to adding a ruleset is to change the condition to not
use sarif for this repository. In general, I think the github
integration from sarif is prettier/more helpful, so I think that it's
the better choice.

You can see an example of it working in:
- https://github.com/check-spelling-sandbox/PowerToys/pull/23

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Mike Griese <migrie@microsoft.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
This commit is contained in:
Josh Soref
2025-07-08 18:16:52 -04:00
committed by GitHub
parent f34735edeb
commit bf16e10baf
199 changed files with 950 additions and 697 deletions

View File

@@ -49,7 +49,7 @@ namespace EditorHelpers
return numberOfSameType > 1;
}
// Function to return true if the shortcut is valid. A valid shortcut has atleast one modifier, as well as an action key
// Function to return true if the shortcut is valid. A valid shortcut has at least one modifier, as well as an action key
bool IsValidShortcut(Shortcut shortcut)
{
if (shortcut.operationType == Shortcut::OperationType::RunProgram && shortcut.runProgramFilePath.length() > 0)

View File

@@ -11,7 +11,7 @@ namespace EditorHelpers
// Function to check if a modifier has been repeated in the previous drop downs
bool CheckRepeatedModifier(const std::vector<int32_t>& currentKeys, int selectedKeyCodes);
// Function to return true if the shortcut is valid. A valid shortcut has atleast one modifier, as well as an action key
// Function to return true if the shortcut is valid. A valid shortcut has at least one modifier, as well as an action key
bool IsValidShortcut(Shortcut shortcut);
// Function to check if the two shortcuts are equal or cover the same set of keys. Return value depends on type of overlap

View File

@@ -314,7 +314,7 @@ void KeyDropDownControl::SetSelectionHandler(StackPanel& table, StackPanel row,
}
}
// If the user searches for a key the selection handler gets invoked however if they click away it reverts back to the previous state. This can result in dangling references to added drop downs which were then reset.
// If the user searches for a key, the selection handler gets invoked; however if they click away it reverts back to the previous state. This can result in dangling references to added drop downs which were then reset.
// We handle this by removing the drop down if it no longer a child of the parent
for (long long i = keyDropDownControlObjects.size() - 1; i >= 0; i--)
{

View File

@@ -472,9 +472,9 @@ ShortcutControl& ShortcutControl::AddNewShortcutControlRow(StackPanel& parent, s
deleteShortcut.SetValue(Automation::AutomationProperties::NameProperty(), box_value(GET_RESOURCE_STRING(IDS_DELETE_REMAPPING_BUTTON)));
// Add tooltip for delete button which would appear on hover
ToolTip deleteShortcuttoolTip;
deleteShortcuttoolTip.Content(box_value(GET_RESOURCE_STRING(IDS_DELETE_REMAPPING_BUTTON)));
ToolTipService::SetToolTip(deleteShortcut, deleteShortcuttoolTip);
ToolTip deleteShortcutToolTip;
deleteShortcutToolTip.Content(box_value(GET_RESOURCE_STRING(IDS_DELETE_REMAPPING_BUTTON)));
ToolTipService::SetToolTip(deleteShortcut, deleteShortcutToolTip);
StackPanel deleteShortcutContainer = StackPanel();
deleteShortcutContainer.Name(L"deleteShortcutContainer");

View File

@@ -392,7 +392,7 @@ namespace RemappingUITests
});
}
// Test if the ValidateShortcutBufferElement method returns no error and no drop down action is required on setting last drop down to an action key on a column with atleast two drop downs
// Test if the ValidateShortcutBufferElement method returns no error and no drop down action is required on setting last drop down to an action key on a column with at least two drop downs
TEST_METHOD (ValidateShortcutBufferElement_ShouldReturnNoErrorAndNoAction_OnSettingLastDropDownToActionKeyOnAColumnWithAtleastTwoDropDowns)
{
std::vector<ValidateShortcutBufferElementArgs> testCases;

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<Window
x:Class="KeyboardManagerEditorUI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

View File

@@ -88,7 +88,7 @@ namespace
namespace KeyboardEventHandlers
{
// Function to a handle a single key remap
// Function to handle a single key remap
intptr_t HandleSingleKeyRemapEvent(KeyboardManagerInput::InputInterface& ii, LowlevelKeyboardEvent* data, State& state) noexcept
{
// Check if the key event was generated by KeyboardManager to avoid remapping events generated by us.
@@ -219,7 +219,7 @@ namespace KeyboardEventHandlers
/* This feature has not been enabled (code from proof of concept stage)
*
// Function to a change a key's behavior from toggle to modifier
// Function to change a key's behavior from toggle to modifier
__declspec(dllexport) intptr_t HandleSingleKeyToggleToModEvent(InputInterface& ii, LowlevelKeyboardEvent* data, State& State) noexcept
{
// Check if the key event was generated by KeyboardManager to avoid remapping events generated by us.
@@ -266,7 +266,7 @@ namespace KeyboardEventHandlers
}
*/
// Function to a handle a shortcut remap
// Function to handle a shortcut remap
intptr_t HandleShortcutRemapEvent(KeyboardManagerInput::InputInterface& ii, LowlevelKeyboardEvent* data, State& state, const std::optional<std::wstring>& activatedApp) noexcept
{
auto resetChordsResults = ResetChordsIfNeeded(data, state, activatedApp);
@@ -1684,7 +1684,7 @@ namespace KeyboardEventHandlers
return false;
}
// Function to a handle an os-level shortcut remap
// Function to handle an os-level shortcut remap
intptr_t HandleOSLevelShortcutRemapEvent(KeyboardManagerInput::InputInterface& ii, LowlevelKeyboardEvent* data, State& state) noexcept
{
// Check if the key event was generated by KeyboardManager to avoid remapping events generated by us.
@@ -1697,7 +1697,7 @@ namespace KeyboardEventHandlers
return 0;
}
// Function to a handle an app-specific shortcut remap
// Function to handle an app-specific shortcut remap
intptr_t HandleAppSpecificShortcutRemapEvent(KeyboardManagerInput::InputInterface& ii, LowlevelKeyboardEvent* data, State& state) noexcept
{
// Check if the key event was generated by KeyboardManager to avoid remapping events generated by us.

View File

@@ -17,15 +17,15 @@ namespace KeyboardEventHandlers
bool AnyChordStarted;
};
// Function to a handle a single key remap
// Function to handle a single key remap
intptr_t HandleSingleKeyRemapEvent(KeyboardManagerInput::InputInterface& ii, LowlevelKeyboardEvent* data, State& state) noexcept;
/* This feature has not been enabled (code from proof of concept stage)
// Function to a change a key's behavior from toggle to modifier
// Function to change a key's behavior from toggle to modifier
__declspec(dllexport) intptr_t HandleSingleKeyToggleToModEvent(InputInterface& ii, LowlevelKeyboardEvent* data, State& state) noexcept;
*/
// Function to a handle a shortcut remap
// Function to handle a shortcut remap
intptr_t HandleShortcutRemapEvent(KeyboardManagerInput::InputInterface& ii, LowlevelKeyboardEvent* data, State& state, const std::optional<std::wstring>& activatedApp = std::nullopt) noexcept;
// Function to reset chord matching
@@ -68,15 +68,15 @@ namespace KeyboardEventHandlers
// Function to get just the file name from a fill path
std::wstring GetFileNameFromPath(const std::wstring& fullPath);
// Function to a find and show a running program
// Function to find and show a running program
bool ShowProgram(DWORD pid, std::wstring programName, bool isNewProcess, bool minimizeIfVisible, int retryCount);
bool HideProgram(DWORD pid, std::wstring programName, int retryCount);
// Function to a handle an os-level shortcut remap
// Function to handle an os-level shortcut remap
intptr_t HandleOSLevelShortcutRemapEvent(KeyboardManagerInput::InputInterface& ii, LowlevelKeyboardEvent* data, State& state) noexcept;
// Function to a handle an app-specific shortcut remap
// Function to handle an app-specific shortcut remap
intptr_t HandleAppSpecificShortcutRemapEvent(KeyboardManagerInput::InputInterface& ii, LowlevelKeyboardEvent* data, State& state) noexcept;
// Function to generate a unicode string in response to a single keypress