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, getSourceControlUrl, getSummary
-
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
- Throws:
IOException
-
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.
-