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
public class PythonHighlighter extends PythonSubscriptionCheck
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.PreciseIssue
-
Nested classes/interfaces inherited from interface org.sonar.plugins.python.api.SubscriptionCheck
SubscriptionCheck.Context
-
-
Constructor Summary
Constructors Constructor Description PythonHighlighter(org.sonar.api.batch.sensor.SensorContext context, org.sonar.api.batch.fs.InputFile inputFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(SubscriptionCheck.Context context)voidleaveFile()voidscanFile(PythonVisitorContext visitorContext)
-
-
-
Method Detail
-
scanFile
public void scanFile(PythonVisitorContext visitorContext)
- Specified by:
scanFilein interfacePythonCheck- Overrides:
scanFilein classPythonSubscriptionCheck
-
initialize
public void initialize(SubscriptionCheck.Context context)
-
leaveFile
public void leaveFile()
- Overrides:
leaveFilein classPythonSubscriptionCheck
-
-