From 6994dc7278f7f61477ea3c2e8c88dd6b43b690e8 Mon Sep 17 00:00:00 2001 From: Etienne Wodey Date: Wed, 20 Nov 2024 11:46:40 +0100 Subject: [PATCH 1/2] hooks: add tach-external --- .pre-commit-hooks.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index c71682b..32b7ea8 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -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 From f88f47a664c6655357d0c21692751242e675a65f Mon Sep 17 00:00:00 2001 From: Etienne Wodey Date: Wed, 20 Nov 2024 12:27:35 +0100 Subject: [PATCH 2/2] readme: mention tach-external hook --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f6b37e..9b0b9fe 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ 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 @@ -15,4 +15,7 @@ To run `tach check` via pre-commit, add the following to your `.pre-commit-confi 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.