Commit cb786ff
committed
Allow language specification for CodeQL
The CodeQL action decides which languages to analyse based on the file
extensions present in a repo. However, if it finds no analysable code
for one of those languages, it will error
https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/no-source-code-seen-during-build
This change will allow us to specify which languages should be analysed
so that we can exclude a language for which there's no analysable code
https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#changing-the-languages-that-are-analyzed
This does mean that if analysable code is later added to a repo where
its language has been ignored, we wouldn't be analysing it. That doesn't
feel great, but this seems to be a limitation of CodeQL
The following PR exhibited this error:
alphagov/govuk-content-api-docs#204. We have .js
files in that repo but they only contain (magic) comments. This wasn't
an issue with older versions of CodeQL. We're currently using 2.23.5 -
the last merged PR used 2.23.2 and passed the CodeQL checks:
alphagov/govuk-content-api-docs#2031 parent 3bc0f46 commit cb786ff
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| |||
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
0 commit comments