From 029c71404872ccce9fc3bbcc0dd3a3e1a4d48aa3 Mon Sep 17 00:00:00 2001 From: Eric Shenghsiung Liu Date: Fri, 5 Jun 2026 16:31:57 -0400 Subject: [PATCH] ci: enforce base-std/ and base-std-test/ import prefixes --- .github/workflows/ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77bcfe0..ab0fc9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -209,6 +209,22 @@ jobs: if: steps.check.outputs.exit_code != '0' run: exit 1 + import-paths: + name: Import Paths + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Enforce base-std/ and base-std-test/ import prefixes + run: | + # Raw src/ or test/ imports must use the public remapping prefixes instead. + bad=$(grep -rn --include="*.sol" -E 'import(\s+\{[^}]*\}\s+from)?\s+"(src|test)/' src/ test/ || true) + if [ -n "$bad" ]; then + echo "Raw src/ or test/ imports found — use base-std/ or base-std-test/ instead:" + echo "$bad" + exit 1 + fi + fmt: name: Format runs-on: ubuntu-latest