How to relax rules for "Remove this commented out code"?

2,920 views
Skip to first unread message

sri...@gmail.com

unread,
Aug 9, 2017, 1:49:53 PM8/9/17
to SonarQube
Hi Sonar Team,

Is there any way to relax the comment out code in Sonarqube. There are lot of commented out lines in our code and recently we implemented Quality gate feature in our pipeline and builds are getting mainly failed for this reason.

Below is the example:


In the above image there is also an other issue, there are two commented out lines and sonar reported only one as the issue and not other one. Can you please help us on this this?


Thanks in advance.

Thanks,
Srikanth 

G. Ann Campbell

unread,
Aug 9, 2017, 2:21:01 PM8/9/17
to SonarQube, sri...@gmail.com
Hi Srikanth,

Our detection of commented-out code is based on heuristics, and as such will unfortunately always have false positives (although your example doesn't look like an FP to me).

I'm afraid your choices are to either mark the problematic issues either False Positive or Won't Fix, or to disable the rule.


Ann 
Reply all
Reply to author
Forward
0 new messages