From d8b754a91bad7d28d52c548983b3047e63e9a0e9 Mon Sep 17 00:00:00 2001 From: Dominik Charousset Date: Sat, 9 Jul 2022 09:45:53 +0200 Subject: [PATCH] Enable clang-format check for PRs --- .github/workflows/pre-commit.yml | 14 ++++++++++++++ .pre-commit-config.yaml | 8 ++++++++ 2 files changed, 22 insertions(+) create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 000000000..3e9e012b7 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,14 @@ +name: pre-commit + +on: + pull_request: + push: + branches: [master] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: pre-commit/action@v3.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..f3f52012a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +# +repos: +- repo: https://github.com/pre-commit/mirrors-clang-format + rev: 'v13.0.0' + hooks: + - id: clang-format