Mark Swift incompatible OS as configuration error#3801
Open
henrymercer wants to merge 1 commit intomainfrom
Open
Mark Swift incompatible OS as configuration error#3801henrymercer wants to merge 1 commit intomainfrom
henrymercer wants to merge 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces monitoring noise by classifying CodeQL CLI’s “Swift analysis is only supported on macOS” / [incompatible-os] failure as a configuration error (so it’s treated as a user/workflow issue rather than an action failure).
Changes:
- Added a new
CliConfigErrorCategory.SwiftIncompatibleOsand matching patterns to recognize the Swift incompatible-OS error. - Added an AVA test to ensure the incompatible-OS Swift error is wrapped into a
ConfigurationError. - Updated generated
lib/artifacts to reflect the TypeScript changes.
Reviewed changes
Copilot reviewed 2 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/cli-errors.ts | Adds SwiftIncompatibleOs category and regex candidates so the error is treated as a configuration error. |
| src/cli-errors.test.ts | Adds coverage asserting Swift incompatible-OS stderr is wrapped as ConfigurationError. |
| lib/upload-sarif-action.js | Generated bundle update reflecting new CLI error category. |
| lib/upload-sarif-action-post.js | Generated bundle update reflecting new CLI error category. |
| lib/upload-lib.js | Generated bundle update reflecting new CLI error category. |
| lib/start-proxy-action-post.js | Generated bundle update reflecting new CLI error category. |
| lib/setup-codeql-action.js | Generated bundle update reflecting new CLI error category. |
| lib/resolve-environment-action.js | Generated bundle update reflecting new CLI error category. |
| lib/init-action.js | Generated bundle update reflecting new CLI error category. |
| lib/init-action-post.js | Generated bundle update reflecting new CLI error category. |
| lib/autobuild-action.js | Generated bundle update reflecting new CLI error category. |
| lib/analyze-action.js | Generated bundle update reflecting new CLI error category. |
| lib/analyze-action-post.js | Generated bundle update reflecting new CLI error category. |
mbg
approved these changes
Apr 2, 2026
Member
mbg
left a comment
There was a problem hiding this comment.
This looks good to me, but couldn't we catch this earlier on / before we ever invoke the CLI? Or is this specifically to catch the case where there's no languages input but we are running on macOS and there's Swift code in the repo?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reduce monitor noise by treating the incompatible OS error on Swift as a configuration error rather than an issue with the CodeQL Action.