Package io.codemodder.codemods
Class RemoveCommentedCodeCodemod
java.lang.Object
io.codemodder.javaparser.JavaParserChanger
io.codemodder.providers.sonar.SonarPluginJavaParserChanger<com.github.javaparser.ast.comments.Comment>
io.codemodder.codemods.RemoveCommentedCodeCodemod
- All Implemented Interfaces:
io.codemodder.CodeChanger
@Codemod(id="sonar:java/remove-commented-code-s125",
reviewGuidance=MERGE_WITHOUT_REVIEW,
executionPriority=HIGH)
public final class RemoveCommentedCodeCodemod
extends io.codemodder.providers.sonar.SonarPluginJavaParserChanger<com.github.javaparser.ast.comments.Comment>
A codemod for removing commented-out lines of code.
-
Field Summary
Fields inherited from class io.codemodder.javaparser.JavaParserChanger
reporter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
onIssueFound
(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, com.github.javaparser.ast.comments.Comment comment, io.codemodder.providers.sonar.api.Issue issue) Methods inherited from class io.codemodder.providers.sonar.SonarPluginJavaParserChanger
shouldRun, visit
Methods inherited from class io.codemodder.javaparser.JavaParserChanger
dependenciesRequired, getDescription, getIndividualChangeDescription, getReferences, getSummary
-
Constructor Details
-
RemoveCommentedCodeCodemod
@Inject public RemoveCommentedCodeCodemod(@ProvidedSonarScan(ruleId="java:S125") io.codemodder.providers.sonar.RuleIssues issues)
-
-
Method Details
-
onIssueFound
public boolean onIssueFound(io.codemodder.CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu, com.github.javaparser.ast.comments.Comment comment, io.codemodder.providers.sonar.api.Issue issue) - Specified by:
onIssueFound
in classio.codemodder.providers.sonar.SonarPluginJavaParserChanger<com.github.javaparser.ast.comments.Comment>
-