Skip to content

Commit 7a92b27

Browse files
committed
ktLintFormat
1 parent 5ed751e commit 7a92b27

File tree

205 files changed

+1201
-2699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+1201
-2699
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ insert_final_newline = true
1818
# it's automatically set to 100 on `ktlint --android ...` (per Android Kotlin Style Guide)
1919
max_line_length = off
2020
trim_trailing_whitespace = true
21-
ktlint_disabled_rules = no-wildcard-imports
21+
# ktlint_disabled_rules = no-wildcard-imports
2222
# ktlint_standard_no-wildcard-imports = disabled
2323
# ktlint_standard_enum-entry-name-case = disabled
2424
# ktlint_standard = disabled

api-model-v1-41/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
2424
exclude {
2525
it.file.path.startsWith(file(layout.buildDirectory.dir("generated")).path)
2626
}
27+
exclude("**/build.gradle.kts")
28+
exclude {
29+
it.file.path.endsWith("build.gradle.kts")
30+
}
2731
}
2832
}
2933

api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Address.kt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"ArrayInDataClass",
1111
"EnumEntryName",
1212
"RemoveRedundantQualifierName",
13-
"UnusedImport"
13+
"UnusedImport",
1414
)
1515

1616
package de.gesellix.docker.remote.api
@@ -25,15 +25,11 @@ import com.squareup.moshi.JsonClass
2525
* @param prefixLen Mask length of the IP address.
2626
*/
2727
@JsonClass(generateAdapter = true)
28-
2928
data class Address(
30-
31-
/* IP address. */
29+
// IP address.
3230
@Json(name = "Addr")
3331
var addr: kotlin.String? = null,
34-
35-
/* Mask length of the IP address. */
32+
// Mask length of the IP address.
3633
@Json(name = "PrefixLen")
37-
var prefixLen: kotlin.Int? = null
38-
34+
var prefixLen: kotlin.Int? = null,
3935
)

api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/AuthConfig.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"ArrayInDataClass",
1111
"EnumEntryName",
1212
"RemoveRedundantQualifierName",
13-
"UnusedImport"
13+
"UnusedImport",
1414
)
1515

1616
package de.gesellix.docker.remote.api
@@ -27,19 +27,13 @@ import com.squareup.moshi.JsonClass
2727
* @param serveraddress
2828
*/
2929
@JsonClass(generateAdapter = true)
30-
3130
data class AuthConfig(
32-
3331
@Json(name = "username")
3432
var username: kotlin.String? = null,
35-
3633
@Json(name = "password")
3734
var password: kotlin.String? = null,
38-
3935
@Json(name = "email")
4036
var email: kotlin.String? = null,
41-
4237
@Json(name = "serveraddress")
43-
var serveraddress: kotlin.String? = null
44-
38+
var serveraddress: kotlin.String? = null,
4539
)

api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/BuildCache.kt

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"ArrayInDataClass",
1111
"EnumEntryName",
1212
"RemoveRedundantQualifierName",
13-
"UnusedImport"
13+
"UnusedImport",
1414
)
1515

1616
package de.gesellix.docker.remote.api
@@ -34,54 +34,40 @@ import com.squareup.moshi.JsonClass
3434
* @param usageCount
3535
*/
3636
@JsonClass(generateAdapter = true)
37-
3837
data class BuildCache(
39-
40-
/* Unique ID of the build cache record. */
38+
// Unique ID of the build cache record.
4139
@Json(name = "ID")
4240
var ID: kotlin.String? = null,
43-
44-
/* ID of the parent build cache record. > **Deprecated**: This field is deprecated, and omitted if empty. */
41+
// ID of the parent build cache record. > **Deprecated**: This field is deprecated, and omitted if empty.
4542
@Json(name = "Parent")
4643
var parent: kotlin.String? = null,
47-
48-
/* List of parent build cache record IDs. */
44+
// List of parent build cache record IDs.
4945
@Json(name = "Parents")
5046
var parents: kotlin.collections.MutableList<kotlin.String>? = null,
51-
52-
/* Cache record type. */
47+
// Cache record type.
5348
@Json(name = "Type")
5449
var type: BuildCache.Type? = null,
55-
56-
/* Description of the build-step that produced the build cache. */
50+
// Description of the build-step that produced the build cache.
5751
@Json(name = "Description")
5852
var description: kotlin.String? = null,
59-
60-
/* Indicates if the build cache is in use. */
53+
// Indicates if the build cache is in use.
6154
@Json(name = "InUse")
6255
var inUse: kotlin.Boolean? = null,
63-
64-
/* Indicates if the build cache is shared. */
56+
// Indicates if the build cache is shared.
6557
@Json(name = "Shared")
6658
var shared: kotlin.Boolean? = null,
67-
68-
/* Amount of disk space used by the build cache (in bytes). */
59+
// Amount of disk space used by the build cache (in bytes).
6960
@Json(name = "Size")
7061
var propertySize: kotlin.Int? = null,
71-
72-
/* Date and time at which the build cache was created in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. */
62+
// Date and time at which the build cache was created in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
7363
@Json(name = "CreatedAt")
7464
var createdAt: kotlin.String? = null,
75-
76-
/* Date and time at which the build cache was last used in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. */
65+
// Date and time at which the build cache was last used in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
7766
@Json(name = "LastUsedAt")
7867
var lastUsedAt: kotlin.String? = null,
79-
8068
@Json(name = "UsageCount")
81-
var usageCount: kotlin.Int? = null
82-
69+
var usageCount: kotlin.Int? = null,
8370
) {
84-
8571
/**
8672
* Cache record type.
8773
*
@@ -105,6 +91,6 @@ data class BuildCache(
10591
ExecPeriodCachemount("exec.cachemount"),
10692

10793
@Json(name = "regular")
108-
Regular("regular");
94+
Regular("regular"),
10995
}
11096
}

api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/BuildInfo.kt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"ArrayInDataClass",
1111
"EnumEntryName",
1212
"RemoveRedundantQualifierName",
13-
"UnusedImport"
13+
"UnusedImport",
1414
)
1515

1616
package de.gesellix.docker.remote.api
@@ -31,31 +31,21 @@ import com.squareup.moshi.JsonClass
3131
* @param aux
3232
*/
3333
@JsonClass(generateAdapter = true)
34-
3534
data class BuildInfo(
36-
3735
@Json(name = "id")
3836
var id: kotlin.String? = null,
39-
4037
@Json(name = "stream")
4138
var stream: kotlin.String? = null,
42-
4339
@Json(name = "error")
4440
var error: kotlin.String? = null,
45-
4641
@Json(name = "errorDetail")
4742
var errorDetail: ErrorDetail? = null,
48-
4943
@Json(name = "status")
5044
var status: kotlin.String? = null,
51-
5245
@Json(name = "progress")
5346
var progress: kotlin.String? = null,
54-
5547
@Json(name = "progressDetail")
5648
var progressDetail: ProgressDetail? = null,
57-
5849
@Json(name = "aux")
59-
var aux: ImageID? = null
60-
50+
var aux: ImageID? = null,
6151
)

api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/BuildPruneResponse.kt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"ArrayInDataClass",
1111
"EnumEntryName",
1212
"RemoveRedundantQualifierName",
13-
"UnusedImport"
13+
"UnusedImport",
1414
)
1515

1616
package de.gesellix.docker.remote.api
@@ -25,14 +25,10 @@ import com.squareup.moshi.JsonClass
2525
* @param spaceReclaimed Disk space reclaimed in bytes
2626
*/
2727
@JsonClass(generateAdapter = true)
28-
2928
data class BuildPruneResponse(
30-
3129
@Json(name = "CachesDeleted")
3230
var cachesDeleted: kotlin.collections.MutableList<kotlin.String>? = null,
33-
34-
/* Disk space reclaimed in bytes */
31+
// Disk space reclaimed in bytes
3532
@Json(name = "SpaceReclaimed")
36-
var spaceReclaimed: kotlin.Long? = null
37-
33+
var spaceReclaimed: kotlin.Long? = null,
3834
)

api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ChangeType.kt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"ArrayInDataClass",
1111
"EnumEntryName",
1212
"RemoveRedundantQualifierName",
13-
"UnusedImport"
13+
"UnusedImport",
1414
)
1515

1616
package de.gesellix.docker.remote.api
@@ -26,15 +26,15 @@ import com.squareup.moshi.JsonClass
2626

2727
@JsonClass(generateAdapter = false)
2828
enum class ChangeType(val value: kotlin.Int) {
29-
3029
@Json(name = "0")
3130
T0(0),
3231

3332
@Json(name = "1")
3433
T1(1),
3534

3635
@Json(name = "2")
37-
T2(2);
36+
T2(2),
37+
;
3838

3939
/**
4040
* Override [toString()] to avoid using the enum variable name as the value, and instead use
@@ -54,11 +54,12 @@ enum class ChangeType(val value: kotlin.Int) {
5454
/**
5555
* Returns a valid [ChangeType] for [data], null otherwise.
5656
*/
57-
fun decode(data: kotlin.Any?): ChangeType? = data?.let {
58-
val normalizedData = "$it".lowercase()
59-
values().firstOrNull { value ->
60-
it == value || normalizedData == "$value".lowercase()
57+
fun decode(data: kotlin.Any?): ChangeType? =
58+
data?.let {
59+
val normalizedData = "$it".lowercase()
60+
values().firstOrNull { value ->
61+
it == value || normalizedData == "$value".lowercase()
62+
}
6163
}
62-
}
6364
}
6465
}

api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ClusterInfo.kt

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"ArrayInDataClass",
1111
"EnumEntryName",
1212
"RemoveRedundantQualifierName",
13-
"UnusedImport"
13+
"UnusedImport",
1414
)
1515

1616
package de.gesellix.docker.remote.api
@@ -33,44 +33,32 @@ import com.squareup.moshi.JsonClass
3333
* @param subnetSize SubnetSize specifies the subnet size of the networks created from the default subnet pool.
3434
*/
3535
@JsonClass(generateAdapter = true)
36-
3736
data class ClusterInfo(
38-
39-
/* The ID of the swarm. */
37+
// The ID of the swarm.
4038
@Json(name = "ID")
4139
var ID: kotlin.String? = null,
42-
4340
@Json(name = "Version")
4441
var version: ObjectVersion? = null,
45-
46-
/* Date and time at which the swarm was initialised in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. */
42+
// Date and time at which the swarm was initialised in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
4743
@Json(name = "CreatedAt")
4844
var createdAt: kotlin.String? = null,
49-
50-
/* Date and time at which the swarm was last updated in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. */
45+
// Date and time at which the swarm was last updated in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
5146
@Json(name = "UpdatedAt")
5247
var updatedAt: kotlin.String? = null,
53-
5448
@Json(name = "Spec")
5549
var spec: SwarmSpec? = null,
56-
5750
@Json(name = "TLSInfo")
5851
var tlSInfo: TLSInfo? = null,
59-
60-
/* Whether there is currently a root CA rotation in progress for the swarm */
52+
// Whether there is currently a root CA rotation in progress for the swarm
6153
@Json(name = "RootRotationInProgress")
6254
var rootRotationInProgress: kotlin.Boolean? = null,
63-
64-
/* DataPathPort specifies the data path port number for data traffic. Acceptable port range is 1024 to 49151. If no port is set or is set to 0, the default port (4789) is used. */
55+
// DataPathPort specifies the data path port number for data traffic. Acceptable port range is 1024 to 49151. If no port is set or is set to 0, the default port (4789) is used.
6556
@Json(name = "DataPathPort")
6657
var dataPathPort: kotlin.Int? = null,
67-
68-
/* Default Address Pool specifies default subnet pools for global scope networks. */
58+
// Default Address Pool specifies default subnet pools for global scope networks.
6959
@Json(name = "DefaultAddrPool")
7060
var defaultAddrPool: kotlin.collections.MutableList<kotlin.String>? = null,
71-
72-
/* SubnetSize specifies the subnet size of the networks created from the default subnet pool. */
61+
// SubnetSize specifies the subnet size of the networks created from the default subnet pool.
7362
@Json(name = "SubnetSize")
74-
var subnetSize: kotlin.Int? = null
75-
63+
var subnetSize: kotlin.Int? = null,
7664
)

api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ClusterVolume.kt

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"ArrayInDataClass",
1111
"EnumEntryName",
1212
"RemoveRedundantQualifierName",
13-
"UnusedImport"
13+
"UnusedImport",
1414
)
1515

1616
package de.gesellix.docker.remote.api
@@ -30,30 +30,21 @@ import com.squareup.moshi.JsonClass
3030
* @param publishStatus The status of the volume as it pertains to its publishing and use on specific nodes
3131
*/
3232
@JsonClass(generateAdapter = true)
33-
3433
data class ClusterVolume(
35-
36-
/* The Swarm ID of this volume. Because cluster volumes are Swarm objects, they have an ID, unlike non-cluster volumes. This ID can be used to refer to the Volume instead of the name. */
34+
// The Swarm ID of this volume. Because cluster volumes are Swarm objects, they have an ID, unlike non-cluster volumes. This ID can be used to refer to the Volume instead of the name.
3735
@Json(name = "ID")
3836
var ID: kotlin.String? = null,
39-
4037
@Json(name = "Version")
4138
var version: ObjectVersion? = null,
42-
4339
@Json(name = "CreatedAt")
4440
var createdAt: kotlin.String? = null,
45-
4641
@Json(name = "UpdatedAt")
4742
var updatedAt: kotlin.String? = null,
48-
4943
@Json(name = "Spec")
5044
var spec: ClusterVolumeSpec? = null,
51-
5245
@Json(name = "Info")
5346
var info: ClusterVolumeInfo? = null,
54-
55-
/* The status of the volume as it pertains to its publishing and use on specific nodes */
47+
// The status of the volume as it pertains to its publishing and use on specific nodes
5648
@Json(name = "PublishStatus")
57-
var publishStatus: kotlin.collections.MutableList<ClusterVolumePublishStatusInner>? = null
58-
49+
var publishStatus: kotlin.collections.MutableList<ClusterVolumePublishStatusInner>? = null,
5950
)

0 commit comments

Comments
 (0)