Skip to content

Commit

Permalink
add a pre-commit config with basic formatters
Browse files Browse the repository at this point in the history
- the formatters have not been applied yet
- clang-format will produce some mess up due to folding comments
  • Loading branch information
rkaminsk committed Dec 11, 2024
1 parent 34e9f07 commit 1109044
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
IndentWidth: '4'
ColumnLimit: '120'
IndentCaseLabels: 'true'
...
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: ^.github/

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
exclude: ^.github/

- repo: https://github.com/psf/black
rev: 24.4.0
hooks:
- id: black
exclude: ^.github/

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.8
hooks:
- id: clang-format
exclude: /_clingo\.c$
types_or: [c++, c, cuda]

0 comments on commit 1109044

Please sign in to comment.