fix(scripting): #1056 refuse a {{equip}} token in a verbatim/raw/interpolated path literal — editor diagnostic + deploy-gate refusal
This commit is contained in:
@@ -112,6 +112,13 @@ public sealed class RoslynDeployScriptChecker : IDeployScriptChecker
|
||||
var source = request.Source ?? string.Empty;
|
||||
try
|
||||
{
|
||||
// lmxopcua#1056: a {{equip}} token in a verbatim/raw/interpolated path literal is never substituted, so the
|
||||
// script would compile and then read a tag path that cannot resolve. The editor runs the same scan.
|
||||
var unsubstituted = EquipTokenLiteralScanner.Find(source);
|
||||
if (unsubstituted.Count > 0)
|
||||
return new CachedVerdict(
|
||||
["equip token not substituted — " + string.Join("; ", unsubstituted.Select(f => f.Message))],
|
||||
Cacheable: true);
|
||||
if (request.Kind == ScriptContextKind.AlarmPredicate)
|
||||
{
|
||||
var extraction = DependencyExtractor.Extract(source);
|
||||
|
||||
Reference in New Issue
Block a user