[PR #1259] [MERGED] Respect newlines in if/else and let expressions #975

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

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/1259
Author: @bioball
Created: 10/27/2025
Status: Merged
Merged: 10/28/2025
Merged by: @bioball

Base: mainHead: respect-newlines-in-if


📝 Commits (2)

  • 6e75dde Respect newlines in if/else and let expressions
  • 425ebfb Address PR comments

📊 Changes

5 files changed (+86 additions, -5 deletions)

View changed files

📝 pkl-formatter/src/main/kotlin/org/pkl/formatter/Builder.kt (+11 -5)
📝 pkl-formatter/src/test/files/FormatterSnippetTests/input/expr-if.pkl (+26 -0)
📝 pkl-formatter/src/test/files/FormatterSnippetTests/input/expr-let.pkl (+8 -0)
📝 pkl-formatter/src/test/files/FormatterSnippetTests/output/expr-if.pkl (+34 -0)
📝 pkl-formatter/src/test/files/FormatterSnippetTests/output/expr-let.pkl (+7 -0)

📄 Description

Change the formatter to prevent multiline if/else and let expressions from collapsing into a single line.


🔄 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/1259 **Author:** [@bioball](https://github.com/bioball) **Created:** 10/27/2025 **Status:** ✅ Merged **Merged:** 10/28/2025 **Merged by:** [@bioball](https://github.com/bioball) **Base:** `main` ← **Head:** `respect-newlines-in-if` --- ### 📝 Commits (2) - [`6e75dde`](https://github.com/apple/pkl/commit/6e75dde349835e64a7ba4957adf04d8607fde29b) Respect newlines in if/else and let expressions - [`425ebfb`](https://github.com/apple/pkl/commit/425ebfbf7a8c2381e092cc291a884b123635c38d) Address PR comments ### 📊 Changes **5 files changed** (+86 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `pkl-formatter/src/main/kotlin/org/pkl/formatter/Builder.kt` (+11 -5) 📝 `pkl-formatter/src/test/files/FormatterSnippetTests/input/expr-if.pkl` (+26 -0) 📝 `pkl-formatter/src/test/files/FormatterSnippetTests/input/expr-let.pkl` (+8 -0) 📝 `pkl-formatter/src/test/files/FormatterSnippetTests/output/expr-if.pkl` (+34 -0) 📝 `pkl-formatter/src/test/files/FormatterSnippetTests/output/expr-let.pkl` (+7 -0) </details> ### 📄 Description Change the formatter to prevent multiline if/else and let expressions from collapsing into a single line. --- <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:03 +01:00
adam closed this issue 2025-12-30 01:28:03 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#975