Skip to content

Sync eng/common directory with azure-sdk-tools for PR 14308#48220

Open
azure-sdk wants to merge 1 commit intomainfrom
sync-eng/common-djurek/spelling-invalid-config-14308
Open

Sync eng/common directory with azure-sdk-tools for PR 14308#48220
azure-sdk wants to merge 1 commit intomainfrom
sync-eng/common-djurek/spelling-invalid-config-14308

Conversation

@azure-sdk
Copy link
Collaborator

Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#14308 See eng/common workflow

@azure-sdk azure-sdk requested a review from a team as a code owner March 4, 2026 05:08
@azure-sdk azure-sdk requested review from Copilot and danieljurek March 4, 2026 05:08
@azure-sdk azure-sdk added EngSys This issue is impacting the engineering system. Central-EngSys This issue is owned by the Engineering System team. labels Mar 4, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Syncs eng/common spellcheck behavior with azure-sdk-tools by improving how the changed-files spellcheck script interprets failures from the underlying cspell invocation.

Changes:

  • Capture cspell’s process exit code after invoking Invoke-Cspell.ps1.
  • Fail the script (when -ExitWithError is set) if cspell exits non-zero even when no spelling output is produced.

Comment on lines +134 to +136
} elseif ($cspellExitCode -ne 0 -and $ExitWithError) {
LogError "CSpell exited with code $cspellExitCode. This may indicate a configuration error or other failure in the spell checking tool."
exit 1
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

The new $cspellExitCode handling still reports success when Invoke-Cspell.ps1 fails but -ExitWithError isn’t set: the script will fall into the final else and print "No spelling errors detected" while returning 0. Consider treating non-zero cspell exit codes as failures (or at least logging a warning and exiting with the same non-zero code) regardless of -ExitWithError, so CI tasks configured with continueOnError: true still surface tool/config failures as a warning rather than a silent pass.

Suggested change
} elseif ($cspellExitCode -ne 0 -and $ExitWithError) {
LogError "CSpell exited with code $cspellExitCode. This may indicate a configuration error or other failure in the spell checking tool."
exit 1
} elseif ($cspellExitCode -ne 0) {
if ($ExitWithError) {
LogError "CSpell exited with code $cspellExitCode. This may indicate a configuration error or other failure in the spell checking tool."
} else {
LogWarning "CSpell exited with code $cspellExitCode. This may indicate a configuration error or other failure in the spell checking tool."
}
exit $cspellExitCode

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants