mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Merge pull request #13846 from owen-mc/go/better-baselines
Go: Add language-specific baseline configuration
This commit is contained in:
@@ -14,7 +14,7 @@ CODEQL_PLATFORM = osx64
|
||||
endif
|
||||
endif
|
||||
|
||||
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)
|
||||
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)
|
||||
|
||||
EXTRACTOR_PACK_OUT = build/codeql-extractor-go
|
||||
|
||||
|
||||
3
go/codeql-tools/baseline-config-empty.json
Normal file
3
go/codeql-tools/baseline-config-empty.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"paths-ignore": []
|
||||
}
|
||||
5
go/codeql-tools/baseline-config-vendor.json
Normal file
5
go/codeql-tools/baseline-config-vendor.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"paths-ignore": [
|
||||
"vendor/**"
|
||||
]
|
||||
}
|
||||
6
go/codeql-tools/configure-baseline.cmd
Normal file
6
go/codeql-tools/configure-baseline.cmd
Normal file
@@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
if exist vendor\modules.txt (
|
||||
type %CODEQL_EXTRACTOR_GO_ROOT%\tools\baseline-config-vendor.json
|
||||
) else (
|
||||
type %CODEQL_EXTRACTOR_GO_ROOT%\tools\baseline-config-empty.json
|
||||
)
|
||||
7
go/codeql-tools/configure-baseline.sh
Executable file
7
go/codeql-tools/configure-baseline.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f vendor/modules.txt ]; then
|
||||
cat $CODEQL_EXTRACTOR_GO_ROOT/tools/baseline-config-vendor.json
|
||||
else
|
||||
cat $CODEQL_EXTRACTOR_GO_ROOT/tools/baseline-config-empty.json
|
||||
fi
|
||||
Reference in New Issue
Block a user