Skip to content

Commit

Permalink
Add clang-format to pre-commit hook (#505)
Browse files Browse the repository at this point in the history
This PR adds clang format to pre-commit hook.

closes #503

Authors:
  - Michael Wang (https://github.com/isVoid)

Approvers:
  - Mark Harris (https://github.com/harrism)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #505
  • Loading branch information
isVoid authored Apr 7, 2022
1 parent cfd22ea commit 9b7e1d7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,19 @@ repos:
name: flake8-cython
args: ["--config=python/cuspatial/.flake8.cython"]
types: [cython]
- repo: local
hooks:
- id: clang-format
# Using the pre-commit stage to simplify invocation of all
# other hooks simultaneously (via any other hook stage). This
# can be removed if we also move to running clang-format
# entirely through pre-commit.
stages: [commit]
name: clang-format
description: Format files with ClangFormat.
entry: clang-format -i
language: system
files: \.(cu|cuh|h|hpp|cpp|inl)$
args: ['-fallback-style=none']
default_language_version:
python: python3

0 comments on commit 9b7e1d7

Please sign in to comment.