mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Add test for first diagnostic (different OS/arch)
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
@@ -0,0 +1,3 @@
|
||||
go 1.18
|
||||
|
||||
module test
|
||||
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
import "syscall/js"
|
||||
|
||||
func Test() {
|
||||
var x js.Error
|
||||
_ = x
|
||||
}
|
||||
Reference in New Issue
Block a user