Merge pull request #200 from Semmle/codeql-test

Adapt Go tests to `codeql test`
This commit is contained in:
Sauyon Lee
2019-12-06 10:34:59 -08:00
committed by GitHub Enterprise
4 changed files with 19 additions and 0 deletions

View File

@@ -14,3 +14,4 @@ file_types:
display_name: Go
extensions:
- .go
legacy_qltest_extraction: true

7
codeql-tools/index.cmd Normal file
View File

@@ -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

10
codeql-tools/index.sh Executable file
View File

@@ -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 ./...

1
ql/test/queries.xml Normal file
View File

@@ -0,0 +1 @@
<queries language="go"/>