Skip to content

MdePkg: Fix Spelling Errors and Enforce Spell Check#12459

Open
os-d wants to merge 23 commits intotianocore:masterfrom
os-d:mdepkg_spell
Open

MdePkg: Fix Spelling Errors and Enforce Spell Check#12459
os-d wants to merge 23 commits intotianocore:masterfrom
os-d:mdepkg_spell

Conversation

@os-d
Copy link
Copy Markdown
Contributor

@os-d os-d commented Apr 14, 2026

Description

Currently, there are some thousands of spell check failures in MdePkg. The spell check plugin is also in audit only mode, so new failures are not caught. Thousands of lines of the CI build log are dedicated to spelling failures and are very annoying to scroll through. After this change, the MdePkg CI build log is 7,500 lines shorter.

Each associated area is split up into a separate commit where actual code changes are made (e.g. defines, structure fields, etc.). Where relevant, consumers are updated in the same commit to prevent having to redefine and then come back and drop the old definition.

All non-code change spelling fixes (i.e. comments) are in the final commit, which also adds all the words to ignore to the global cspell dictionary. The final commit disables AuditOnly in MdePkg so that new spelling errors will break the build and be caught.

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

N/A.

Integration Instructions

Some defines/structures/enums, etc. have had spelling fixes applied to them. Consumers should update accordingly.

Fix spelling errors in Mtftp4 definitions.

Update the consumer in NetworkPkg/Mtftp4Dxe accordingly.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
Fix a spelling error in the DHCP4 definitions
and fix up the consumers in NetworkPkg.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
@os-d os-d marked this pull request as ready for review April 15, 2026 14:49
@os-d
Copy link
Copy Markdown
Contributor Author

os-d commented Apr 15, 2026

@leiflindholm CI is passing so I've moved this out of draft. Please continue your review

Copy link
Copy Markdown
Contributor

@pierregondois pierregondois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Oliver,
Just one comment, also I made #12470 to help reducing the output of cspell

Comment thread .pytool/Plugin/SpellCheck/cspell.base.yaml
@os-d
Copy link
Copy Markdown
Contributor Author

os-d commented Apr 16, 2026

Put up a PR to fix edk2-platforms after this goes in: tianocore/edk2-platforms#977. Despite all the changes, the blast radius is pretty low, a lot of the definition changes are not widely used.

Comment thread .pytool/Plugin/SpellCheck/cspell.base.yaml Outdated
Comment thread MdePkg/Include/Library/UefiApplicationEntryPoint.h Outdated
Comment thread MdePkg/Include/Protocol/DiskIo2.h Outdated
Comment thread MdePkg/Include/Protocol/DiskIo2.h Outdated
Comment thread MdePkg/Include/Protocol/DiskIo2.h Outdated
Comment thread MdePkg/Include/Protocol/Dns4.h Outdated
Comment thread MdePkg/Include/Protocol/Dns6.h Outdated
Comment thread MdePkg/Include/Protocol/SerialIo.h Outdated
Comment thread MdePkg/Library/BaseSerialPortLibRiscVSbiLib/BaseSerialPortLibRiscVSbiLib.c Outdated
Comment thread MdePkg/Library/BaseSerialPortLibRiscVSbiLib/BaseSerialPortLibRiscVSbiLibRam.c Outdated
@os-d
Copy link
Copy Markdown
Contributor Author

os-d commented Apr 16, 2026

@mikebeaton thanks for the reviews. Let me know when you are done and I will apply the requested changes from you and @pierregondois to not change the tree out from under you while reviewing.

@mikebeaton
Copy link
Copy Markdown
Member

@mikebeaton thanks for the reviews. Let me know when you are done and I will apply the requested changes from you and @pierregondois to not change the tree out from under you while reviewing.

Done. Thanks.

@os-d
Copy link
Copy Markdown
Contributor Author

os-d commented Apr 16, 2026

@mikebeaton thanks for the reviews. Let me know when you are done and I will apply the requested changes from you and @pierregondois to not change the tree out from under you while reviewing.

Done. Thanks.

Thanks, for any other reviewers, I recommend pausing until I push up the current requested changes. If anyone else is actively reviewing, let me know, I will hold off pushing changes until your review is finished.

Update the global cspell dictionary with allowed
words from MdePkg.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
@os-d
Copy link
Copy Markdown
Contributor Author

os-d commented Apr 16, 2026

@mikebeaton @pierregondois I have addressed your feedback, please re-review when you have a chance.

Comment thread MdePkg/Include/Library/SerialPortLib.h Outdated
Comment thread MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.c Outdated
os-d added 2 commits April 17, 2026 14:45
This fixes all non-breaking spelling errors in
MdePkg.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
Now that all spelling errors have been fixed,
disable AuditOnly mode to catch future spelling
errors in PR gates.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:breaking-change This change breaks existing APIs impacting build or boot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants