File tree Expand file tree Collapse file tree
ql/integration-tests/all-platforms/go/two-go-mods-one-in-root Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -249,8 +249,16 @@ func getDirs(paths []string) []string {
249249 return dirs
250250}
251251
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+ }
254262 // the paths were generated by a depth-first search so I think they might
255263 // be sorted, but we sort them just in case
256264 sort .Strings (dirs )
Original file line number Diff line number Diff line change 33 "severity": "note",
44 "source": {
55 "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"
88 },
99 "visibility": {
1010 "cliSummaryTable": false,
You can’t perform that action at this time.
0 commit comments