diff --git a/detekt.yml b/detekt.yml index 8c08a502..e915ca0b 100644 --- a/detekt.yml +++ b/detekt.yml @@ -402,7 +402,7 @@ style: active: true maxJumpCount: 2 MagicNumber: - active: true + active: false ignoreNumbers: ['-1', '0', '1', '2', '3', '60'] ignoreHashCodeFunction: true ignorePropertyDeclaration: false diff --git a/ktorm-core/src/main/kotlin/org/ktorm/schema/SqlTypes.kt b/ktorm-core/src/main/kotlin/org/ktorm/schema/SqlTypes.kt index 507a297b..5526bf3d 100644 --- a/ktorm-core/src/main/kotlin/org/ktorm/schema/SqlTypes.kt +++ b/ktorm-core/src/main/kotlin/org/ktorm/schema/SqlTypes.kt @@ -450,7 +450,6 @@ public fun BaseTable<*>.yearMonth(name: String): Column { /** * [SqlType] implementation used to save [YearMonth] instances, formatting them to strings with pattern `yyyy-MM`. */ -@Suppress("MagicNumber") public object YearMonthSqlType : SqlType(Types.VARCHAR, "varchar") { private val formatter = DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) diff --git a/ktorm-ksp-annotations/src/main/kotlin/org/ktorm/ksp/annotation/Undefined.kt b/ktorm-ksp-annotations/src/main/kotlin/org/ktorm/ksp/annotation/Undefined.kt index 3b2f095e..3a4db5f7 100644 --- a/ktorm-ksp-annotations/src/main/kotlin/org/ktorm/ksp/annotation/Undefined.kt +++ b/ktorm-ksp-annotations/src/main/kotlin/org/ktorm/ksp/annotation/Undefined.kt @@ -145,7 +145,7 @@ public object Undefined { return defineClass(name, bytes, null) } - @Suppress("MagicNumber", "NoMultipleSpaces") + @Suppress("NoMultipleSpaces") private fun generateByteCode(className: ByteArray, superClassName: ByteArray): ByteBuffer { val buf = ByteBuffer.allocate(1024) buf.putInt(0xCAFEBABE.toInt()) // magic