Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hook to run check-external #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
entry: tach check
language: python
pass_filenames: false
- id: tach-external
name: tach-external
description: Validate external package dependencies
entry: tach check-external
language: python
pass_filenames: false
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ Distributed as a standalone repository to enable installing Tach via prebuilt wh

### Using Tach with pre-commit

To run `tach check` via pre-commit, add the following to your `.pre-commit-config.yaml`:
To run [`tach check`](https://docs.gauge.sh/usage/commands#tach-check) and [`tach check-external`](https://docs.gauge.sh/usage/commands#tach-check-external) via pre-commit, add the following to your `.pre-commit-config.yaml`:

```yaml
- repo: https://github.com/gauge-sh/tach-pre-commit
# Tach version.
rev: v0.14a0
hooks:
- id: tach
- id: tach-external
```

Use [`args`](https://pre-commit.com/#config-args) to pass additional arguments to the `tach` commands.