← 输入框|github.com|刷新
Skip to content

Explain how to override language autodetection in CodeQL errors - #4335

Open
therealsamyak wants to merge 10000 commits into
github:mainfrom
therealsamyak:fix/4334-skip-languages-without-files
Open

therealsamyak wants to merge 10000 commits into
github:mainfrom
therealsamyak:fix/4334-skip-languages-without-files

Conversation

@therealsamyak

@therealsamyak therealsamyak commented Nov 19, 2026 •

Copy link
Copy Markdown

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 languages input on init if 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 .xsjs file 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 languages input to select the languages to analyze.

How did/will you validate this change?

  • The exit-code-32 unit test verifies that the Action preserves the original diagnostic and adds the new guidance.
  • npm run build, npm run lint, and npm run test pass.
  • The change-note validator passes.

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

  • Existing workflows retain the same language selection and failure behavior.
  • The change note is in unreleased-change-notes/no-source-code-language-guidance.md.
  • The guidance matches the existing troubleshooting documentation.

Loading
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.

7 participants