Skip to content

Conversation

@Javagedes
Copy link
Contributor

Description

In the implementation of the SpellCheck prior to this commit, the logic
assumed that if it was able to successfully call cspell --version to
get the version, then any future usage of cspell would work without
error. PR #11783 brought to light an issue in this logic where if the
node version was too out of date, cspell could successfully run
cspell --version but would hit a runtime error when actually
performing a spell check on a package. This ultimetly resulted in
cspell not running for any package but still reporting a "Success".

This commit updates the error handling logic in the SpellCheck when
running cspell to ensure that when cspell error lines were reported, at
least one misspelled word must be found. In the scenario where error
lines are reported, but no misspelled words were found, we now assume a
runtime error occurred in cspell, log it, and fail the plugin.

  • 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

Continious Integration

Integration Instructions

N/A

@Javagedes Javagedes force-pushed the personal/joeyvagedes/cspell-fix branch from 81bf76f to aa4ff69 Compare December 1, 2025 17:22
In the implementation of the SpellCheck prior to this commit, the logic
assumed that if it was able to successfully call `cspell --version` to
get the version, then any future usage of cspell would work without
error. PR tianocore#11783 brought to light an issue in this logic where if the
node version was too out of date, `cspell` could successfully run
`cspell --version` but would hit a runtime error when actually
performing a spell check on a package. This ultimetly resulted in
cspell not running for any package but still reporting a "Success".

This commit updates the error handling logic in the SpellCheck when
running cspell to ensure that when cspell error lines were reported, at
least one misspelled word must be found. In the scenario where error
lines are reported, but no misspelled words were found, we now assume a
runtime error occurred in cspell, log it, and fail the plugin.

Signed-off-by: Joey Vagedes <[email protected]>
@Javagedes Javagedes force-pushed the personal/joeyvagedes/cspell-fix branch from aa4ff69 to dd4c043 Compare December 2, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant