[skip ci] validation rule

This commit is contained in:
Brahim Hadriche committed 2024-12-23 12:22:16 -05:00
1 parent 2c1306c563
commit 82e55d7030
2 files changed
+7

No files matched your search

+6
View File
@@ -26,6 +26,12 @@
"regexFlags": "ig",
"message": "observeField(\"field\", \"callback\") is not allowed. Use observeField(\"field\", FuncName(callback)) instead."
},
{
"code": "NO_OBSERVE_FIELD_SCOPED_EX",
"regex": "\\.observeFieldScopedEx\\s*\\(",
"regexFlags": "ig",
"message": "observeFieldScopedEx is not allowed. Use MessagePortUtils.ObserveFieldScopedExSafe instead."
},
{
"code": "NO_INVALID_CALLFUNC_ARG",
"regex": "@\\.\\w+\\(invalid\\)",
@@ -3,6 +3,7 @@ namespace MessagePortUtils
function ObserveFieldScopedExSafe(node as dynamic, field as string, port as dynamic)
' ObserveFieldScopedEx was added in 12.0
if FindMemberFunction(node, "ObserveFieldScopedEx") <> invalid
' bs:disable-next-line NO_OBSERVE_FIELD_SCOPED_EX
node.ObserveFieldScopedEx(field, port)
else
node.ObserveFieldScoped(field, port)