Package io.codemodder

Interface CodeChanger

All Known Implementing Classes:
CompositeJavaParserChanger, JavaParserChanger, RawFileChanger, RegexFileChanger, SarifPluginJavaParserChanger, SarifPluginRawFileChanger

public interface CodeChanger
The base of a codemod type.
  • Method Details

    • getSummary

      String getSummary()
      The headline for this codemod's changes.
    • getDescription

      String getDescription()
      A deep description of what this codemod's changes.
    • getReferences

      List<io.codemodder.codetf.CodeTFReference> getReferences()
      A list of references for further reading on the issues this codemod addresses or other supplementary information.
    • getIndividualChangeDescription

      String getIndividualChangeDescription(Path filePath, CodemodChange change)
      A description of an individual change made by this codemod.
    • getIncludesExcludesPattern

      default IncludesExcludesPattern getIncludesExcludesPattern()
      A list of paths patterns requested or rejected by the codemod. Those patterns are treated as relative to the repository root. These patterns should follow the PathMatcher specification. These patterns can be overridden by global patterns.
    • supports

      boolean supports(Path file)
      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.
    • shouldRun

      default boolean shouldRun()
      A lifecycle event that is called before any files are processed. This is a good place to short circuit if you don't have the necessary resources (e.g., SARIF).