| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
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:
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. |
Sorry, something went wrong.
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?
Sorry, something went wrong.
We could, but AFAICT the information about compatible OSes is not machine readable, so this would mean duplicating the knowledge about incompatible OSes between the CLI and the Action. |
Sorry, something went wrong.
Isn't Swift just a special case in that regard or do we have other language/OS pairs that are not compatible? If it's just a special case for Swift, then I wouldn't be overly opposed to adding a check for that in the Action so that we can fail earlier. |
Sorry, something went wrong.
|
Looks like we already taught the Action about it, but it was a warning rather than a configuration error. Let's update that. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for finding that! One comment about that change.
Sorry, something went wrong.
| if ( | ||
| config.languages.includes(KnownLanguage.swift) && | ||
| process.platform === "linux" | ||
| ) { | ||
| throw new ConfigurationError( | ||
| `Swift analysis on Ubuntu runner images is no longer supported. Please migrate to a macOS runner.`, | ||
| ); | ||
| } |
There was a problem hiding this comment.
What happens if someone tries to analyse Swift on Windows? Should that also result in an error here? I imagine that the warning was specifically because we used to support Swift analysis on Linux. Now that we are turning this into an error to fail an analysis early, should we include Windows as well?
Sorry, something went wrong.
There was a problem hiding this comment.
I suppose we might as well :)
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Reduce monitor noise by treating the incompatible OS error on Swift as a configuration error rather than an issue with the CodeQL Action.