mirror of
https://github.com/github/codeql.git
synced 2026-05-20 14:17:11 +02:00
Add test for module without packages, but sources, in workspace
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "Go files were found outside of the Go modules corresponding to these `go.mod` files.\n\n`workspace/subdir/go.mod`, `module/go.mod`",
|
||||
"markdownMessage": "Go files were found outside of the Go modules corresponding to these `go.mod` files.\n\n`workspace/subdir/go.mod`, `module/go.mod`, `no-packages/go.mod`",
|
||||
"severity": "note",
|
||||
"source": {
|
||||
"extractorName": "go",
|
||||
@@ -26,3 +26,17 @@
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
{
|
||||
"markdownMessage": "The following 1 Go project could not be extracted successfully:\n\n`no-packages`\n",
|
||||
"severity": "warning",
|
||||
"source": {
|
||||
"extractorName": "go",
|
||||
"id": "go/autobuilder/extraction-failed-for-project",
|
||||
"name": "Unable to extract some Go projects"
|
||||
},
|
||||
"visibility": {
|
||||
"cliSummaryTable": true,
|
||||
"statusPage": true,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
This folder contains a Go module and a Go source file, but no packages will be extracted due to build constraints.
|
||||
|
||||
Overall extraction should still succeed, because there are other Go modules in this workspace for which we are able to extract files.
|
||||
@@ -0,0 +1,5 @@
|
||||
go 1.22
|
||||
|
||||
toolchain go1.22.0
|
||||
|
||||
module module
|
||||
@@ -0,0 +1,11 @@
|
||||
//go:build unit
|
||||
|
||||
package subdir
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func test() {
|
||||
fmt.Print("Hello world")
|
||||
}
|
||||
Reference in New Issue
Block a user