File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ func fileExists(path string) bool {
18
18
// Decides if `dirPath` is a vendor directory by testing whether it is called `vendor`
19
19
// and contains a `modules.txt` file.
20
20
func isGolangVendorDirectory (dirPath string ) bool {
21
- return path .Base (dirPath ) == "vendor" && fileExists (path .Join (dirPath , "modules.txt" ))
21
+ return filepath .Base (dirPath ) == "vendor" && fileExists (filepath .Join (dirPath , "modules.txt" ))
22
22
}
23
23
24
24
type BaselineConfig struct {
@@ -38,7 +38,8 @@ func GetConfigBaselineAsJSON(rootDir string) ([]byte, error) {
38
38
return nil
39
39
}
40
40
if isGolangVendorDirectory (dirPath ) {
41
- vendorDirs = append (vendorDirs , path .Join (dirPath , "**" ))
41
+ // Note that CodeQL expects a forward-slash-separated path, even on Windows.
42
+ vendorDirs = append (vendorDirs , path .Join (filepath .ToSlash (dirPath ), "**" ))
42
43
return filepath .SkipDir
43
44
} else {
44
45
return nil
You can’t perform that action at this time.
0 commit comments