[PR #1351] [MERGED] Fix formatting of nodes with no children #1036

Closed
opened 2025-12-30 01:28:25 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/1351
Author: @bioball
Created: 12/5/2025
Status: Merged
Merged: 12/9/2025
Merged by: @bioball

Base: mainHead: fix-empty-formatting


📝 Commits (3)

  • 55a5aed Fix formatting of nodes with no children
  • f235a26 Update pkl-formatter/src/test/kotlin/org/pkl/formatter/FormatterTest.kt
  • 390f884 Simplify listOf(Empty) to emptyList()

📊 Changes

2 files changed (+8 additions, -1 deletions)

View changed files

📝 pkl-formatter/src/main/kotlin/org/pkl/formatter/Builder.kt (+1 -1)
📝 pkl-formatter/src/test/kotlin/org/pkl/formatter/FormatterTest.kt (+7 -0)

📄 Description

For example, this fixes an issue where an empty module turns into \n.

Closes https://github.com/apple/pkl/issues/1348


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/apple/pkl/pull/1351 **Author:** [@bioball](https://github.com/bioball) **Created:** 12/5/2025 **Status:** ✅ Merged **Merged:** 12/9/2025 **Merged by:** [@bioball](https://github.com/bioball) **Base:** `main` ← **Head:** `fix-empty-formatting` --- ### 📝 Commits (3) - [`55a5aed`](https://github.com/apple/pkl/commit/55a5aed041e90fe35bad1133879e9eb3533a6be7) Fix formatting of nodes with no children - [`f235a26`](https://github.com/apple/pkl/commit/f235a26ffaa0423ee8ee34885aee81efda57c291) Update pkl-formatter/src/test/kotlin/org/pkl/formatter/FormatterTest.kt - [`390f884`](https://github.com/apple/pkl/commit/390f88465adc81e627b8c734b88edca331f192e9) Simplify listOf(Empty) to emptyList() ### 📊 Changes **2 files changed** (+8 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `pkl-formatter/src/main/kotlin/org/pkl/formatter/Builder.kt` (+1 -1) 📝 `pkl-formatter/src/test/kotlin/org/pkl/formatter/FormatterTest.kt` (+7 -0) </details> ### 📄 Description For example, this fixes an issue where an empty module turns into ` \n`. Closes https://github.com/apple/pkl/issues/1348 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 01:28:25 +01:00
adam closed this issue 2025-12-30 01:28:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#1036