From 259086b0965c7c73a74a53c5948a259e0f27972a Mon Sep 17 00:00:00 2001 From: Carsten Scholling Date: Mon, 28 Sep 2026 11:25:49 +0200 Subject: [PATCH 1/2] 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: From cf7896c8e9905211378f3f8ffa64ba47d1697355 Mon Sep 17 00:00:00 2001 From: Carsten Scholling Date: Wed, 28 Oct 2026 05:26:38 +0100 Subject: [PATCH 2/2] docs(LC0098): clarify self-reference naming examples - Show how EventSourceType and EventSource compose for self-subscribers - Correct the documented output for non-self subscriptions --- content/docs/analyzers/LinterCop/LC0098.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/docs/analyzers/LinterCop/LC0098.md b/content/docs/analyzers/LinterCop/LC0098.md index b30b366..b288ad0 100644 --- a/content/docs/analyzers/LinterCop/LC0098.md +++ b/content/docs/analyzers/LinterCop/LC0098.md @@ -131,15 +131,15 @@ Optional groups can contain any combination of literals and token placeholders. #### 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. +Any source-object-type placeholder accepts a non-empty literal after `|`. The text after `|` is emitted verbatim when the subscribed object contains the subscriber; otherwise the object type is rendered in the placeholder's usual style. 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: +For example, with this template: ```text -[{Event Source Type|This} ]{Event Name} +({EventSourceType|This} {EventSource}) {EventName} ``` -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. +A subscriber in codeunit `"Self Publisher"` subscribing to its own `OnGetSelf` renders `"(This SelfPublisher) OnGetSelf"`; a subscriber in another codeunit renders `"(Codeunit SelfPublisher) OnGetSelf"`. `{EventSource}` is independent and still emits the publisher name. To keep the spaces in the object name, use the raw `{Event Source}` placeholder instead. The replacement text is user-defined: `This`, `Self`, or any other non-empty text is valid. #### Word splitting (non-raw styles only)