File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ set -o errexit
44set -o nounset
55set -o pipefail
66
7- # Ensure that there are no geth imports that are not marked as explicitly allowed via ./scripts/geth -allowed-packages.txt
8- # 1. Recursively search through all go files for any lines that include a direct import from go-ethereum
9- # 2. Ignore lines that import go-ethereum with a named import starting with "geth "
7+ # Ensure that there are no eth imports that are not marked as explicitly allowed via ./scripts/eth -allowed-packages.txt
8+ # 1. Recursively search through all go files for any lines that include a direct import from libevm
9+ # 2. Ignore lines that import libevm with a named import starting with "eth "
1010# 3. Sort the unique results
11- # 4. Print out the difference between the search results and the list of specified allowed package imports from geth .
12- geth_regexp =' "github.com/ava-labs/libevm/.*"'
11+ # 4. Print out the difference between the search results and the list of specified allowed package imports from libevm .
12+ libevm_regexp =' "github.com/ava-labs/libevm/.*"'
1313allow_named_imports=' eth\w\+ "'
14- extra_imports=$( grep -r --include=' *.go' --exclude=mocks.go --exclude-dir=' simulator' " ${geth_regexp } " -h | grep -v " ${allow_named_imports} " | grep -o " ${geth_regexp } " | sort -u | comm -23 - ./scripts/eth-allowed-packages.txt)
14+ extra_imports=$( grep -r --include=' *.go' --exclude=mocks.go --exclude-dir=' simulator' " ${libevm_regexp } " -h | grep -v " ${allow_named_imports} " | grep -o " ${libevm_regexp } " | sort -u | comm -23 - ./scripts/eth-allowed-packages.txt)
1515if [ -n " ${extra_imports} " ]; then
1616 echo " new ethereum imports should be added to ./scripts/eth-allowed-packages.txt to prevent accidental imports:"
1717 echo " ${extra_imports} "
You can’t perform that action at this time.
0 commit comments