Package io.codemodder
Class SarifPluginRawFileChanger
java.lang.Object
io.codemodder.RawFileChanger
io.codemodder.SarifPluginRawFileChanger
- All Implemented Interfaces:
CodeChanger
A
RawFileChanger bundled with a RuleSarif.-
Field Summary
Fields inherited from class io.codemodder.RawFileChanger
reporter -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedSarifPluginRawFileChanger(RuleSarif sarif, CodemodReporterStrategy reporter) -
Method Summary
Modifier and TypeMethodDescriptionabstract List<CodemodChange>onFileFound(CodemodInvocationContext context, List<com.contrastsecurity.sarif.Result> results) Creates a visitor for the given context and results.visitFile(CodemodInvocationContext context) Visit a file.Methods inherited from class io.codemodder.RawFileChanger
getDescription, getIndividualChangeDescription, getReferences, getSummaryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.codemodder.CodeChanger
shouldRun
-
Constructor Details
-
SarifPluginRawFileChanger
-
SarifPluginRawFileChanger
-
-
Method Details
-
visitFile
Description copied from class:RawFileChangerVisit a file. It is up to the subtype to make sure the file is something to be changed and perform all the changing.- Specified by:
visitFilein classRawFileChanger- Returns:
- a list of changes that were made to the file
-
onFileFound
public abstract List<CodemodChange> onFileFound(CodemodInvocationContext context, List<com.contrastsecurity.sarif.Result> results) Creates a visitor for the given context and results.- Parameters:
context- the context of this files transformationresults- the given SARIF results to act on- Returns:
- a
ListofCodemodChanges representing changes in the file.
-