OWASP/Nest

Ternary operators should not be nested

Ouverte

#4 582 ouverte le 25 avr. 2026

 (3 commentaires) (0 réaction) (0 personne assignée)Python (651 forks)auto 404
good first issue

Métriques du dépôt

Stars
 (412 étoiles)
Métriques de merge PR
 (Merge moyen 2j 12h) (128 PRs mergées en 30 j)

Description

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

Guide contributeur