Exclude .git directory from scan (#485)

This commit is contained in:
Hiroaki Sano 2020-06-09 22:16:27 +09:00 committed by GitHub
parent 6202b38a44
commit af699f6a62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -249,6 +249,10 @@ func main() {
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "\nError: failed to exclude the %q directory from scan", "vendor") fmt.Fprintf(os.Stderr, "\nError: failed to exclude the %q directory from scan", "vendor")
} }
err = flag.Set("exclude-dir", ".git")
if err != nil {
fmt.Fprintf(os.Stderr, "\nError: failed to exclude the %q directory from scan", ".git")
}
// Parse command line arguments // Parse command line arguments
flag.Parse() flag.Parse()