This repository provides vcpkg hooks for pre-commit.
The following section assumes that you installed pre-commit and run pre-commit install
in your repository.
- Formats manifests using the vcpkg
format-manifest
command - Automatically downloads the appropriate vcpkg binary for your platform
- Cross-platform support (Windows, Linux, macOS)
- Works with x64 and ARM64 architectures
- Caches the vcpkg binary for better performance
Add this to your .pre-commit-config.yaml
:
repos:
- repo: https://github.com/open-vcpkg/pre-commit
rev: v1.0.1 # Use the ref you want to point at
hooks:
- id: vcpkg-format-manifest
Once installed, the hook will automatically run on any commits that modify vcpkg.json
files.
You can also run the hook manually:
pre-commit run vcpkg-format-manifest --all-files
To contribute to this hook:
- Clone the repository
- Create a virtual environment:
python -m venv venv source venv/bin/activate # or `venv\Scripts\activate` on Windows
- Install development dependencies:
pip install -e ".[dev]"
- Install pre-commit:
pre-commit install
MIT