Add test for first diagnostic (different OS/arch)

This commit is contained in:
Owen Mansel-Chan
2023-02-14 14:17:55 +00:00
parent 72d6f56df1
commit 4d3b05e041
5 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{
"internal": false,
"markdownMessage": "Make sure the `GOOS` and `GOARCH` [environment variables are correctly set](https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow). Alternatively, [change your OS and architecture](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#using-a-github-hosted-runner)",
"severity": "warning",
"source": {
"extractorName": "go",
"id": "go/extractor/package-different-os-architecture",
"name": "Package syscall/js is intended for a different OS or architecture"
},
"visibility": {
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}

View File

@@ -0,0 +1,9 @@
import sys
from create_database_utils import *
from diagnostics_test_utils import *
os.environ['LGTM_INDEX_IMPORT_PATH'] = "test"
run_codeql_database_create([], lang="go", source="work", db=None)
check_diagnostics()

View File

@@ -0,0 +1,8 @@
package test
import "syscall/js"
func Test() {
var x js.Error
_ = x
}