python:S100 Method names should comply with a naming convention

259 views
Skip to first unread message

Felipe Lima

unread,
Apr 20, 2016, 4:54:09 PM4/20/16
to SonarQube
Hi, My python software uses Qt libraries. Those uses the camel case convention, so every time i need to override a Qt method the S100 rule alerts me of my "wrong doings".
Why does this rules apply to override methods? I'd really like to follow this rule but I don't have control over others libraries.
What should I do?

Elena Vilchik

unread,
Apr 28, 2016, 9:28:24 AM4/28/16
to SonarQube
Hi!

Unfortunately it's hard (or almost impossible if parent class is a library class) to distinguish overriding method to ignore it in this rule. We might ignore all methods in classes which have a parent class but this will produce plenty of lost issues (false negative).

So I see 3 solutions for you:
1) disable the rule
2) update rule parameter to cover both styles
3) add exclusions for this rule http://docs.sonarqube.org/display/SONAR/Narrowing+the+Focus#NarrowingtheFocus-IgnoreIssues (Restrict Scope of Coding Rules)
Elena VILCHIK | SonarSource
Language Team
Reply all
Reply to author
Forward
0 new messages