Skip to content

Keep CodeQL c-cpp analysis buildless#838

Merged
Bryan-Roe merged 2 commits into
mainfrom
copilot/fix-analyze-c-cpp-job
Jul 11, 2026
Merged

Keep CodeQL c-cpp analysis buildless#838
Bryan-Roe merged 2 commits into
mainfrom
copilot/fix-analyze-c-cpp-job

Conversation

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

The Analyze (c-cpp) CodeQL job regressed by switching to autobuild, which caused CodeQL to invoke the repository root Makefile instead of performing analysis directly. That path pulled in Python lint/test targets and failed before C/C++ analysis could run.

  • Workflow fix

    • Restore the c-cpp matrix entry in .github/workflows/codeql.yml to build-mode: none
    • Update the workflow comment to reflect that the C/C++ lane is intentionally buildless
  • Regression coverage

    • Add a focused test in tests/test_codeql_workflow_paths_ignore.py that asserts the c-cpp CodeQL lane remains on build-mode: none
    • This guards against reintroducing autobuild on a repository whose root build entrypoint is not a valid C/C++ build
  • Behavioral change

    • The CodeQL workflow no longer attempts to run the repo-wide make path for c-cpp
    • The lane stays aligned with the repository’s prior working CodeQL configuration
- language: c-cpp
  build-mode: none
  os: ubuntu-latest
  timeout-minutes: 360

Copilot AI review requested due to automatic review settings July 11, 2026 04:02

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

@Bryan-Roe Unfortunately, I hit an error while trying to use the custom Copilot setup steps configured for this repository and had to close this PR. The error I am seeing is:

no `copilot-setup-steps` job found in your `copilot-setup-steps.yml` workflow file. Please ensure you have a single job named `copilot-setup-steps`. For more details, see https://gh.io/copilot/actions-setup-steps

Once you or someone with the necessary access fixes the problem, please unassign and then reassign issue #0 to me and I'll retry. Thanks!

Copilot AI removed the request for review from Copilot July 11, 2026 04:02
Copilot AI requested review from Copilot and removed request for Copilot July 11, 2026 04:04
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Analyze (c-cpp) Keep CodeQL c-cpp analysis buildless Jul 11, 2026
Copilot AI requested a review from Bryan-Roe July 11, 2026 04:07
@Bryan-Roe Bryan-Roe marked this pull request as ready for review July 11, 2026 04:11
Copilot AI review requested due to automatic review settings July 11, 2026 04:11
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry @Bryan-Roe, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@Bryan-Roe Bryan-Roe merged commit 5249db3 into main Jul 11, 2026
5 of 10 checks passed
@Bryan-Roe Bryan-Roe deleted the copilot/fix-analyze-c-cpp-job branch July 11, 2026 04:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 restores the CodeQL c-cpp analysis lane to be intentionally buildless (build-mode: none) to avoid autobuild invoking the repository root Makefile and failing before C/C++ analysis can run.

Changes:

  • Switch the CodeQL c-cpp matrix entry back to build-mode: none.
  • Update the workflow header comment to reflect the buildless C/C++ lane intent.
  • Add a unit test asserting the c-cpp lane stays buildless (regression guard).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/codeql.yml Restores c-cpp lane to build-mode: none and updates documentation comment accordingly.
tests/test_codeql_workflow_paths_ignore.py Adds a regression test ensuring the c-cpp CodeQL lane remains buildless and refactors an assertion for formatting.

Comment on lines +26 to +32
c_cpp_entry = next(
entry for entry in workflow["jobs"]["analyze"]["strategy"]["matrix"]["include"] if entry["language"] == "c-cpp"
)

assert (
c_cpp_entry["build-mode"] == "none"
), "The c-cpp CodeQL lane must stay buildless so it does not invoke the repo root Makefile via autobuild."
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.

3 participants