Skip to content

Commit 50343b3

Browse files
committed
Add extra integration test and rename some
1 parent bbbdc47 commit 50343b3

File tree

37 files changed

+109
-3
lines changed

37 files changed

+109
-3
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"markdownMessage": "2 `go.mod` files were found:\n\n`subdir0/go.mod`, `subdir0/subdir1/go.mod`",
3+
"severity": "note",
4+
"source": {
5+
"extractorName": "go",
6+
"id": "go/autobuilder/multiple-go-mod-found-nested",
7+
"name": "Multiple `go.mod` files were found, all nested under one root `go.mod` file"
8+
},
9+
"visibility": {
10+
"cliSummaryTable": false,
11+
"statusPage": false,
12+
"telemetry": true
13+
}
14+
}
15+
{
16+
"markdownMessage": "2 packages could not be found:\n\n`test/subdir2`, `subdir1/subsubdir1`.\n\nDefinitions in those packages may not be recognized by CodeQL, and files that use them may only be partially analyzed.\n\nCheck that the paths are correct and make sure any private packages can be accessed. If any of the packages are present in the repository then you may need a [custom build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).",
17+
"severity": "warning",
18+
"source": {
19+
"extractorName": "go",
20+
"id": "go/autobuilder/package-not-found",
21+
"name": "Some packages could not be found"
22+
},
23+
"visibility": {
24+
"cliSummaryTable": true,
25+
"statusPage": true,
26+
"telemetry": true
27+
}
28+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package subdir1
2+
3+
import (
4+
"subdir1/subsubdir1"
5+
6+
"golang.org/x/net/ipv4"
7+
)
8+
9+
func test() {
10+
11+
header := ipv4.Header{}
12+
header.Version = subsubdir1.Add(2, 2)
13+
14+
}

go/ql/integration-tests/all-platforms/go/two-go-mods-one-in-root/test.go renamed to go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/subdir0/test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package test
22

33
import (
4-
"subdir2"
4+
"test/subdir2"
55

66
"golang.org/x/net/ipv4"
77
)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| Extraction failed in subdir0/subdir1/test.go with error cannot find package "subdir1/subsubdir1" in any of:\n\t/usr/local/Cellar/go/1.20.5/libexec/src/subdir1/subsubdir1 (from $GOROOT)\n\t/Users/owen-mc/go/src/subdir1/subsubdir1 (from $GOPATH) | 2 |
2+
| Extraction failed in subdir0/subdir1/test.go with error could not import subdir1/subsubdir1 (invalid package name: "") | 2 |
3+
| Extraction failed in subdir0/test.go with error cannot find package "test/subdir2" in any of:\n\t/usr/local/Cellar/go/1.20.5/libexec/src/test/subdir2 (from $GOROOT)\n\t/Users/owen-mc/go/src/test/subdir2 (from $GOPATH) | 2 |
4+
| Extraction failed in subdir0/test.go with error could not import test/subdir2 (invalid package name: "") | 2 |

0 commit comments

Comments
 (0)