Enforce Pkl formatting of stdlib with spotless (#1253)

This adds a spotless formatting step using the new pkl formatter.

This only formats Pkl sources in the stdlib, because other sources
are possibly test input and not meant to be formatted.
This commit is contained in:
Daniel Chao
2025-10-24 10:15:14 -07:00
committed by GitHub
parent 3223083324
commit c7680aea1f
4 changed files with 94 additions and 12 deletions

View File

@@ -437,7 +437,7 @@ class RenderDirective {
text: String
/// The bytes to output as-is (without escaping or quoting).
///
///
/// Only used by [BytesRenderer], ignored by [ValueRenderer].
@Since { version = "0.30.0" }
bytes: Bytes = text.encodeToBytes("UTF-8")

View File

@@ -17,8 +17,8 @@ plugins {
pklAllProjects
base
`maven-publish`
id("com.diffplug.spotless")
pklPublishLibrary
pklSpotlessFormat
signing
}
@@ -51,13 +51,3 @@ publishing {
}
signing { sign(publishing.publications["stdlib"]) }
spotless {
format("pkl") {
target("*.pkl")
licenseHeaderFile(
rootProject.file("buildSrc/src/main/resources/license-header.line-comment.txt"),
"/// ",
)
}
}