Package io.codemodder.codemods
Class SonarRemoveUnthrowableExceptionCodemod
java.lang.Object
io.codemodder.javaparser.JavaParserChanger
io.codemodder.providers.sonar.SonarPluginJavaParserChanger<com.github.javaparser.ast.type.ClassOrInterfaceType,io.codemodder.sonar.model.Issue>
io.codemodder.codemods.SonarRemoveUnthrowableExceptionCodemod
- All Implemented Interfaces:
io.codemodder.CodeChanger
,io.codemodder.FixOnlyCodeChanger
@Codemod(id="sonar:java/remove-unthrowable-exceptions-s1130",
reviewGuidance=MERGE_AFTER_CURSORY_REVIEW,
importance=LOW,
executionPriority=HIGH)
public final class SonarRemoveUnthrowableExceptionCodemod
extends io.codemodder.providers.sonar.SonarPluginJavaParserChanger<com.github.javaparser.ast.type.ClassOrInterfaceType,io.codemodder.sonar.model.Issue>
A codemod for automatically removing unthrowable exceptions.
-
Field Summary
Fields inherited from class io.codemodder.providers.sonar.SonarPluginJavaParserChanger
ruleFinding
Fields inherited from class io.codemodder.javaparser.JavaParserChanger
reporter
-
Constructor Summary
ConstructorsConstructorDescriptionSonarRemoveUnthrowableExceptionCodemod
(io.codemodder.providers.sonar.RuleIssue issues) -
Method Summary
Modifier and TypeMethodDescriptionio.codemodder.codetf.DetectorRule
io.codemodder.javaparser.ChangesResult
onFindingFound
(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, com.github.javaparser.ast.type.ClassOrInterfaceType type, io.codemodder.sonar.model.Issue issue) Methods inherited from class io.codemodder.providers.sonar.SonarPluginJavaParserChanger
supports, vendorName, visit
Methods inherited from class io.codemodder.javaparser.JavaParserChanger
getDescription, getIncludesExcludesPattern, getIndividualChangeDescription, getReferences, getSummary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.codemodder.CodeChanger
shouldRun
-
Constructor Details
-
SonarRemoveUnthrowableExceptionCodemod
@Inject public SonarRemoveUnthrowableExceptionCodemod(@ProvidedSonarScan(ruleId="java:S1130") io.codemodder.providers.sonar.RuleIssue issues)
-
-
Method Details
-
onFindingFound
public io.codemodder.javaparser.ChangesResult onFindingFound(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, com.github.javaparser.ast.type.ClassOrInterfaceType type, io.codemodder.sonar.model.Issue issue) - Specified by:
onFindingFound
in classio.codemodder.providers.sonar.SonarPluginJavaParserChanger<com.github.javaparser.ast.type.ClassOrInterfaceType,
io.codemodder.sonar.model.Issue>
-
detectorRule
public io.codemodder.codetf.DetectorRule detectorRule()
-