Skip to main content

Some languages were not analyzed with CodeQL advanced setup

If some languages were not analyzed, you can modify your code scanning workflow to add a matrix specifying the languages you want to analyze.

참고 항목

이 문서에서는 이 GitHub Enterprise Server 버전의 초기 릴리스에 포함된 CodeQL 작업과 관련 CodeQL CLI 번들의 버전에서 사용할 수 있는 기능을 설명합니다. 엔터프라이즈에서 더 최신 버전의 CodeQL 작업을 사용하는 경우, 최신 기능에 대한 자세한 내용은 이 문서의GitHub Enterprise Cloud 버전을 참조하세요. 최신 버전 사용에 대한 자세한 내용은 어플라이언스에 대한 코드 스캐닝 구성을(를) 참조하세요.

If you're using advanced setup and your workflow doesn't explicitly specify the languages to analyze, CodeQL implicitly detects the supported languages in your code base. In this configuration, out of the compiled languages C/C++, C#, Go, Java, Kotlin, Rust(공개 미리 보기), 및 Swift, CodeQL only analyzes the language with the most source files. Edit the workflow and add a matrix specifying the languages you want to analyze. The default CodeQL analysis workflow uses such a matrix.

The following extracts from a workflow show how you can use a matrix within the job strategy to specify languages, and then reference each language within the "Initialize CodeQL" step:

jobs:
  analyze:
    permissions:
      security-events: write
      actions: read
    # ...
    strategy:
      fail-fast: false
      matrix:
        language: ['csharp', 'c-cpp', 'javascript-typescript']

    steps:
    # ...
      - name: Initialize CodeQL
        uses: github/codeql-action/init@v4
        with:
          languages: ${{ matrix.language }}

For more information about editing the workflow, see 코드 검사를 위한 고급 설정을 사용자 지정하기.