diff options
| author | Quinn Slack <[email protected]> | 2014-12-08 11:54:04 -0800 |
|---|---|---|
| committer | Quinn Slack <[email protected]> | 2014-12-08 11:54:04 -0800 |
| commit | 57095bafe72ffd80d22469215db026be3c5d4242 (patch) | |
| tree | 72a2f736bc7aaf291a41fb82668793dffe219c13 /script/check-MakeGitError-thread-lock.go | |
| parent | 3087e610fbceeeab8ad963a19aaac6fa61d10ccb (diff) | |
only check Go source files for non-thread-locked MakeGitError calls
Diffstat (limited to 'script/check-MakeGitError-thread-lock.go')
| -rw-r--r-- | script/check-MakeGitError-thread-lock.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/script/check-MakeGitError-thread-lock.go b/script/check-MakeGitError-thread-lock.go index 10ab39f..f6b01b3 100644 --- a/script/check-MakeGitError-thread-lock.go +++ b/script/check-MakeGitError-thread-lock.go @@ -9,6 +9,8 @@ import ( "go/printer" "go/token" "log" + "os" + "path/filepath" "strings" ) @@ -24,7 +26,7 @@ func main() { log.Fatal(err) } - pkgs, err := parser.ParseDir(fset, bpkg.Dir, nil, 0) + pkgs, err := parser.ParseDir(fset, bpkg.Dir, func(fi os.FileInfo) bool { return filepath.Ext(fi.Name()) == ".go" }, 0) if err != nil { log.Fatal(err) } |
