aboutsummaryrefslogtreecommitdiff
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
authorAlex Richardson <alexrichardson@google.com>2023-06-16 14:18:34 -0700
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>2023-06-19 04:52:00 -0700
commit787ccfb46a7a11930d810d8f05427ed225609ae1 (patch)
treee9dfde7b1eac3d95addad68a84c0c001e054fc7f /.pre-commit-config.yaml
parent1c2dca98fe8f21930339cf1e13e107a27eaa3ebc (diff)
downloadsail-riscv-787ccfb46a7a11930d810d8f05427ed225609ae1.zip
sail-riscv-787ccfb46a7a11930d810d8f05427ed225609ae1.tar.gz
sail-riscv-787ccfb46a7a11930d810d8f05427ed225609ae1.tar.bz2
Add clang-format to the pre-commit hooks
This formats the code with clang-format 15 since the pre-commit hook for clang-format 16 would require a newer version of pre-commit.
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r--.pre-commit-config.yaml5
1 files changed, 5 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index c530a5b..d8791c0 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -16,3 +16,8 @@ repos:
exclude: '.*\.(diff|dump|patch|svg)'
- id: check-yaml
- id: check-added-large-files
+- repo: https://github.com/pre-commit/mirrors-clang-format
+ rev: 'v15.0.7'
+ hooks:
+ - id: clang-format
+ types_or: [c, c++] # Don't try running clang-format on .json files