зеркало из https://github.com/github/codeql-go.git
Adapt Go tests to `codeql test`
These changes make the tests work with the coming `codeql test` support. The `queries.xml` file defines which extractor the `codeql test` runner will use to extract databases for the tests. In the future one will be able to write this information in `qlpack.yml`, but we can't do that immediately because the _existing_ CodeQL tooling would refuse to parse a `qlpack.yml` that has the new field in it.
This commit is contained in:
Родитель
2fc9e37655
Коммит
7bc68c4302
|
@ -14,3 +14,4 @@ file_types:
|
||||||
display_name: Go
|
display_name: Go
|
||||||
extensions:
|
extensions:
|
||||||
- .go
|
- .go
|
||||||
|
legacy_qltest_extraction: true
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
@echo off
|
||||||
|
SETLOCAL EnableDelayedExpansion
|
||||||
|
|
||||||
|
type NUL && "%CODEQL_EXTRACTOR_GO_ROOT%/tools/%CODEQL_PLATFORM%/go-extractor.exe" -mod=vendor ./...
|
||||||
|
exit /b %ERRORLEVEL%
|
||||||
|
|
||||||
|
ENDLOCAL
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
if [ "$CODEQL_PLATFORM" != "linux64" ] && [ "$CODEQL_PLATFORM" != "osx64" ] ; then
|
||||||
|
echo "Automatic build detection for $CODEQL_PLATFORM is not implemented."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
"$CODEQL_EXTRACTOR_GO_ROOT/tools/$CODEQL_PLATFORM/go-extractor" -mod=vendor ./...
|
|
@ -0,0 +1 @@
|
||||||
|
<queries language="go"/>
|
Загрузка…
Ссылка в новой задаче