Skip to content

Commit 3daccad

Browse files
authored
Add C# support to CodeQL analysis workflow (Azure#13229)
Included 'csharp' in the language matrix and added DotNet setup steps for building C# projects. This enables CodeQL analysis for C# code alongside existing languages.
1 parent 0f3a4fc commit 3daccad

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'javascript', 'python', 'ruby', 'actions' ]
35+
language: [ 'javascript', 'python', 'ruby', 'actions', 'csharp' ]
3636
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'actions' ]
3737
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3838

@@ -51,6 +51,16 @@ jobs:
5151
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5252
queries: security-extended,security-and-quality
5353

54+
# ℹ️ Setup DotNet Versions to building C# projects
55+
- name: Setup DotNet Versions
56+
uses: actions/setup-dotnet@v5
57+
with:
58+
dotnet-version: |
59+
6.0.x
60+
7.0.x
61+
8.0.x
62+
9.0.x
63+
5464
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5565
# If this step fails, then you should remove it and run the build manually (see below)
5666
- name: Autobuild

0 commit comments

Comments
 (0)