Skip to content

patch: allow using reserved keyword relationship#2897

Merged
davydkov merged 1 commit into
mainfrom
allow-relationship-as-element-kind
Apr 15, 2026
Merged

patch: allow using reserved keyword relationship#2897
davydkov merged 1 commit into
mainfrom
allow-relationship-as-element-kind

Conversation

@davydkov

Copy link
Copy Markdown
Member

Allow using reserved keyword relationship as an identifier in LikeC4 DSL (i.e. as element kind)

@changeset-bot

changeset-bot Bot commented Apr 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 070050a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 21 packages
Name Type
@likec4/language-server Patch
@likec4/playground Patch
@likec4/language-services Patch
likec4 Patch
@likec4/lsp Patch
@likec4/mcp Patch
@likec4/vite-plugin Patch
likec4-vscode Patch
@likec4/docs-astro Patch
@likec4/style-preset Patch
@likec4/styles Patch
@likec4/config Patch
@likec4/core Patch
@likec4/diagram Patch
@likec4/generators Patch
@likec4/layouts Patch
@likec4/leanix-bridge Patch
@likec4/log Patch
@likec4/react Patch
@likec4/tsconfig Patch
@likec4/vscode-preview Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5c2b9d74-9e1d-450b-8cfe-504156c619f8

📥 Commits

Reviewing files that changed from the base of the PR and between b5e33d1 and 070050a.

📒 Files selected for processing (3)
  • .changeset/allow-relationship-id.md
  • packages/language-server/src/__tests__/model.spec.ts
  • packages/language-server/src/like-c4.langium

📝 Walkthrough

Walkthrough

The changes extend the LikeC4 DSL grammar to allow the reserved keyword relationship to be used as an element kind identifier. The grammar's Id terminal rule was updated to include relationship alongside other reserved keywords. Test coverage was expanded to verify all reserved identifiers function correctly as element kinds.

Changes

Cohort / File(s) Summary
Grammar & Reserved Keyword Support
packages/language-server/src/like-c4.langium
Updated the Id terminal-value union to accept 'relationship' as a valid identifier, in addition to existing reserved keywords (element, model, group, node, deployment, instance).
Test Coverage
packages/language-server/src/__tests__/model.spec.ts
Expanded reserved-keyword loop to explicitly verify relationship (and other reserved identifiers) are valid as element kinds. Refactored test cases to use parameterized keyword validation instead of singular hardcoded values.
Release Notes
.changeset/allow-relationship-id.md
Added changeset metadata documenting a patch release for @likec4/language-server noting the DSL now allows relationship as an element kind identifier.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is minimal but clearly communicates the purpose. However, it lacks the structured checklist format specified in the repository template. Complete the provided checklist template to confirm tests were added, verification steps completed, and changesets included.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: allowing the reserved keyword 'relationship' to be used as an identifier in the LikeC4 DSL.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch allow-relationship-as-element-kind

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@davydkov davydkov enabled auto-merge (squash) April 15, 2026 18:30
@davydkov davydkov disabled auto-merge April 15, 2026 18:30
@davydkov davydkov merged commit 41ee8b7 into main Apr 15, 2026
16 checks passed
@davydkov davydkov deleted the allow-relationship-as-element-kind branch April 15, 2026 18:30
@likec4-ci likec4-ci Bot mentioned this pull request Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant