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 {
1313 return err == nil && stat .Mode ().IsRegular ()
1414}
1515
16+ // Decides if `dirPath` is a vendor directory by testing whether it is called `vendor`
17+ // and contains a `modules.txt` file.
1618func isGolangVendorDirectory (dirPath string ) bool {
17- // Call a directory a Golang vendor directory if it contains a modules.txt file.
1819 return path .Base (dirPath ) == "vendor" && fileExists (path .Join (dirPath , "modules.txt" ))
1920}
2021
@@ -25,7 +26,6 @@ type PathsIgnoreStruct struct {
2526func GetConfigBaselineAsJSON (rootDir string ) ([]byte , error ) {
2627 vendorDirs := make ([]string , 0 )
2728
28- // If CODEQL_EXTRACTOR_GO_EXTRACT_VENDOR_DIRS is "true":
2929 if os .Getenv ("CODEQL_EXTRACTOR_GO_EXTRACT_VENDOR_DIRS" ) == "true" {
3030 // The user wants vendor directories scanned; emit an empty report.
3131 } else {
You can’t perform that action at this time.
0 commit comments