Skip to content

Commit bb56954

Browse files
authored
Enable C++ Code Analysis (#6642)
* Try add C++ code scanning * Add languages correctly via strategy * Try CPP build without autobuild * Try none build mode for C++ * Update init and analyze versions * Minor fixes * Remove extra space on language and build-mode * Try commenting out init * Define matrix first * Define each language separately
1 parent 2ada781 commit bb56954

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

.github/workflows/codeql.yml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,40 @@ on:
1010
- cron: '0 19 * * 0'
1111
workflow_dispatch:
1212

13-
permissions:
14-
security-events: write
15-
1613
jobs:
17-
CodeQL-Build:
14+
analyze:
15+
name: Analyze
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
- language: javascript-typescript
22+
build-mode: none
23+
- language: cpp
24+
build-mode: none
1825

1926
# CodeQL runs on ubuntu-latest and windows-latest
2027
runs-on: ubuntu-latest
28+
permissions:
29+
security-events: write
30+
# required to fetch internal or private CodeQL packs
31+
packages: read
2132

2233
steps:
2334
- name: Checkout repository
2435
uses: actions/checkout@main
25-
36+
2637
# Initializes the CodeQL tools for scanning.
2738
- name: Initialize CodeQL
28-
uses: github/codeql-action/init@v3
39+
uses: github/codeql-action/init@v4
2940
with:
30-
languages: javascript
31-
32-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
33-
# If this step fails, then you should remove it and run the build manually (see below)
34-
- name: Autobuild
35-
uses: github/codeql-action/autobuild@v3
41+
languages: ${{ matrix.language }}
42+
build-mode: ${{ matrix.build-mode }}
43+
# # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
44+
# # If this step fails, then you should remove it and run the build manually (see below)
45+
# - name: Autobuild
46+
# uses: github/codeql-action/autobuild@v3
3647

3748
# ℹ️ Command-line programs to run using the OS shell.
3849
# 📚 https://git.io/JvXDl
@@ -46,4 +57,6 @@ jobs:
4657
# make release
4758

4859
- name: Perform CodeQL Analysis
49-
uses: github/codeql-action/analyze@v3
60+
uses: github/codeql-action/analyze@v4
61+
with:
62+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)