From 4323522b96ca4b8b215e061fe4d20c966d0fcecc Mon Sep 17 00:00:00 2001 From: Philipp Horstenkamp Date: Mon, 6 Nov 2023 20:02:29 +0100 Subject: [PATCH] Added poetry install to the pre-commit hooks. (#329) --- .pre-commit-config.yaml | 5 +++++ CONTRIBUTING.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 28b1600..de2b787 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,6 @@ +default_language_version: + python: python3.11 + repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 @@ -82,6 +85,8 @@ repos: rev: 1.7.0 hooks: - id: poetry-check + - id: poetry-install + # `pre-commit install --install-hooks -t post-checkout -t post-merge` to activate - repo: https://github.com/Lucas-C/pre-commit-hooks-java rev: 1.3.10 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fabdb32..eaae33f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,6 @@ - [Generate an SSH Key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) & [Add SSH Key to GitHub](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) - [Clone the Project (IDE Specific)](https://docs.github.com/de/repositories/creating-and-managing-repositories/cloning-a-repository) - [Install the python Project](https://python-poetry.org/docs/basic-usage/#installing-dependencies) -- [Install pre-commit](https://pre-commit.com/#install) ## Repository structure @@ -54,6 +53,7 @@ We decided to use english on everything close to code but will write longer text german. ## Pre-Commit Usage +- [Install pre-commit](https://pre-commit.com/#install) `pre-commit install --install-hooks -t post-checkout -t post-merge -t pre-commit` - the following code format rules are so enforced: - Whitespace formatting: