Package org.sonar.python.checks.regex
Class StringReplaceCheck
- java.lang.Object
-
- org.sonar.plugins.python.api.PythonSubscriptionCheck
-
- org.sonar.python.checks.regex.AbstractRegexCheck
-
- org.sonar.python.checks.regex.StringReplaceCheck
-
- All Implemented Interfaces:
PythonCheck,SubscriptionCheck
public class StringReplaceCheck extends AbstractRegexCheck
-
-
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
-
-
Field Summary
-
Fields inherited from class org.sonar.python.checks.regex.AbstractRegexCheck
regexContext, reportedRegexTrees
-
-
Constructor Summary
Constructors Constructor Description StringReplaceCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckRegex(org.sonarsource.analyzer.commons.regex.RegexParseResult regexParseResult, CallExpression callExpression)protected Map<String,Integer>lookedUpFunctions()Should return a map whose keys are the functions the check is interested in, and the values are the position of the flags parameter.-
Methods inherited from class org.sonar.python.checks.regex.AbstractRegexCheck
addIssue, initialize, mapPythonFlag
-
Methods inherited from class org.sonar.plugins.python.api.PythonSubscriptionCheck
leaveFile, scanFile
-
-
-
-
Method Detail
-
lookedUpFunctions
protected Map<String,Integer> lookedUpFunctions()
Description copied from class:AbstractRegexCheckShould return a map whose keys are the functions the check is interested in, and the values are the position of the flags parameter. Set the position of the flags parameter tonullif there is none.- Overrides:
lookedUpFunctionsin classAbstractRegexCheck
-
checkRegex
public void checkRegex(org.sonarsource.analyzer.commons.regex.RegexParseResult regexParseResult, CallExpression callExpression)- Specified by:
checkRegexin classAbstractRegexCheck
-
-