Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

cmd/check: Use go to find imported packages #4

Closed
radeksimko opened this issue Aug 7, 2019 · 0 comments · Fixed by #6
Closed

cmd/check: Use go to find imported packages #4

radeksimko opened this issue Aug 7, 2019 · 0 comments · Fixed by #6

Comments

@radeksimko
Copy link
Member

While I appreciate the aim of keeping the implementation simple, I'm afraid we may miss some important implementation details of go list when we launch this tool into the wild.

e.g. testdata directories are generally not meant to be imported (and so we shouldn't parse them when scanning for all eligible *.go files to find imports in), packages may be imported under different names, which go-refs doesn't handle etc. Who knows what other weird edge cases we may bump into...

I'm aware that calling out to go via shell comes at the cost of increased complexity, but I think the cost is ok, if we get better accuracy?

Just food for thought 🥘 💭

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant