From cad5e51c000910b5bfdc805a1b94353cbec83025 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 4 Mar 2024 09:01:08 +0100 Subject: [PATCH] Add pre-commit hook --- .pre-commit-config.yaml | 5 +++++ README.md | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..383215db --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,5 @@ +repos: +- repo: https://github.com/m-kuhn/vcpkg-pre-commit + rev: v0.1.0 + hooks: + - id: vcpkg-format \ No newline at end of file diff --git a/README.md b/README.md index c1c649eb..da45aded 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,13 @@ Enable registries feature flag in vcpkg and write a vcpkg-configuration.json fil ## Contributions Contributions are very welcome 👋 + +### Using pre-commit hook to automatically format files + +Install and enable pre-commit in your local git clone to automatically +have manifest files formatted whenever you `git commit` something. + +```console +pip install pre-commit +pre-commit install +``` \ No newline at end of file