Skip to content
Merged
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
20 changes: 20 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Pre-commit hook: runs the same ruff checks as CI.
# Install with: git config core.hooksPath .githooks

set -euo pipefail

Comment thread
BigLep marked this conversation as resolved.
if ! command -v uvx &> /dev/null; then
echo "Error: 'uvx' is not installed or not on PATH."
echo "Install it via: curl -LsSf https://astral.sh/uv/install.sh | sh"
echo "See https://docs.astral.sh/uv/getting-started/installation/ for more options."
exit 1
fi

echo "Running ruff lint..."
uvx ruff check .

echo "Running ruff format check..."
uvx ruff format --check .

echo "All lint checks passed."
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,15 @@ This runs integration tests across `github-projects-client`, `filozzy-mcp`, and
cd tpm-utils
```

2. **Review the documentation** for the specific tool you need
3. **Set up any required dependencies** (Python 3, jq, etc.)
4. **Follow the workflow steps** outlined in each documentation file
2. **Enable the pre-commit lint hook** (runs the same `ruff` checks as CI).
Requires [`uv`](https://docs.astral.sh/uv/getting-started/installation/) (provides `uvx`).
```bash
git config core.hooksPath .githooks
```

3. **Review the documentation** for the specific tool you need
4. **Set up any required dependencies** (Python 3, jq, etc.)
5. **Follow the workflow steps** outlined in each documentation file

## Contributing

Expand Down
Loading