Skip to content

Commit 5a5e921

Browse files
authored
Merge pull request #13846 from owen-mc/go/better-baselines
Go: Add language-specific baseline configuration
2 parents a8c6444 + d98079d commit 5a5e921

File tree

5 files changed

+22
-1
lines changed

5 files changed

+22
-1
lines changed

go/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ CODEQL_PLATFORM = osx64
1414
endif
1515
endif
1616

17-
CODEQL_TOOLS = $(addprefix codeql-tools/,autobuild.cmd autobuild.sh pre-finalize.cmd pre-finalize.sh index.cmd index.sh identify-environment.cmd identify-environment.sh tracing-config.lua)
17+
CODEQL_TOOLS = $(addprefix codeql-tools/,autobuild.cmd autobuild.sh baseline-config-empty.json baseline-config-vendor.json configure-baseline.cmd configure-baseline.sh identify-environment.cmd identify-environment.sh index.cmd index.sh pre-finalize.cmd pre-finalize.sh tracing-config.lua)
1818

1919
EXTRACTOR_PACK_OUT = build/codeql-extractor-go
2020

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"paths-ignore": []
3+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"paths-ignore": [
3+
"vendor/**"
4+
]
5+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@echo off
2+
if exist vendor\modules.txt (
3+
type %CODEQL_EXTRACTOR_GO_ROOT%\tools\baseline-config-vendor.json
4+
) else (
5+
type %CODEQL_EXTRACTOR_GO_ROOT%\tools\baseline-config-empty.json
6+
)

go/codeql-tools/configure-baseline.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
if [ -f vendor/modules.txt ]; then
4+
cat $CODEQL_EXTRACTOR_GO_ROOT/tools/baseline-config-vendor.json
5+
else
6+
cat $CODEQL_EXTRACTOR_GO_ROOT/tools/baseline-config-empty.json
7+
fi

0 commit comments

Comments
 (0)