Skip to content

Commit 57c8bf6

Browse files
authored
Merge pull request #183 from flagarde/pre-commit_clang-format
Use clang-format with pre-commit
2 parents 21760e6 + 50037b3 commit 57c8bf6

File tree

4 files changed

+4159
-3547
lines changed

4 files changed

+4159
-3547
lines changed

.github/workflows/clang-format.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: pre-commit Check
2+
on: [push, pull_request]
3+
jobs:
4+
formatting-check:
5+
name: Formatting Check
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- name: pre-commit
10+
# You may pin to the exact commit or the version.
11+
# uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
12+
uses: pre-commit/action@v3.0.0

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
default_install_hook_types:
3+
- pre-commit
4+
- pre-merge-commit
5+
- pre-push
6+
- prepare-commit-msg
7+
- commit-msg
8+
- post-commit
9+
- post-checkout
10+
- post-merge
11+
- post-rewrite
12+
13+
fail_fast: false
14+
15+
repos:
16+
17+
- repo: https://github.com/pre-commit/mirrors-clang-format
18+
rev: v14.0.6
19+
hooks:
20+
- id: clang-format

0 commit comments

Comments
 (0)