Condition verified weirdly

13 views
Skip to first unread message

escande.g...@gmail.com

unread,
Jun 21, 2016, 5:32:07 AM6/21/16
to SonarQube
Hi,

I have a weird comportment with sonar when I verify the following code :

for (const element of myMap.values()) {
    if ((element !== undefined) && (element !== null)) {
        //execute some code
    }

Sonar tell me  : Change this condition so that it does not always evaluate to "false".

I have checked on Stackoverflow but did not find why I have this.

We use Sonar version 5.4.

Pierre-Yves Nicolas

unread,
Jun 21, 2016, 6:43:27 AM6/21/16
to escande.g...@gmail.com, SonarQube
Hi,

This looks like a false positive of the JavaScript plugin.
Can you please check whether the issue still appears with version 2.14-RC1?
We should release 2.14 very soon.

Thanks for your feedback!
Pierre-Yves


--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/7df0e750-2246-4a01-9fc5-3f1b4d58f4b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

escande.g...@gmail.com

unread,
Jun 21, 2016, 8:19:56 AM6/21/16
to SonarQube, escande.g...@gmail.com
Thank you for your answer. I will transfer the info to my IT and see what they will do.

Do you have any idea of when the release will be done ? I doubt they will want to use a snapshot.

Pierre-Yves Nicolas

unread,
Jun 21, 2016, 8:46:27 AM6/21/16
to escande.g...@gmail.com, SonarQube
I just closed the feedback period for 2.14.
The release should be available in a few days.

Pierre-Yves

Reply all
Reply to author
Forward
0 new messages