OWASP/Nest

Ternary operators should not be nested

Aperta

#4582 aperta il 25 apr 2026

 (3 commenti) (0 reazioni) (0 assegnatari)Python (651 fork)auto 404
good first issue

Metriche repository

Star
 (412 stelle)
Metriche merge PR
 (Merge medio 2g 12h) (128 PR mergiate in 30 g)

Descrizione

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

Guida contributor