From 259086b0965c7c73a74a53c5948a259e0f27972a Mon Sep 17 00:00:00 2001 From: Carsten Scholling Date: Mon, 28 Sep 2026 11:25:49 +0200 Subject: [PATCH] feat(LC0098): support configurable event subscriber type templates --- content/docs/analyzers/LinterCop/LC0098.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/content/docs/analyzers/LinterCop/LC0098.md b/content/docs/analyzers/LinterCop/LC0098.md index 9d268ab..b30b366 100644 --- a/content/docs/analyzers/LinterCop/LC0098.md +++ b/content/docs/analyzers/LinterCop/LC0098.md @@ -89,6 +89,11 @@ The placeholder name determines which value to insert; the *style of the name* d | `{eventSource}` | Source object name | camelCase | `salesHeader` | | `{event_source}` | Source object name | snake\_case | `sales_header` | | `{event-source}` | Source object name | kebab-case | `sales-header` | +| `{Event Source Type}` | Source object type | **Raw** (verbatim) | `Table` | +| `{EventSourceType}` | Source object type | PascalCase | `Table` | +| `{eventSourceType}` | Source object type | camelCase | `table` | +| `{event_source_type}` | Source object type | snake\_case | `table` | +| `{event-source-type}` | Source object type | kebab-case | `table` | | `{Event Name}` | Event procedure name | **Raw** (verbatim) | `OnAfterDeleteEvent` | | `{EventName}` | Event procedure name | PascalCase | `OnAfterDeleteEvent` | | `{eventName}` | Event procedure name | camelCase | `onAfterDeleteEvent` | @@ -124,6 +129,18 @@ With optional group — the separator is emitted only when an element name is pr Optional groups can contain any combination of literals and token placeholders. A `[` inside an optional group is treated as a literal character (nesting is not supported). +#### Conditional self-reference text + +Any source-object-type placeholder accepts a non-empty literal after `|`. The text after `|` is emitted verbatim only when the subscribed object is the application object containing the subscriber or the target of its extension; it otherwise resolves to an empty string. The placeholder style does not transform the text after `|`. This syntax applies only to the five `EventSourceType` placeholder variants. + +Use it inside an optional group when the text needs surrounding punctuation or spacing: + +```text +[{Event Source Type|This} ]{Event Name} +``` + +A subscriber in the same object as its publisher renders `"This OnGetSelf"`. A subscriber to another object (Codeunit)renders `Codeunit OnGetOther`, because the optional group is empty. The suffix is user-defined: `This`, `Self`, or any other non-empty text is valid. + #### Word splitting (non-raw styles only) For any of the PascalCase / camelCase / snake\_case / kebab-case placeholders, token values are split into words before the case transform is applied: