View CodeQL results for multiple languages #10711
-
Hi, So I have this GitHub action which runs CodeQL on my codebase which has both Python and C++ code (the C++ code are Python extensions). However, when the action runs, it executes the queries on the Python (5437 lines) and C++ (470 lines) code, but in the Security tab, it only shows that 470 lines were executed (the C++ code). The action log: https://github.com/Aspect1103/Hades/actions/runs/3192388904/jobs/5209808332 Is there a way, I can view the results for both languages or am I doing something wrong? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
@nickfyson can you please help out here? |
Beta Was this translation helpful? Give feedback.
-
Thanks for this question, and having dug into it I can reassure you that you actually are successfully analysing both languages. Unfortunately the lines of code count in that banner is misleading in this situation. The approach in your workflow uploads results from both language scans as a single analysis with two runs, but unfortunately we are only counting one of these runs towards those statistics. Thanks for drawing this to our attention, and we'll hopefully have this fixed shortly! In the meantime, having looked at your workflow, you might want to consider more closely following the best-practices shown in the CodeQL starter workflow, which uses a matrix build. In this case you would see each language show up in that banner separately, with the correct count for lines of code (though obviously you will only ever see the most recent one to have completed). |
Beta Was this translation helpful? Give feedback.
Thanks for this question, and having dug into it I can reassure you that you actually are successfully analysing both languages. Unfortunately the lines of code count in that banner is misleading in this situation.
The approach in your workflow uploads results from both language scans as a single analysis with two runs, but unfortunately we are only counting one of these runs towards those statistics. Thanks for drawing this to our attention, and we'll hopefully have this fixed shortly!
In the meantime, having looked at your workflow, you might want to consider more closely following the best-practices shown in the CodeQL starter workflow, which uses a matrix build. In this case you would…