mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 16:19:20 +02:00
Reformat Kotlin code (#1560)
ktfmt has much improved how it formats Kotlin code. Unfortunately, this means that whenever we touch a single line in a Kotlin file, we get a _lot_ more changes thanks to ratcheting now picking up this file for formatting. This PR just reformats every single Kotlin file so we don't have to deal with this churn in future PRs that touch Kotlin code.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -91,10 +91,10 @@ class PklKotlinCodegenCommand : ModulesCommand(name = "pkl-codegen-kotlin", help
|
||||
metavar = "old_name=new_name",
|
||||
help =
|
||||
"""
|
||||
Replace a prefix in the names of the generated Kotlin classes (repeatable).
|
||||
By default, the names of generated classes are derived from the Pkl module names.
|
||||
With this option, you can override or modify the default names, renaming entire
|
||||
classes or just their packages.
|
||||
Replace a prefix in the names of the generated Kotlin classes (repeatable).
|
||||
By default, the names of generated classes are derived from the Pkl module names.
|
||||
With this option, you can override or modify the default names, renaming entire
|
||||
classes or just their packages.
|
||||
"""
|
||||
.trimIndent(),
|
||||
)
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -77,7 +77,7 @@ class CliKotlinCodeGeneratorTest {
|
||||
open class Mod1(
|
||||
open val pigeon: Person
|
||||
) {
|
||||
"""
|
||||
"""
|
||||
.trimIndent(),
|
||||
module1KotlinFile.readString(),
|
||||
)
|
||||
@@ -88,7 +88,7 @@ class CliKotlinCodeGeneratorTest {
|
||||
pigeon: Mod1.Person,
|
||||
val parrot: Mod1.Person
|
||||
) : Mod1(pigeon) {
|
||||
"""
|
||||
"""
|
||||
.trimIndent(),
|
||||
module2KotlinFile.readString(),
|
||||
)
|
||||
|
||||
+492
-491
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user