diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3d488ddb..d741d6f6 100755 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,8 +44,8 @@ jobs: shard: all steps: - # C# buildless extraction scans the whole checkout regardless of source-root, so C# shards - # sparse-checkout only their folder (cone mode keeps root files such as global.json and nuget.config). + # Sparse-checkout limits C# buildless extraction to each shard's folder. + # Cone mode keeps root files such as global.json and nuget.config. - name: Checkout repository uses: actions/checkout@v4 with: @@ -57,7 +57,8 @@ jobs: with: languages: ${{ matrix.language }} build-mode: none - source-root: ${{ matrix.shard == 'all' && '.' || matrix.shard }} + # Keep alert paths repository-relative; sparse-checkout controls the extraction scope. + source-root: . # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file.