Skip to content

Commit 4fe4dfb

Browse files
committed
Add tests for third diagnostic (package not found)
1 parent c0cc1c3 commit 4fe4dfb

File tree

8 files changed

+72
-0
lines changed

8 files changed

+72
-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": "Check that the path is correct. If it is a private package, make sure it can be accessed. If it is contained in the repository then you may need a [custom build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language)",
4+
"severity": "error",
5+
"source": {
6+
"extractorName": "go",
7+
"id": "go/extractor/package-not-found",
8+
"name": "Package github.com/linode/linode-docs-theme could not be found"
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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
go 1.19
2+
3+
require (
4+
github.com/linode/linode-docs-theme v0.0.0-20220622135843-166f108e1933
5+
)
6+
7+
module test
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github.com/linode/linode-docs-theme v0.0.0-20220622135843-166f108e1933 h1:QchGQS6xESuyjdlNJEjvq2ftGX0sCTAhPhD5hAOJVMI=
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package test
2+
3+
import linodedocstheme "github.com/linode/linode-docs-theme"
4+
5+
func Test() {
6+
theme := linodedocstheme.Theme{}
7+
_ = theme
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"internal": false,
3+
"markdownMessage": "Check that the path is correct. If it is a private package, make sure it can be accessed. If it is contained in the repository then you may need a [custom build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language)",
4+
"severity": "error",
5+
"source": {
6+
"extractorName": "go",
7+
"id": "go/extractor/package-not-found",
8+
"name": "Package github.com/linode/linode-docs-theme could not be found"
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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package test
2+
3+
import linodedocstheme "github.com/linode/linode-docs-theme"
4+
5+
func Test() {
6+
theme := linodedocstheme.Theme{}
7+
_ = theme
8+
}

0 commit comments

Comments
 (0)