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 c8b9dba
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/pocc/pre-commit-hooks
rev: v1.3.5
hooks:
- id: clang-format
args: ["-i"]
exclude: _clingo\.c$

0 comments on commit c8b9dba

Please sign in to comment.