OWASP/Nest

Ternary operators should not be nested

Aberta

#4.582 aberto em 25 de abr. de 2026

 (3 comentários) (0 reação) (0 responsável)Python (651 forks)auto 404
good first issue

Métricas do repositório

Stars
 (412 estrelas)
Métricas de merge de PR
 (Mesclagem média 2d 12h) (128 fundiu PRs em 30d)

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

Guia do colaborador