FP with squid:S1854 when assert is used

470 views
Skip to first unread message

Victor Noël

unread,
Apr 18, 2016, 10:46:19 AM4/18/16
to SonarQube
Hi,

Apparently squid:S1854 is raised when a variable is created but not used later.
But if I create it in order to do an assert on it just after, the issue should not be raised I think.

Thanks

Victor

Michael Gumowski

unread,
Apr 26, 2016, 12:34:55 PM4/26/16
to Victor Noël, SonarQube
Hello Victor,

The assert statement is currently ignored in squid:S1854, as our implementation of CFG (Control Flow Graph) analysis on which the rule is based does not yet handle assertions. See following JIRA ticket: https://jira.sonarsource.com/browse/SONARJAVA-1537

Cheers,

Michael GUMOWSKI | SonarSource
Software Developer @ Language Team
http://sonarsource.com

--
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/17ccad04-8f12-4a8b-b958-cf03c2728ea4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Victor Noël

unread,
Apr 27, 2016, 3:09:38 AM4/27/16
to SonarQube, victo...@gmail.com
Nice :)

Glad it's in the pipe!
Reply all
Reply to author
Forward
0 new messages