Skip to content

Commit

Permalink
disable magic number check
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentlauvlwj committed Sep 2, 2024
1 parent 39e4c4b commit 34d0169
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion ktorm-core/src/main/kotlin/org/ktorm/schema/SqlTypes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ public fun BaseTable<*>.yearMonth(name: String): Column<YearMonth> {
/**
* [SqlType] implementation used to save [YearMonth] instances, formatting them to strings with pattern `yyyy-MM`.
*/
@Suppress("MagicNumber")
public object YearMonthSqlType : SqlType<YearMonth>(Types.VARCHAR, "varchar") {
private val formatter = DateTimeFormatterBuilder()
.appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 34d0169

Please sign in to comment.