Skip to content

Commit ac7e1b4

Browse files
Fix Python custom rule example
1 parent 9a39216 commit ac7e1b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

python-custom-rules/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<description>Python Custom Rules</description>
1313

1414
<properties>
15-
<sonar.python.version>2.0-SNAPSHOT</sonar.python.version> <!-- minimum version is 2.0, Custom Rules API is not available for 1.x -->
15+
<sonar.python.version>3.15.0.9787</sonar.python.version>
1616
</properties>
1717
<dependencies>
1818
<dependency>

python-custom-rules/src/main/java/org/sonar/samples/python/checks/CustomPythonVisitorCheck.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121

2222
import org.sonar.check.Priority;
2323
import org.sonar.check.Rule;
24-
import org.sonar.plugins.python.api.PythonCheckTree;
24+
import org.sonar.plugins.python.api.PythonVisitorCheck;
2525
import org.sonar.plugins.python.api.tree.FunctionDef;
2626

2727
@Rule(
2828
key = CustomPythonVisitorCheck.RULE_KEY,
2929
priority = Priority.MINOR,
3030
name = "Python visitor check",
3131
description = "desc")
32-
public class CustomPythonVisitorCheck extends PythonCheckTree {
32+
public class CustomPythonVisitorCheck extends PythonVisitorCheck {
3333

3434
public static final String RULE_KEY = "visitor";
3535

0 commit comments

Comments
 (0)