Skip to content

Commit

Permalink
Fix detekt warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
OptimumCode committed Aug 30, 2024
1 parent 46cac3a commit a4aed8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import kotlin.jvm.JvmStatic

/**
* The [FormatValidator] is used to check whether the [AbstractElement] matches the expected format.
* If the [AbstractElement] is not of the required type (e.g. validator expects string but the [AbstractElement] is an object)
* If the [AbstractElement] is not of the required type
* (e.g. validator expects string but the [AbstractElement] is an object)
* the validator **MUST** return [FormatValidator.Valid] result
*/
@ExperimentalApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ private const val TEN: Double = 10.0
* This function should be used only if you are certain that the [element] is a number
*/
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" }
Expand Down

0 comments on commit a4aed8e

Please sign in to comment.