OWASP/Nest

Ternary operators should not be nested

開放

#4,582 建立於 2026年4月25日

 (3 則留言) (0 個反應) (0 位負責人)Python (651 個分叉)auto 404
good first issue

倉庫指標

星標
 (412 顆星)
PR 合併指標
 (平均合併 2天 12小時) (30 天內合併 128 個 PR)

描述

Description

SonarCloud reports a violation of rule typescript:S3358 , Ternary operators should not be nested. So Extract nested ternary operation into an independent statement.

Sonar Issue

https://sonarcloud.io/project/issues?open=AZzuG_Gt93q8aLTr6ODJ&id=OWASP_Nest

Affected Code

       const displayVal = typeof val === 'number' ? val : Array.isArray(val) ? val[0] : val

貢獻者指南