How to trigger a full SonarQube ES reindex?
Currently, the only way to force a reindex is to:
Stop your server
Remove the contents of the $SQ_HOME/data/es5 directory
Start your server
How to bulk remove projects not scanned for too long?
In Administration > Projects > Management, SonarQube 6.7+ introduced an option called "Last analysis before" to filter projects not scanned since a given date.
When it's required to bulk delete projects not scanned for more than one year for example, use "Last analysis before" with "today - 1 year" to get the list of projects then click on the "Select All" checkbox and finally the "Delete" button.
All of this can be automated by using the corresponding Web API api/projects/bulk_delete ?analyzedBefore=YYYY-MM-DD
I can't use my HTTP Proxy since I upgraded to Java8u111
If you are getting this error in the logs when trying to use the Marketplace:
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/
Proxy Authentication Required
... you probably upgraded your Java8 installation with an update greater than 111. To fix that, change your sonar.properties like this:
sonar.web.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djdk.http.auth.tunneling.disabledSchemes=
How to remove False-Positive issues?
False-Positive and Won't Fix
You can mark individual issues as False Positive or Won't Fix through the issues interface. However, this solution doesn't work across branches - you'll have to re-mark the issue False Positive for each branch under analysis. So an in-code approach may be preferable if multiple branches of a project are under analysis:
You can use the generic mechanism implemented in SonarQube: put //NOSONAR at the end of the line of the issue. This will suppress the all issues - now and in the future - that might be raised on the line.
Switch Off Issues
You can review an issue to flag it as false positive directly from the user interface.