File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
ql/integration-tests/all-platforms/go/two-go-mods-one-in-root Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -249,8 +249,16 @@ func getDirs(paths []string) []string {
249
249
return dirs
250
250
}
251
251
252
- // Note this has the side effect of sorting `dirs`
253
- func checkDirsNested (dirs []string ) bool {
252
+ func checkDirsNested (inputDirs []string ) bool {
253
+ // replace "." with "" so that we can check if all the paths are nested
254
+ dirs := make ([]string , len (inputDirs ))
255
+ for i , inputDir := range inputDirs {
256
+ if inputDir == "." {
257
+ dirs [i ] = ""
258
+ } else {
259
+ dirs [i ] = inputDir
260
+ }
261
+ }
254
262
// the paths were generated by a depth-first search so I think they might
255
263
// be sorted, but we sort them just in case
256
264
sort .Strings (dirs )
Original file line number Diff line number Diff line change 3
3
"severity": "note",
4
4
"source": {
5
5
"extractorName": "go",
6
- "id": "go/autobuilder/multiple-go-mod-found-not- nested",
7
- "name": "Multiple `go.mod` files found, not all nested under one root `go.mod` file"
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
8
},
9
9
"visibility": {
10
10
"cliSummaryTable": false,
You can’t perform that action at this time.
0 commit comments