Skip to content

Commit

Permalink
update repo with prereqs
Browse files Browse the repository at this point in the history
Signed-off-by: Sertac Ozercan <[email protected]>
  • Loading branch information
sozercan committed Oct 17, 2023
1 parent 91a917f commit 1e26e26
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a template repo for creating a scanner plugin for [Copacetic](https://github.com/project-copacetic/copacetic).

Learn more about Copacetic's scanner plugins [here](https://project-copacetic.github.io/copacetic/).
Learn more about Copacetic's scanner plugins [here](https://project-copacetic.github.io/copacetic/scanner-plugins).

## Development

Expand All @@ -15,14 +15,33 @@ These instructions are for developing a new scanner plugin for [Copacetic](https
5. Update `CLI_BINARY` in the [`Makefile`](Makefile) to match your scanner's CLI binary name (resulting binary must be prefixed with `copa-`)
5. Update this [`README.md`](README.md) to match your plugin's usage

## Example Usage
## Development Pre-requisites

> [!NOTE]
> You may have different pre-requisites for your scanner plugin, you are not required to use these tools.
The following tools are required to build and run this template:

- `git`: for cloning this repo
- `Go`: for building the plugin
- `make`: for the Makefile

## Example Development Workflow

This is an example development workflow for this template.

```shell
# assuming $GOPATH/bin or $GOBIN is in $PATH
go install github.com/project-copacetic/scanner-plugin-template@latest
# clone this repo
git clone https://github.com/project-copacetic/scanner-plugin-template.git

# change directory to the repo
cd scanner-plugin-template

# build the copa-fake binary
make

# rename binary to copa-<scanner name> (e.g. copa-fake)
mv $GOPATH/bin/scanner-plugin-template $GOPATH/bin/copa-fake
# add copa-fake binary to PATH
export PATH=$PATH:dist/linux_amd64/release/

# test plugin with example config
copa-fake testdata/fake_report.json
Expand Down

0 comments on commit 1e26e26

Please sign in to comment.