Package org.sonar.plugins.python
Class PythonHighlighter
java.lang.Object
org.sonar.plugins.python.api.PythonSubscriptionCheck
org.sonar.plugins.python.PythonHighlighter
- All Implemented Interfaces:
PythonCheck,SubscriptionCheck
Colors Python code. Currently colors:
-
String literals. Examples:
"hello" 'hello' """ hello hello again """ -
Keywords. Example:
def -
Numbers. Example:
123 123L 123.45 123.45e-10 123+88.99JFor a negative number, the "minus" sign is not colored. -
Comments. Example:
# some comment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.sonar.plugins.python.api.PythonCheck
PythonCheck.CheckScope, PythonCheck.PreciseIssueNested classes/interfaces inherited from interface org.sonar.plugins.python.api.SubscriptionCheck
SubscriptionCheck.Context -
Constructor Summary
ConstructorsConstructorDescriptionPythonHighlighter(org.sonar.api.batch.sensor.SensorContext context, org.sonar.api.batch.fs.InputFile inputFile) -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(SubscriptionCheck.Context context) voidvoidscanFile(PythonVisitorContext visitorContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.sonar.plugins.python.api.PythonCheck
scanWithoutParsing, scope
-
Constructor Details
-
PythonHighlighter
public PythonHighlighter(org.sonar.api.batch.sensor.SensorContext context, org.sonar.api.batch.fs.InputFile inputFile)
-
-
Method Details
-
scanFile
- Specified by:
scanFilein interfacePythonCheck- Overrides:
scanFilein classPythonSubscriptionCheck
-
initialize
-
leaveFile
public void leaveFile()- Overrides:
leaveFilein classPythonSubscriptionCheck
-