File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ func fileExists(path string) bool {
13
13
return err == nil && stat .Mode ().IsRegular ()
14
14
}
15
15
16
+ // Decides if `dirPath` is a vendor directory by testing whether it is called `vendor`
17
+ // and contains a `modules.txt` file.
16
18
func isGolangVendorDirectory (dirPath string ) bool {
17
- // Call a directory a Golang vendor directory if it contains a modules.txt file.
18
19
return path .Base (dirPath ) == "vendor" && fileExists (path .Join (dirPath , "modules.txt" ))
19
20
}
20
21
@@ -25,7 +26,6 @@ type PathsIgnoreStruct struct {
25
26
func GetConfigBaselineAsJSON (rootDir string ) ([]byte , error ) {
26
27
vendorDirs := make ([]string , 0 )
27
28
28
- // If CODEQL_EXTRACTOR_GO_EXTRACT_VENDOR_DIRS is "true":
29
29
if os .Getenv ("CODEQL_EXTRACTOR_GO_EXTRACT_VENDOR_DIRS" ) == "true" {
30
30
// The user wants vendor directories scanned; emit an empty report.
31
31
} else {
You can’t perform that action at this time.
0 commit comments