Skip to content

Commit 137b2c9

Browse files
committed
Add test for second diagnostic (newer go version)
1 parent cbb2fb9 commit 137b2c9

File tree

5 files changed

+31
-0
lines changed

5 files changed

+31
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"internal": false,
3+
"markdownMessage": "The version of Go available in the environment is lower than the version specified in the `go.mod` file. [Install a newer version](https://github.com/actions/setup-go#basic)",
4+
"severity": "error",
5+
"source": {
6+
"extractorName": "go",
7+
"id": "go/autobuilder/newer-go-version-needed",
8+
"name": "Newer Go version needed"
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()
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
go 999.0
2+
3+
module test

go/ql/integration-tests/all-platforms/go/diagnostics/newer-go-version-needed/work/go.sum

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package test
2+
3+
func Test() {
4+
}

0 commit comments

Comments
 (0)