Skip to content

Mark Swift incompatible OS as configuration error#3801

Open
henrymercer wants to merge 1 commit intomainfrom
henrymercer/swift-incompatible-os
Open

Mark Swift incompatible OS as configuration error#3801
henrymercer wants to merge 1 commit intomainfrom
henrymercer/swift-incompatible-os

Conversation

@henrymercer
Copy link
Copy Markdown
Contributor

Reduce monitor noise by treating the incompatible OS error on Swift as a configuration error rather than an issue with the CodeQL Action.

@henrymercer henrymercer requested a review from a team as a code owner April 2, 2026 17:48
Copilot AI review requested due to automatic review settings April 2, 2026 17:48
@github-actions github-actions bot added the size/XS Should be very easy to review label Apr 2, 2026
Copy link
Copy Markdown
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

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.SwiftIncompatibleOs and 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.

Copy link
Copy Markdown
Member

@mbg mbg left a comment

Choose a reason for hiding this comment

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

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Should be very easy to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants