mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 06:36:55 +01:00
* knowledge(style): allow event subscribers to omit trailing publisher parameters The article told reviewers to copy the publisher signature exactly and reproduce every parameter verbatim. That contradicts events/add-new-event-parameters-at-the-end, which already states that existing subscribers bind to the leading parameters, and it produced a false positive on BCApps PR 10277 where a subscriber legitimately declared only the leading two of the publisher's three parameters. Clarify that the name-match rule applies to every parameter the subscriber declares, state that AL binds on a leading prefix so trailing parameters may be omitted, and keep the real defect - a subscriber list that is not a prefix of the publisher's - as the anti pattern. Add the false-positive keyword for retrieval. * fix: subscribers bind by parameter name, not by leading prefix The first revision claimed AL binds a subscriber to a leading prefix of the publisher parameter list and that a parameter may not be skipped in the middle. That is wrong. Verified against shipping BCApps code: Test Runner - Mgt publishes OnBeforeTestMethodRun(var CurrentTestMethodLine; CodeunitID; CodeunitName; FunctionName; FunctionTestPermissions; var Skip), and ALTestRunnerResetEnvironment binds to it declaring (CodeunitID; CodeunitName; FunctionName; FunctionTestPermissions; var CurrentTestMethodLine) - omitting Skip and moving the first parameter to last. Binding is by name, so any subset in any order is valid. Detection now targets a parameter whose name or type matches nothing on the publisher. --------- Co-authored-by: wenjiefan <wenjiefan@microsoft.com> |
||
|---|---|---|
| .. | ||
| appsource | ||
| breaking-changes | ||
| data-modeling | ||
| error-handling | ||
| events | ||
| interfaces | ||
| performance | ||
| privacy | ||
| query | ||
| security | ||
| style | ||
| telemetry | ||
| testing | ||
| ui | ||
| upgrade | ||
| web-services | ||
| .gitkeep | ||