Skip to content

Commit

Permalink
Move FIXME comment
Browse files Browse the repository at this point in the history
  • Loading branch information
OptimumCode committed Aug 31, 2024
1 parent 705cdb8 commit fc624b7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ private const val TEN: Double = 10.0
/**
* This function should be used only if you are certain that the [element] is a number
*/
@Suppress("detekt:ForbiddenComment")
// FIXME: if we add support for formats other then JSON we should handle +Inf, -Inf and NaN values correctly
internal fun numberParts(element: PrimitiveElement): NumberParts {
@Suppress("detekt:ForbiddenComment")
if (element.content.run { contains(E_SMALL_CHAR) || contains(E_BIG_CHAR) }) {
// FIXME: if we add support for YAML then we should handle +Inf and -Inf values correctly
val number = requireNotNull(element.number) { "element '${element.content}' is not a number" }
return number.toDouble().run {
var precision = 0
Expand Down

0 comments on commit fc624b7

Please sign in to comment.