File tree Expand file tree Collapse file tree
sonar-python-plugin/src/main/java/org/sonar/plugins/python/pylint Expand file tree Collapse file tree Original file line number Diff line number Diff line change 114114 <dependency >
115115 <groupId >org.codehaus.sonar.sslr-squid-bridge</groupId >
116116 <artifactId >sslr-squid-bridge</artifactId >
117- <version >2.4 </version >
117+ <version >2.5 </version >
118118 </dependency >
119119 <dependency >
120120 <groupId >junit</groupId >
Original file line number Diff line number Diff line change 2323import org .sonar .api .server .rule .RulesDefinition ;
2424import org .sonar .api .server .rule .RulesDefinitionXmlLoader ;
2525import org .sonar .plugins .python .Python ;
26+ import org .sonar .squidbridge .rules .SqaleXmlLoader ;
2627
2728public class PylintRuleRepository implements RulesDefinition {
2829
2930 public static final String REPOSITORY_NAME = "Pylint" ;
3031 public static final String REPOSITORY_KEY = REPOSITORY_NAME ;
3132
3233 private static final String RULES_FILE = "/org/sonar/plugins/python/pylint/rules.xml" ;
34+ private static final String SQALE_FILE = "/com/sonar/sqale/python-model.xml" ;
3335 private final RulesDefinitionXmlLoader xmlLoader ;
3436
3537 public PylintRuleRepository (RulesDefinitionXmlLoader xmlLoader ) {
@@ -42,6 +44,7 @@ public void define(Context context) {
4244 .createRepository (REPOSITORY_KEY , Python .KEY )
4345 .setName (REPOSITORY_NAME );
4446 xmlLoader .load (repository , getClass ().getResourceAsStream (RULES_FILE ), Charsets .UTF_8 .name ());
47+ SqaleXmlLoader .load (repository , SQALE_FILE );
4548 repository .done ();
4649 }
4750}
You can’t perform that action at this time.
0 commit comments