Skip to content

Commit

Permalink
Merge branch 'main' into renovate/org.jetbrains.dokka-1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
twyatt authored Oct 24, 2023
2 parents 9520ef1 + a299264 commit 316078e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
[*.{kt,kts}]
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true

ktlint_standard_function-signature = disabled
ktlint_standard_no-blank-line-in-list = disabled
ktlint_standard_no-empty-first-line-in-class-body = disabled

# `string-template-indent` is disabled because it depends on `multiline-expression-wrapping`.
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_string-template-indent = disabled

# `if-else-wrapping` is disabled because it depends on `discouraged-comment-location`.
ktlint_standard_discouraged-comment-location = disabled
ktlint_standard_if-else-wrapping = disabled
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ binary-compatibility-validator = { id = "binary-compatibility-validator", versio
dokka = { id = "org.jetbrains.dokka", version = "1.9.10" }
kotlin-js = { id = "org.jetbrains.kotlin.js", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinter = { id = "org.jmailen.kotlinter", version = "3.16.0" }
kotlinter = { id = "org.jmailen.kotlinter", version = "4.0.0" }
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
maven-publish = { id = "com.vanniktech.maven.publish", version = "0.25.3" }
1 change: 1 addition & 0 deletions koap/src/commonMain/kotlin/ByteArrayReader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ internal class ByteArrayReader(
) {

var index = startIndex

fun exhausted(): Boolean = index >= endIndex

private fun checkIndex() {
Expand Down
1 change: 1 addition & 0 deletions koap/src/commonMain/kotlin/Decoder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ private fun Int.toCode(): Message.Code = when (this) {
165 -> ProxyingNotSupported // 5.05

else -> {
@Suppress("ktlint:standard:property-naming") // ktlint doesn't properly handle the ticks.
val `class` = (this shr 5) and 0b111
val detail = this and 0b11111
Message.Code.Raw(`class`, detail)
Expand Down
2 changes: 2 additions & 0 deletions koap/src/commonMain/kotlin/Encoder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,9 @@ internal fun BufferedSink.writeToken(token: Long) {
}

private fun BufferedSink.writeByte(byte: Long) = writeByte(byte.toInt())

private fun BufferedSink.writeShort(short: Long) = writeShort(short.toInt())

private fun BufferedSink.writeInt(int: Long) = writeInt(int.toInt())

// Type (T): 2-bit unsigned integer
Expand Down
1 change: 1 addition & 0 deletions koap/src/commonMain/kotlin/Message.kt
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ sealed class Message {
*/
sealed class Code {

@Suppress("ktlint:standard:property-naming") // ktlint doesn't properly handle the ticks.
abstract val `class`: Int
abstract val detail: Int

Expand Down

0 comments on commit 316078e

Please sign in to comment.