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.99J
For 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.PreciseIssue
Nested 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 TypeMethodDescriptionvoid
initialize
(SubscriptionCheck.Context context) void
void
scanFile
(PythonVisitorContext visitorContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
scanFile
in interfacePythonCheck
- Overrides:
scanFile
in classPythonSubscriptionCheck
-
initialize
-
leaveFile
public void leaveFile()- Overrides:
leaveFile
in classPythonSubscriptionCheck
-