Skip to content

Commit 34d0169

Browse files
disable magic number check
1 parent 39e4c4b commit 34d0169

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

detekt.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ style:
402402
active: true
403403
maxJumpCount: 2
404404
MagicNumber:
405-
active: true
405+
active: false
406406
ignoreNumbers: ['-1', '0', '1', '2', '3', '60']
407407
ignoreHashCodeFunction: true
408408
ignorePropertyDeclaration: false

ktorm-core/src/main/kotlin/org/ktorm/schema/SqlTypes.kt

-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ public fun BaseTable<*>.yearMonth(name: String): Column<YearMonth> {
450450
/**
451451
* [SqlType] implementation used to save [YearMonth] instances, formatting them to strings with pattern `yyyy-MM`.
452452
*/
453-
@Suppress("MagicNumber")
454453
public object YearMonthSqlType : SqlType<YearMonth>(Types.VARCHAR, "varchar") {
455454
private val formatter = DateTimeFormatterBuilder()
456455
.appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD)

ktorm-ksp-annotations/src/main/kotlin/org/ktorm/ksp/annotation/Undefined.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public object Undefined {
145145
return defineClass(name, bytes, null)
146146
}
147147

148-
@Suppress("MagicNumber", "NoMultipleSpaces")
148+
@Suppress("NoMultipleSpaces")
149149
private fun generateByteCode(className: ByteArray, superClassName: ByteArray): ByteBuffer {
150150
val buf = ByteBuffer.allocate(1024)
151151
buf.putInt(0xCAFEBABE.toInt()) // magic

0 commit comments

Comments
 (0)