Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/cmd/goimports: neighboring files cause wrong import decision #23001
go version devel +9a13f8e Tue Nov 28 06:47:50 2017 +0000 linux/amd64
If I run
This is a particular issue when running goimports on a file in a directory with lots of random independent main packages (e.g. my $HOME/src directory where I keep hundreds of tiny scratch Go programs).
FWIW the problem is not exhibited if you run goimports with standard input, because then it doesn't take neighbouring files into account.