build(gate): forbid production code from importing authoring tools
The architecture check scans tools/ for duplicate class names and fails when game/ or content/ references res://tools/. The three tools scripts drop their global class_name (every caller preloads them), and ADR 0012 records that tools/ depends on the domain only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
30cc2f635f
commit
dbd207ef1b
5 files changed
+11
-4
No files matched your search
@@ -38,6 +38,9 @@ source_directories="src tests"
|
||||
if [ -d game ]; then
|
||||
source_directories="$source_directories game"
|
||||
fi
|
||||
if [ -d tools ]; then
|
||||
source_directories="$source_directories tools"
|
||||
fi
|
||||
|
||||
duplicate_classes="$(
|
||||
rg --no-filename -o \
|
||||
@@ -57,6 +60,11 @@ if [ -d game ]; then
|
||||
test_imports="$(rg -n 'res://tests/' game --glob '*.gd' || true)"
|
||||
fail_with_matches "production imports test code" "$test_imports"
|
||||
|
||||
tool_imports="$(
|
||||
rg -n 'res://tools/' game content --glob '*.gd' --glob '*.tscn' --glob '*.tres' 2>/dev/null || true
|
||||
)"
|
||||
fail_with_matches "production imports authoring tools" "$tool_imports"
|
||||
|
||||
poc_references="$(rg -n 'poc_[ab]|POC_[AB]' game --glob '*.gd' --glob '*.tscn' || true)"
|
||||
fail_with_matches "production contains a prototype dependency" "$poc_references"
|
||||
|
||||
|
||||
Reference in new issue
Block a user