mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
Add tests for third diagnostic (package not found)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"internal": false,
|
||||
"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)",
|
||||
"severity": "error",
|
||||
"source": {
|
||||
"extractorName": "go",
|
||||
"id": "go/extractor/package-not-found",
|
||||
"name": "Package github.com/linode/linode-docs-theme could not be found"
|
||||
},
|
||||
"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,7 @@
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/linode/linode-docs-theme v0.0.0-20220622135843-166f108e1933
|
||||
)
|
||||
|
||||
module test
|
||||
@@ -0,0 +1 @@
|
||||
github.com/linode/linode-docs-theme v0.0.0-20220622135843-166f108e1933 h1:QchGQS6xESuyjdlNJEjvq2ftGX0sCTAhPhD5hAOJVMI=
|
||||
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
import linodedocstheme "github.com/linode/linode-docs-theme"
|
||||
|
||||
func Test() {
|
||||
theme := linodedocstheme.Theme{}
|
||||
_ = theme
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"internal": false,
|
||||
"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)",
|
||||
"severity": "error",
|
||||
"source": {
|
||||
"extractorName": "go",
|
||||
"id": "go/extractor/package-not-found",
|
||||
"name": "Package github.com/linode/linode-docs-theme could not be found"
|
||||
},
|
||||
"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,8 @@
|
||||
package test
|
||||
|
||||
import linodedocstheme "github.com/linode/linode-docs-theme"
|
||||
|
||||
func Test() {
|
||||
theme := linodedocstheme.Theme{}
|
||||
_ = theme
|
||||
}
|
||||
Reference in New Issue
Block a user