fix: Framework detection, circular deps, and GDScript test discovery
FIXES: 1. Framework Detection (Unity → Godot) PROBLEM: Detected Unity instead of Godot due to generic "Assets" marker - "Assets" appears in comments: "// TODO: Replace with actual music assets" - Triggered false positive for Unity framework SOLUTION: Made Unity markers more specific - Before: "Assets", "ProjectSettings" (too generic) - After: "Assembly-CSharp.csproj", "UnityEngine.dll", "Library/" (specific) - Godot markers: "project.godot", ".godot", ".tscn", ".tres", ".gd" FILE: architectural_pattern_detector.py line 92-94 2. Circular Dependencies (Self-References) PROBLEM: Files showing circular dependency to themselves - WARNING: Cycle: analysis-config.gd -> analysis-config.gd - 3 self-referential cycles detected ROOT CAUSE: No self-loop filtering in build_graph() - File resolves class_name to itself - Edge created from file to same file SOLUTION: Skip self-dependencies in build_graph() - Added check: `target != file_path` - Prevents file from depending on itself FILE: dependency_analyzer.py line 728 3. GDScript Test File Detection PROBLEM: Found 0 test files (expected 20 GUT tests with 396 tests) - TEST_PATTERNS missing GDScript patterns - Only had: test_*.py, *_test.go, Test*.java, etc. SOLUTION: Added GDScript test patterns - Added: "test_*.gd", "*_test.gd" (GUT, gdUnit4, WAT) - Added ".gd": "GDScript" to LANGUAGE_MAP FILES: - test_example_extractor.py line 886-887 - test_example_extractor.py line 901 IMPACT: - ✅ Godot projects correctly detected as "Godot" (not Unity) - ✅ No more false circular dependency warnings - ✅ GUT/gdUnit4/WAT test files now discovered and analyzed - ✅ Better test example extraction for Godot projects Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -89,9 +89,9 @@ class ArchitecturalPatternDetector:
|
||||
# Framework detection patterns
|
||||
FRAMEWORK_MARKERS = {
|
||||
# Game Engines (checked first to avoid false positives)
|
||||
"Unity": ["Assembly-CSharp", "UnityEngine", "Assets", ".unity", "ProjectSettings"],
|
||||
"Unity": ["Assembly-CSharp.csproj", "UnityEngine.dll", "ProjectSettings/ProjectVersion.txt", ".unity", "Library/"],
|
||||
"Unreal": ["Source/", ".uproject", "Config/DefaultEngine.ini", "Binaries/", "Content/"],
|
||||
"Godot": ["project.godot", ".godot", "scenes/", ".tscn", ".gd"],
|
||||
"Godot": ["project.godot", ".godot", ".tscn", ".tres", ".gd"],
|
||||
# Web Frameworks
|
||||
"Django": ["django", "manage.py", "settings.py", "urls.py"],
|
||||
"Flask": ["flask", "app.py", "wsgi.py"],
|
||||
|
||||
Reference in New Issue
Block a user