Repository navigation
Explain how to override language autodetection in CodeQL errors - #4335
Open
therealsamyak wants to merge 10000 commits into
Open
therealsamyak wants to merge 10000 commits into
therealsamyak wants to merge 10000 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #4334.
The GitHub languages API describes the default branch. Automatic language detection can therefore select a language that is absent from the checkout.
When CodeQL reports that it saw no source code, the Action preserves the original error. It adds guidance to set the
languagesinput oninitif automatic detection selected a language that is absent. A no-source error can also indicate an extraction or build problem. In CodeQL CLI 2.27.5, an absent JavaScript source and a malformed.xsjsfile can produce the same finalization error.This PR provides troubleshooting guidance for #4334. Automatic skipping requires CodeQL to distinguish missing sources from extraction failures.
Risk assessment
This change affects the text of no-source-code errors. Language selection and analysis behavior remain unchanged.
Which use cases does this change impact?
Code Scanning and Code Quality runs can see the additional guidance on GitHub.com and GitHub Enterprise Server. Advanced setup workflows can use the
languagesinput to select the languages to analyze.How did/will you validate this change?
npm run build,npm run lint, andnpm run testpass.If something goes wrong after this change is released, what are the mitigation and rollback strategies?
Revert the message change to restore the previous wording.
How will you know if something goes wrong after this change is released?
The guidance appears in the failed workflow's error message. The regression test checks that the error remains a configuration error.
Are there any special considerations for merging or releasing this change?
No changes in other repositories are required for the guidance.
Merge / deployment checklist
unreleased-change-notes/no-source-code-language-guidance.md.