Skip to content

Commit 6fd2481

Browse files
authored
Merge pull request #12297 from sbueringer/pr-block-rx-internal-imports
🌱 Block dependencies to internal packages for the RX implementation
2 parents 51ab638 + e135f28 commit 6fd2481

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

hack/verify-import-restrictions.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ sub_packages=(
3232
"controlplane/kubeadm/api"
3333
"api/ipam"
3434
"api/runtime"
35+
"test/extension"
3536
"test/infrastructure/docker/api"
3637
"test/infrastructure/docker/exp/api"
3738
"test/infrastructure/inmemory/api"
@@ -43,7 +44,7 @@ visit() {
4344
for file in "$1"/* ; do
4445
if [ -d "$file" ]; then
4546
visit "$file"
46-
elif [ -f "$file" ]; then
47+
elif [ -f "$file" ] && [[ "$file" = *.go ]]; then
4748
((count += 1))
4849
fi
4950
done

test/extension/.import-restrictions

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Enforce that the test extension implementation and its integration tests
2+
# do not depend on internal packages.
3+
rules:
4+
- selectorRegexp: .*internal.*
5+
allowedPrefixes: []
6+
forbiddenPrefixes: []

0 commit comments

Comments
 (0)