Skip to content

Commit 71adbea

Browse files
committed
codeql: Enable test file extraction in CI workflow
Configure the CodeQL workflow to include test files during database creation by setting CODEQL_EXTRACTOR_GO_OPTION_EXTRACT_TESTS=true. This allows the unclosed-resources query to detect leaks in test files, such as the missing Close() calls we found in files like internal/archive/archive_test.go. Without this setting, the Go extractor excludes *_test.go files by default, limiting the query's effectiveness. Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
1 parent 86ed0d5 commit 71adbea

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343
- go-git
4444
queries:
4545
- uses: ./codeql/queries/unclosed-resources.ql
46+
env:
47+
CODEQL_EXTRACTOR_GO_OPTION_EXTRACT_TESTS: true
4648

4749
- name: Perform CodeQL Analysis
4850
uses: github/codeql-action/analyze@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4

0 commit comments

Comments
 (0)