Keep CodeQL c-cpp analysis buildless#838
Conversation
|
@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: 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! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Sorry @Bryan-Roe, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
There was a problem hiding this comment.
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-cppmatrix entry back tobuild-mode: none. - Update the workflow header comment to reflect the buildless C/C++ lane intent.
- Add a unit test asserting the
c-cpplane 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. |
| 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." |
The
Analyze (c-cpp)CodeQL job regressed by switching toautobuild, which caused CodeQL to invoke the repository rootMakefileinstead of performing analysis directly. That path pulled in Python lint/test targets and failed before C/C++ analysis could run.Workflow fix
c-cppmatrix entry in.github/workflows/codeql.ymltobuild-mode: noneRegression coverage
tests/test_codeql_workflow_paths_ignore.pythat asserts thec-cppCodeQL lane remains onbuild-mode: noneautobuildon a repository whose root build entrypoint is not a valid C/C++ buildBehavioral change
makepath forc-cpp