Skip to content

Commit

Permalink
Add section about tool input parameters (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
drdavella authored Jul 24, 2024
1 parent 98fe0ce commit cb26563
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ The `executable` could involve multiple command line tokens (e.g., `npm run` or
}
```

## Tool result parameters

Codemodder accepts several parameters that are used to provide tool result inputs to the codemods. These include `--sarif`, `--sonar-issues-json`, `--sonar-hotspots-json`, and a handful of others that are tied to tool-specific formats. The available parameters may be gradually expanded as new tools are supported.

In general each tool result flag accecpts a comma-separated list of paths to files that contain the tool results. It is also possible to combine multiple tool result flags in a single invocation of the codemodder (e.g. to use both `--sarif` and `--sonar-issues-json`), subject to the restriction below.

**NOTE:** It is _not_ allowed to provide multiple SARIF inputs _for the same tool_ in a single invocation of the codemodder. For example, it is not possible to provide two Semgrep SARIF files, although it would be possible to provide e.g. a Semgrep SARIF file and a CodeQL JSON file in the same invocation.

## Configuring OpenAI

You can optionally allow codemods to access OpenAI by running with the following environment variable during execution:
Expand Down

0 comments on commit cb26563

Please sign in to comment.