Package io.codemodder

Class SarifPluginRawFileChanger

java.lang.Object
io.codemodder.RawFileChanger
io.codemodder.SarifPluginRawFileChanger
All Implemented Interfaces:
CodeChanger

public abstract class SarifPluginRawFileChanger extends RawFileChanger
A RawFileChanger bundled with a RuleSarif.
  • Constructor Details

  • Method Details

    • supports

      public boolean supports(Path file)
      Description copied from interface: CodeChanger
      A predicate which dictates if the file should be inspected by the codemod. This cannot be overridden and should always pass before executing the codemod.
    • 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 class RawFileChanger
      Returns:
      a list of changes that were made to the file
    • onFileFound

      public abstract CodemodFileScanningResult 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 transformation
      results - the given SARIF results to act on
      Returns:
      a List of CodemodChanges representing changes in the file.