1
0
mirror of https://github.com/golang/go synced 2024-10-01 05:18:33 -06:00
go/imports
Brad Fitzpatrick f60b69ed8c imports: fix symlink loop detection, deflaking TestImportSymlinks
Change the shouldTraverse function to no longer keep a global map of
which inodes it's seen. Instead, whenever a symlink is seen for a path
name, check every directory entry in that path name and see if any are
the same inode as the current one, detecting any loop just from the
name itself.

More details of why the test was flaky are in the bug.

Fixes golang/go#18142

Change-Id: I869f7a13d130c63d78b7af81802a16c4b4b2f3bd
Reviewed-on: https://go-review.googlesource.com/37947
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-03-08 23:27:09 +00:00
..
fastwalk_dirent_fileno.go cmd/goimports, imports: optimize directory scanning and other things 2016-07-19 03:21:45 +00:00
fastwalk_dirent_ino.go imports: don't use fastpath on appengine (syscall not available) 2016-08-15 22:01:42 +00:00
fastwalk_portable.go imports: don't use fastpath on appengine (syscall not available) 2016-08-15 22:01:42 +00:00
fastwalk_test.go imports: fix formatting directive error found by go vet 2017-02-12 17:59:58 +00:00
fastwalk_unix.go imports: don't use fastpath on appengine (syscall not available) 2016-08-15 22:01:42 +00:00
fastwalk.go cmd/goimports, imports: optimize directory scanning and other things 2016-07-19 03:21:45 +00:00
fix_test.go imports: fix symlink loop detection, deflaking TestImportSymlinks 2017-03-08 23:27:09 +00:00
fix.go imports: fix symlink loop detection, deflaking TestImportSymlinks 2017-03-08 23:27:09 +00:00
imports.go imports: remove unnecessary string conversion 2017-01-22 22:46:49 +00:00
mkindex.go go.tools/imports: move goimports from github to go.tools. 2013-12-17 21:21:03 -05:00
mkstdlib.go imports: update zstdlib to Go 1.8 2017-02-16 21:22:49 +00:00
sortimports.go imports: Remove ancient Go 1.1 compatibility indirections. 2015-12-14 00:47:31 +00:00
zstdlib.go imports: update zstdlib to Go 1.8 2017-02-16 21:22:49 +00:00