Skip to content

Commit 4d3b05e

Browse files
committed
Add test for first diagnostic (different OS/arch)
1 parent 72d6f56 commit 4d3b05e

File tree

5 files changed

+35
-0
lines changed

5 files changed

+35
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"internal": false,
3+
"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)",
4+
"severity": "warning",
5+
"source": {
6+
"extractorName": "go",
7+
"id": "go/extractor/package-different-os-architecture",
8+
"name": "Package syscall/js is intended for a different OS or architecture"
9+
},
10+
"visibility": {
11+
"cliSummaryTable": true,
12+
"statusPage": true,
13+
"telemetry": true
14+
}
15+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import sys
2+
3+
from create_database_utils import *
4+
from diagnostics_test_utils import *
5+
6+
os.environ['LGTM_INDEX_IMPORT_PATH'] = "test"
7+
run_codeql_database_create([], lang="go", source="work", db=None)
8+
9+
check_diagnostics()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
go 1.18
2+
3+
module test

go/ql/integration-tests/all-platforms/go/diagnostics/build-constraints-exclude-all-go-files/work/go.sum

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package test
2+
3+
import "syscall/js"
4+
5+
func Test() {
6+
var x js.Error
7+
_ = x
8+
}

0 commit comments

Comments
 (0)