Package io.codemodder

Interface CodemodProvider


public interface CodemodProvider
A type that helps provide functionality codemods. For instance, we may have providers that run SAST tools, help codemods understand build files, dependency management, etc.
  • Method Summary

    Modifier and Type
    Method
    Description
    Set<com.google.inject.AbstractModule>
    getModules(Path repository, List<Class<? extends CodeChanger>> codemodTypes, List<RuleSarif> sarifs)
    Return a set of Guice modules that allow dependency injection
    default List<String>
    Tools this provider is interested in processing the SARIF output of.
  • Method Details

    • getModules

      Set<com.google.inject.AbstractModule> getModules(Path repository, List<Class<? extends CodeChanger>> codemodTypes, List<RuleSarif> sarifs)
      Return a set of Guice modules that allow dependency injection
      Returns:
      a set of modules that perform dependency injection
    • wantsSarifToolNames

      default List<String> wantsSarifToolNames()
      Tools this provider is interested in processing the SARIF output of. Codemodder CLI will look for the SARIF outputted by tools in this list in the repository root and then provide the results to getModules(Path, List, List) as a List of RuleSarifs.

      By default, this returns an empty list.

      Returns:
      a list of tool names that output SARIF that this provider wants to process