How to suppress the sonarqube rule in a specific case?
I want my python code to change the "Method names must follow naming conventions" rule, but only when I override a method from the Qt class.
For example: inheriting from QWidget
and overriding a method resizeEvent()
(which doesn't match the rule).
As per the FAQ, there are //NOSONAR
and @SuppressWarnings
(which will suit my needs) but they are only available for java.
Is there some special keyword for this or do I need to do something like create a new custom rule?
source to share
You can flag the issue as a false positive via the SonarQube interface, as shown in this related question: Sonarqube 5 - how can I flag a false positive?
I created the following backar ticket for the SonarQube Python plugin to consider adding comment marker support NOSONAR
in the next version: http://jira.sonarsource.com/browse/SONARPY-129
source to share