All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.codemodder.CodemodProvider Maven / Gradle / Ivy

package io.codemodder;

import com.google.inject.AbstractModule;
import java.nio.file.Path;
import java.util.List;
import java.util.Set;

/**
 * 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.
 */
public interface CodemodProvider {

  /**
   * Return a set of Guice modules that allow dependency injection
   *
   * @return a set of modules that perform dependency injection
   */
  Set getModules(
      Path repository, List> codemodTypes, List sarifs);

  /**
   * 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 {@link #getModules(Path, List, List)} as a {@link List} of {@link RuleSarif}s.
   *
   * 

By default, this returns an empty list. * * @return a list of tool names that output SARIF that this provider wants to process */ default List wantsSarifToolNames() { return List.of(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy