Strange rendering of complexity markers, typescript:S1541

Hi all,

The function below has one nesting level and 10?? and || operators. The complexity is correctly reported as 11. However, I don’t understand why all markers for the ?? and || operators are rendered on line 98. Is this a bug?

Regards, Frank

Hey there.

What version of SonarQube are you using (this should be noted in the footer of your instance). Or are you using SonarQube Cloud? :smiley:

Hi Colin, sorry, should’ve mentioned that: SonarQube Developer Edition v2025.3 (108892).

Hello @fniessink,

thanks for reporting this. Indeed it seems the rule is not properly handling the nullish coalescing operator (??). I created a ticket to fix it.

Cheers!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.