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
ConstructorsModifierConstructorDescriptionprotected
protected
SarifPluginRawFileChanger
(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, getSummary
-
Constructor Details
-
SarifPluginRawFileChanger
-
SarifPluginRawFileChanger
-
-
Method Details
-
visitFile
Description copied from class:RawFileChanger
Visit 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:
visitFile
in 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
List
ofCodemodChange
s representing changes in the file.
-