name: "CodeQL"

on:
  workflow_dispatch:


jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: [cpp]

    steps:
    - name: Checkout repository
      uses: actions/checkout@v5

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

    - name: Autobuild
      uses: github/codeql-action/autobuild@v4

    - name: Run CodeQL Query
      uses: github/codeql-action/analyze@v4
      with:
        category: 'custom'
        queries: ./codeql/custom-queries