5

I want to suppress the "Method names should comply with a naming convention" rule in my python code, but only in the case when I'm overriding a method from a Qt class.

For example: inheriting from QWidget and overriding the resizeEvent() method (which is not compliant with the rule).

According to the FAQ there are //NOSONAR and @SuppressWarnings (which will fit my needs) but these are only available for java.

Is there some special keyword for this or should I do something like creating new custom rule?

three_pineapples
  • 11,579
  • 5
  • 38
  • 75
Miso
  • 161
  • 2
  • 11

1 Answers1

1

You can mark the issue as a false positive through the SonarQube UI, as shown in this related question: Sonarqube 5 - how do I mark false-positive?

I've created the following ticket to the SonarQube Python Plugin's backlog to consider adding the NOSONAR comment marker support in an upcoming version: http://jira.sonarsource.com/browse/SONARPY-129

Community
  • 1
  • 1
Dinesh Bolkensteyn
  • 2,971
  • 1
  • 17
  • 20