Apply the ModelView# false-positive fix to the production scanner

The standalone script already excluded internal saved-view IDs
(ModelView#<numero>) from the referenced-codes heuristic; the app's own
"Trova componenti referenziati" phase used the same regex without the fix.
Ports the lookbehind so both stay consistent, per docs/formato-asm.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5 committed 2026-09-17 09:55:06 +02:00
1 parent 4a3f0a4cf8
commit bb99c4f4c5
2 files changed
+20 -1

No files matched your search

@@ -53,6 +53,20 @@ public class AssemblyComponentScannerTests
finally { File.Delete(percorso); }
}
[Fact]
public void Scarta_id_di_viste_salvate_ModelView()
{
// Visto su 9044207061.asm: "ModelView#1073741828" compare più volte ma è un ID
// interno di vista salvata, non un codice componente.
string percorso = ScriviAsmFinto("x ModelView#1073741828 y ModelView#1073741828 z");
try
{
var codici = AssemblyComponentScanner.EstraiCodiciReferenziati(percorso);
Assert.DoesNotContain("1073741828", codici);
}
finally { File.Delete(percorso); }
}
[Fact]
public void File_inesistente_lancia_eccezione_IO() =>
Assert.Throws<DirectoryNotFoundException>(() =>