Convert import script to a go test
Why this should be merged
This closes #813:
The shell script ./scripts/lint_allowed_eth_imports.sh is getting rather complex and hard to understand, we should migrate it to use Go as a test, especially now that we have getDependencies code which can easily be adapted for this use case.
I was unable to adapt the getDependencies() function to work properly with ignoring _ imports and imports that start with eth, but I did massively improve the test, and this now catches some imports that the shell script did not.
I will remove getDependencies() in the next PR anyway.
Sample:
How this works
How this was tested
The new TestLibevmImportsAreAllowed test
Need to be documented?
No
Need to update RELEASES.md?
No
This is blocked by #1349 and #1350
Thanks for the review @alarso16 !
@maru-ava Talked to Cey about this - he wanted to get your opinion on this. Also wanted to clarify whether this is or is not a hard requirement for the coreth monorepo.
@maru-ava Talked to Cey about this - he wanted to get your opinion on this. Also wanted to clarify whether this is or is not a hard requirement for the coreth monorepo.
Not a hard requirement, but it can't hurt.