-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
58 lines (55 loc) · 1.55 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright (C) 2023 Roberto Rossini <[email protected]>
#
# SPDX-License-Identifier: MIT
default_language_version:
python: python3 # Defaults to python2, so override it.
exclude: ^test/data
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-yaml
- id: end-of-file-fixer
- id: forbid-submodules
- id: mixed-line-ending
args:
- --fix=lf
- id: trailing-whitespace
# Formatters should be run late so that they can re-format any prior changes.
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black
args: ["--line-length", "120", "--target-version", "py311"]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", "--py", "311"]
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.15.1
hooks:
- id: gersemi
exclude: |
(?x)(
^cmake/modules|
^cmake/conan_provider.cmake
)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
types_or: [markdown, yaml]
- repo: local
hooks:
- id: clang-format
name: clang-format
entry: clang-format
types_or: [c, c++]
language: python
args: ["-i"]
additional_dependencies: ["clang-format==19.1.1"]