Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support an empty list of languages in order for codeQL to autodetect them #100

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Apr 16, 2024

Apparently codeQL no longer handles the fact where languages are set but
are not present in the repository and instead errors out.

There is a relatively recent change (Oct-23) to codeQL that is able to
autodetect the languages used:
https://github.blog/changelog/2023-10-23-code-scanning-default-setup-automatically-includes-all-codeql-supported-languages/
and especially:
https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning
says:
"""
If your workflow does not contain a matrix called language, then CodeQL
is configured to run analysis sequentially. If you don't specify
languages in the workflow, CodeQL automatically detects, and attempts to
analyze, any supported languages in the repository.
"""

Let's use that feature instead. Unfortunately this is a breaking change.

…them

Apparently codeQL no longer handles the fact where languages are set but
are not present in the repository and instead errors out.

There is a relatively recent change (Oct-23) to codeQL that is able to
autodetect the languages used:
https://github.blog/changelog/2023-10-23-code-scanning-default-setup-automatically-includes-all-codeql-supported-languages/
and especially:
https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning
says:
"""
If your workflow does not contain a matrix called language, then CodeQL
is configured to run analysis sequentially. If you don't specify
languages in the workflow, CodeQL automatically detects, and attempts to
analyze, any supported languages in the repository.
"""

Let's use that feature instead. Unfortunately this is a breaking change.
@jhrozek jhrozek merged commit 8663709 into main Apr 17, 2024
3 checks passed
@jhrozek jhrozek deleted the codeql_autodetect branch April 17, 2024 07:34
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.

2 participants