Skip to content

Commit 86a80ec

Browse files
RadekCapclaude
andcommitted
ci: build Go with e2e tag for full CodeQL coverage
CodeQL autobuild runs `go build ./...` without custom tags, causing 225 Go files with `//go:build e2e` constraints to be detected but not analyzed. Replace autobuild for Go with a custom build step that includes the e2e tag so all Go files are scanned. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f682bad commit 86a80ec

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,13 @@ jobs:
5959
# By default, queries listed here will override any specified in a config file.
6060
# Prefix the list here with "+" to use these queries and those in the config file.
6161

62-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
63-
# If this step fails, then you should remove it and run the build manually (see below)
6462
- name: Autobuild
63+
if: matrix.language != 'go'
6564
uses: github/codeql-action/autobuild@87557b9c84dde89fdd9b10e88954ac2f4248e463 # v4.36.1
6665

67-
# ℹ️ Command-line programs to run using the OS shell.
68-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
69-
70-
# If the Autobuild fails above, remove it and uncomment the following three lines.
71-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
72-
73-
# - run: |
74-
# echo "Run, Build Application using script"
75-
# ./location_of_script_within_repo/buildscript.sh
66+
- name: Build Go
67+
if: matrix.language == 'go'
68+
run: go build -tags e2e ./...
7669

7770
- name: Perform CodeQL Analysis
7871
uses: github/codeql-action/analyze@87557b9c84dde89fdd9b10e88954ac2f4248e463 # v4.36.1

0 commit comments

Comments
 (0)