Skip to content

Commit

Permalink
Add pre-commit safety instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Iain-S committed Aug 9, 2024
1 parent b8ad5b2 commit e74286d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/content/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,20 @@ You should also install [pre-commit](https://pre-commit.com) and install the pre
pre-commit install --install-hooks
```

set an environment variable with your [safety API key](https://docs.safetycli.com/safety-docs/support/invalid-api-key-error#how-to-get-a-safety-api-key):
install the non-safety pre-commit hooks with

```bash
pre-commit run --all-files
```

set an environment variable with your [safety API key](https://docs.safetycli.com/safety-docs/support/invalid-api-key-error#how-to-get-a-safety-api-key)

```bash
export SAFETY_API_KEY=your-api-key
```

and run the checks with
and run the safety hook with

```bash
pre-commit run --all-files
pre-commit run --all-files --config .pre-commit-safety.yaml
```

0 comments on commit e74286d

Please sign in to comment.